7 #include "fwGdcmIO/writer/iod/SpatialFiducialsIOD.hpp" 9 #include "fwGdcmIO/helper/FileWriter.hpp" 10 #include "fwGdcmIO/writer/ie/Equipment.hpp" 11 #include "fwGdcmIO/writer/ie/Image.hpp" 12 #include "fwGdcmIO/writer/ie/Patient.hpp" 13 #include "fwGdcmIO/writer/ie/Series.hpp" 14 #include "fwGdcmIO/writer/ie/SpatialFiducials.hpp" 15 #include "fwGdcmIO/writer/ie/Study.hpp" 19 #include <fwData/Image.hpp> 20 #include <fwData/Vector.hpp> 22 #include <fwDataTools/fieldHelper/Image.hpp> 24 #include <fwMedData/Equipment.hpp> 25 #include <fwMedData/ImageSeries.hpp> 26 #include <fwMedData/Patient.hpp> 27 #include <fwMedData/Study.hpp> 29 #include <boost/make_shared.hpp> 31 #include <gdcmWriter.h> 43 const ::boost::filesystem::path& destinationPath,
44 const ::fwLog::Logger::sptr& logger,
45 ProgressCallback progress,
46 CancelRequestedCallback cancel) :
62 ::fwMedData::ImageSeries::csptr imageSeries = ::fwMedData::ImageSeries::dynamicCast(series);
63 SLM_ASSERT(
"Image series should not be null.", imageSeries);
66 ::fwData::Image::csptr image = imageSeries->getImage();
70 SLM_WARN_IF(
"Writing Spatial Fiducials IOD : distances will be ignored.", distances && !distances->empty());
73 SPTR(::gdcm::Writer) writer = std::make_shared< ::gdcm::Writer >();
83 patientIE.writePatientModule();
86 studyIE.writeGeneralStudyModule();
89 studyIE.writePatientStudyModule();
92 seriesIE.writeGeneralSeriesModule();
95 seriesIE.writeSpatialFiducialsSeriesModule();
98 equipmentIE.writeGeneralEquipmentModule();
101 spatialFiducialsIE.writeSpatialFiducialsModule();
104 spatialFiducialsIE.writeCommonInstanceReferenceModule();
107 spatialFiducialsIE.writeSOPCommonModule();
Equipment Information Entity class.
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.
virtual FWGDCMIO_API void write(const ::fwMedData::Series::csptr &series) override
Write DICOM file.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class defines a vector of objects.
Patient Information Entity class.
Study Information Entity class.
virtual FWGDCMIO_API ~SpatialFiducialsIOD()
Destructor.
#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.
FWGDCMIO_API SpatialFiducialsIOD(const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const ::boost::filesystem::path &destinationPath, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.
Spatial Fiducials Information Entity class.
This file defines SpyLog macros. These macros are used to log messages to a file or to the console du...
#define SLM_WARN_IF(message, cond)