7 #include "fwGdcmIO/writer/iod/ComprehensiveSRIOD.hpp" 9 #include "fwGdcmIO/helper/FileWriter.hpp" 10 #include "fwGdcmIO/writer/ie/Document.hpp" 11 #include "fwGdcmIO/writer/ie/Equipment.hpp" 12 #include "fwGdcmIO/writer/ie/Image.hpp" 13 #include "fwGdcmIO/writer/ie/Patient.hpp" 14 #include "fwGdcmIO/writer/ie/Series.hpp" 15 #include "fwGdcmIO/writer/ie/Study.hpp" 19 #include <fwData/Image.hpp> 21 #include <fwMedData/Equipment.hpp> 22 #include <fwMedData/ImageSeries.hpp> 23 #include <fwMedData/Patient.hpp> 24 #include <fwMedData/Study.hpp> 26 #include <boost/make_shared.hpp> 28 #include <gdcmWriter.h> 40 const ::boost::filesystem::path& destinationPath,
42 const ::fwLog::Logger::sptr& logger,
43 ProgressCallback progress,
44 CancelRequestedCallback cancel) :
61 ::fwMedData::ImageSeries::csptr imageSeries = ::fwMedData::ImageSeries::dynamicCast(series);
62 SLM_ASSERT(
"Image series should not be null.", imageSeries);
65 ::fwData::Image::sptr image = imageSeries->getImage();
68 SPTR(::gdcm::Writer) writer = std::make_shared< ::gdcm::Writer >();
78 patientIE.writePatientModule();
81 studyIE.writeGeneralStudyModule();
84 studyIE.writePatientStudyModule();
87 seriesIE.writeSRDocumentSeriesModule();
90 equipmentIE.writeGeneralEquipmentModule();
93 documentIE.writeSRDocumentGeneralModule();
96 documentIE.writeSRDocumentContentModule();
99 documentIE.writeSOPCommonModule();
virtual FWGDCMIO_API ~ComprehensiveSRIOD()
Destructor.
Equipment Information Entity class.
virtual FWGDCMIO_API void write(const ::fwMedData::Series::csptr &series) override
Write DICOM file.
bool m_use3DSR
True if we must use 3DSR.
FWGDCMIO_API ComprehensiveSRIOD(const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const ::boost::filesystem::path &destinationPath, bool use3DSR=false, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.
This class defines a DICOM SOP instance. It is useful during the whole writing process. This class allows to share data between module writers.
Series Information Entity class.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
Patient Information Entity class.
Study Information Entity class.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
static FWGDCMIO_API void write(const ::boost::filesystem::path &filename, const std::shared_ptr< ::gdcm::Writer > &writer)
Write a file from the dataset.
This file defines SpyLog macros. These macros are used to log messages to a file or to the console du...
Document Information Entity class.