7 #include "fwGdcmIO/reader/iod/CTMRImageIOD.hpp" 9 #include "fwGdcmIO/helper/DicomDataReader.hxx" 10 #include "fwGdcmIO/reader/ie/Equipment.hpp" 11 #include "fwGdcmIO/reader/ie/Image.hpp" 12 #include "fwGdcmIO/reader/ie/Patient.hpp" 13 #include "fwGdcmIO/reader/ie/Series.hpp" 14 #include "fwGdcmIO/reader/ie/Study.hpp" 16 #include <fwMedData/ImageSeries.hpp> 18 #include <gdcmImageReader.h> 31 const ::fwLog::Logger::sptr& logger,
32 ProgressCallback progress,
33 CancelRequestedCallback cancel) :
35 m_enableBufferRotation(true)
51 ::fwMedData::ImageSeries::sptr imageSeries = ::fwMedData::ImageSeries::dynamicCast(series);
52 SLM_ASSERT(
"Image series should not be null.", imageSeries);
55 SPTR(::gdcm::ImageReader) reader = std::shared_ptr< ::gdcm::ImageReader >( new ::gdcm::ImageReader );
58 const ::fwMemory::BufferObject::sptr bufferObj =
m_dicomSeries->getDicomContainer().begin()->second;
59 const ::fwMemory::BufferManager::StreamInfo streamInfo = bufferObj->getStreamInfo();
60 SPTR(std::istream) is = streamInfo.stream;
61 reader->SetStream(*is);
63 const bool success = reader->Read();
65 bufferObj->getStreamInfo().fsFile.string()+
66 "\" using the GDCM Reader."), !success);
82 patientIE.readPatientModule();
83 unsigned int progress = 3;
87 studyIE.readGeneralStudyModule();
92 studyIE.readPatientStudyModule();
97 seriesIE.readGeneralSeriesModule();
105 equipmentIE.readGeneralEquipmentModule();
113 imageIE.readImagePlaneModule();
118 imageIE.readImagePixelModule();
126 imageIE.readVOILUTModule();
Study Information Entity class.
void setBufferRotationEnabled(bool enabled)
Enable buffer rotation.
Series Information Entity class.
#define SLM_TRACE_FUNC()
Trace contextual function signature.
This class defines a DICOM SOP instance. It is useful during the whole writing process. This class allows to share data between module writers.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
FWGDCMIO_API ~CTMRImageIOD()
Destructor.
Image Information Entity class.
Implements a failed exception class for fwGdcmIO.
Equipment Information Entity class.
bool m_enableBufferRotation
Enable buffer rotation.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
FWGDCMIO_API CTMRImageIOD(const ::fwMedData::DicomSeries::csptr &dicomSeries, const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.
FWGDCMIO_API void read(::fwMedData::Series::sptr series)
Read a DICOM File.
Patient Information Entity class.