7 #include "fwGdcmIO/helper/FileWriter.hpp" 9 #include "fwGdcmIO/exception/Failed.hpp" 11 #include <gdcmFileMetaInformation.h> 12 #include <gdcmWriter.h> 21 const SPTR(::gdcm::Writer)& writer)
24 ::gdcm::FileMetaInformation& metaInformation = writer->GetFile().GetHeader();
27 metaInformation.SetDataSetTransferSyntax(::gdcm::TransferSyntax::ExplicitVRLittleEndian);
30 writer->SetFileName(filename.string().c_str());
35 const std::string msg =
"Unable to write the file " + filename.string();
36 throw ::fwGdcmIO::exception::Failed(msg);
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
static FWGDCMIO_API void write(const ::boost::filesystem::path &filename, const std::shared_ptr< ::gdcm::Writer > &writer)
Write a file from the dataset.