7 #include "fwGdcmIO/reader/iod/ComprehensiveSRIOD.hpp" 9 #include "fwGdcmIO/reader/ie/Document.hpp" 11 #include <fwData/PointList.hpp> 12 #include <fwData/String.hpp> 14 #include <fwMedData/ImageSeries.hpp> 27 const ::fwLog::Logger::sptr& logger,
28 ProgressCallback progress,
29 CancelRequestedCallback cancel) :
46 ::fwMedData::ImageSeries::sptr imageSeries = ::fwMedData::ImageSeries::dynamicCast(series);
47 SLM_ASSERT(
"Image series should not be null.", imageSeries);
50 SPTR(::gdcm::Reader) reader = std::shared_ptr< ::gdcm::Reader >( new ::gdcm::Reader );
53 const auto& dicomContainer =
m_dicomSeries->getDicomContainer();
54 const ::fwMemory::BufferObject::sptr bufferObj = dicomContainer.begin()->second;
55 const ::fwMemory::BufferManager::StreamInfo streamInfo = bufferObj->getStreamInfo();
56 SPTR(std::istream) is = streamInfo.stream;
57 reader->SetStream(*is);
58 const bool success = reader->Read();
61 bufferObj->getStreamInfo().fsFile.string()+
62 "\" using the GDCM Image Reader."), !success);
FWGDCMIO_API ComprehensiveSRIOD(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.
Document Information Entity class It search and read a specific template from the root of the documen...
#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.
FWGDCMIO_API void readSR()
Read the Structured Report.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
Implements a failed exception class for fwGdcmIO.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
FWGDCMIO_API void read(::fwMedData::Series::sptr series)
Read DICOM file.
FWGDCMIO_API ~ComprehensiveSRIOD()
Destructor.