fw4spl
fwGdcmIO::reader::ie::Image Class Reference

Image Information Entity class. More...

#include <Image.hpp>

+ Inheritance diagram for fwGdcmIO::reader::ie::Image:
+ Collaboration diagram for fwGdcmIO::reader::ie::Image:

Public Member Functions

FWGDCMIO_API Image (const std::shared_ptr< const ::fwMedData::DicomSeries > &dicomSeries, const std::shared_ptr< ::gdcm::Reader > &reader, const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const ::fwData::Image::sptr &image, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
 Constructor. More...
 
virtual FWGDCMIO_API ~Image ()
 Destructor.
 
virtual FWGDCMIO_API void readImagePlaneModule ()
 Read Image Plane Module tags. More...
 
virtual FWGDCMIO_API void readImagePixelModule ()
 Read Image Pixel Module tags. More...
 
virtual FWGDCMIO_API void readVOILUTModule ()
 Read VOI LUT Module tags. More...
 
void setBufferRotationEnabled (bool enabled)
 Enable buffer rotation.
 
- Public Member Functions inherited from fwGdcmIO::reader::ie::InformationEntity< ::fwData::Image >
FWGDCMIO_API InformationEntity (const std::shared_ptr< const ::fwMedData::DicomSeries > &dicomSeries, const std::shared_ptr< ::gdcm::Reader > &reader, const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const std::shared_ptr< ::fwData::Image > &object, const ::fwLog::Logger::sptr &logger=nullptr, const ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
 Constructor. More...
 
virtual FWGDCMIO_API ~InformationEntity ()
 Destructor.
 

Protected Types

typedef ::boost::numeric::ublas::matrix< double,::boost::numeric::ublas::row_major, std::vector< double > > MatrixType
 
typedef ::boost::numeric::ublas::vector< double > VectorType
 

Protected Member Functions

char * readImageBuffer (const std::vector< unsigned int > &dimensions, const unsigned short bitsAllocated, const unsigned short newBitsAllocated, const bool performRescale) throw (::fwGdcmIO::exception::Failed)
 Read image buffer. More...
 
char * correctImageOrientation (char *buffer, const std::vector< unsigned int > &dimensions, unsigned short bitsAllocated)
 Correct image buffer according to image orientation. More...
 
MatrixType computeInverseMatrix (MatrixType matrix)
 Compute the inverse of matrix. More...
 

Protected Attributes

bool m_enableBufferRotation
 Enable buffer rotation.
 
- Protected Attributes inherited from fwGdcmIO::reader::ie::InformationEntity< ::fwData::Image >
std::shared_ptr< const ::fwMedData::DicomSeriesm_dicomSeries
 Dicom Series.
 
std::shared_ptr< ::gdcm::Reader > m_reader
 GDCM Reader.
 
std::shared_ptr< ::fwGdcmIO::container::DicomInstancem_instance
 DICOM Instance.
 
std::shared_ptr< ::fwData::Imagem_object
 FW4SPL Object.
 
::fwLog::Logger::sptr m_logger
 Logger.
 
ProgressCallback m_progressCallback
 Progress callback for jobs.
 
CancelRequestedCallback m_cancelRequestedCallback
 Cancel information for jobs.
 

Additional Inherited Members

- Public Types inherited from fwGdcmIO::reader::ie::InformationEntity< ::fwData::Image >
typedef std::function< void(std::uint64_t) > ProgressCallback
 
typedef std::function< bool() > CancelRequestedCallback
 

Detailed Description

Image Information Entity class.

Definition at line 26 of file io/fwGdcmIO/include/fwGdcmIO/reader/ie/Image.hpp.

Constructor & Destructor Documentation

FWGDCMIO_API fwGdcmIO::reader::ie::Image::Image ( const std::shared_ptr< const ::fwMedData::DicomSeries > &  dicomSeries,
const std::shared_ptr< ::gdcm::Reader > &  reader,
const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &  instance,
const ::fwData::Image::sptr &  image,
const ::fwLog::Logger::sptr &  logger = nullptr,
ProgressCallback  progress = nullptr,
CancelRequestedCallback  cancel = nullptr 
)

Constructor.

Parameters
[in]dicomSeriesDicomSeries used to access computed tag values.
[in]readerGDCM reader that must be enriched
[in]instanceDICOM instance used to share informations between modules
[in]imageImage data
[in]loggerLogger
[in]progressProgress callback
[in]cancelCancel requested callback

Member Function Documentation

Image::MatrixType fwGdcmIO::reader::ie::Image::computeInverseMatrix ( MatrixType  matrix)
protected

Compute the inverse of matrix.

Parameters
[in]matrixMatrix that must be inverted

Definition at line 700 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References SLM_WARN.

char * fwGdcmIO::reader::ie::Image::correctImageOrientation ( char *  buffer,
const std::vector< unsigned int > &  dimensions,
unsigned short  bitsAllocated 
)
protected

Correct image buffer according to image orientation.

Parameters
[in,out]bufferImage buffer
[in]dimensionsImage dimensions
[in]bitsAllocatedNumber of bits allocated before rescale

Definition at line 504 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References SPTR.

char * fwGdcmIO::reader::ie::Image::readImageBuffer ( const std::vector< unsigned int > &  dimensions,
const unsigned short  bitsAllocated,
const unsigned short  newBitsAllocated,
const bool  performRescale 
)
throw (::fwGdcmIO::exception::Failed
)
protected

Read image buffer.

Parameters
[in]dimensionsImage dimensions
[in]bitsAllocatedNumber of bits allocated before rescale
[in]newBitsAllocatedNumber of bits allocated after rescale
[in]performRescaleSet to true when a rescale must be perfromed
Returns
Global raw buffer of the image.

Definition at line 369 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References fwGdcmIO::helper::DicomDataTools::getPixelType(), and SPTR.

+ Here is the call graph for this function:

void fwGdcmIO::reader::ie::Image::readImagePixelModule ( )
virtual

Read Image Pixel Module tags.

See also
PS 3.3 C.7.6.3

Definition at line 241 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References fwDicomTools::Image::findImageTypeFromMinMaxValues(), fwGdcmIO::helper::DicomDataTools::getPixelType(), OSLM_TRACE, fwDataTools::helper::Array::setBuffer(), and SPTR.

+ Here is the call graph for this function:

void fwGdcmIO::reader::ie::Image::readImagePlaneModule ( )
virtual

Read Image Plane Module tags.

See also
PS 3.3 C.7.6.2

Definition at line 118 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References OSLM_TRACE, and SPTR.

void fwGdcmIO::reader::ie::Image::readVOILUTModule ( )
virtual

Read VOI LUT Module tags.

See also
PS 3.3 C.11.2

Definition at line 190 of file io/fwGdcmIO/src/fwGdcmIO/reader/ie/Image.cpp.

References OSLM_TRACE.


The documentation for this class was generated from the following files: