![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Dicom/DicomIOD.h>
Base IOD for classic DICOM files. More...
Base IOD for classic DICOM files.
Contains the most common subset of modules that are generally used by Dicom series that are stored in multiple files. The MultiFrameIOD will never assemble frames into volumes, use VolmetricImageIOD for SOP classes that are potential volumes. Most classic DICOMs only contain a single frame per file/IOD, however, some IODs also allow multiple frames in a single file. All modules are Conditional so that derived classes can make them mandatory if needed. Additionally, derived classes can override the validator of module elements, to restrict values according to the standard.
Public Member Functions | |
| MultiFrameImageIOD (DcmDataset &dataset, const OFString &sopClassUID) | |
| std::vector< FrameDescriptor > | loadFrames () override |
| Loads all frames contained in this IOD. | |
| std::vector< FrameDescriptorSet > | sortAndGroupFrames (const std::vector< FrameDescriptor > &frames) const override |
| Groups each frame individual, i.e. as an imageset (sorted by instanceNumber). | |
| void | loadFrameData (const FrameDescriptor &desc, MemImage &image, int slice=-1) override |
| Loads the actual frame data into the given image. | |
| void | loadFrameProperties (const FrameDescriptor &desc, SharedImageSet &image) override |
| Loads any additional properties into the given image. | |
| void | save (SharedImageSet &imageSet, int sharedImageIndex, int sliceIndex) override |
| Stores the general image descriptor and metadata of imageSet in the DICOM data set. | |
| void | savePixelData (SharedImageSet &imageSet, int sharedImageIndex, int sliceIndex) override |
| Writes the pixel data of imageSet in the DICOM data set. | |
| Public Member Functions inherited from ImFusion::Dicom::IOD | |
| IOD (DcmDataset &dataset, const OFString &sopClassUID) | |
| Creates a new IOD representation using the given DcmDataset and SOP class UID. | |
| virtual void | checkErrors () const |
| Checks modules for errors and adds them to the list. | |
| template<typename T> | |
| const T * | searchModule () |
| Returns the first module of the given type or nullptr if no such module exists. | |
| DcmDataset & | dataset () override |
| Returns the dataset represented by this IOD. | |
| Public Member Functions inherited from ImFusion::Dicom::ModuleList | |
| const std::vector< const Module * > & | modules () const |
| List of all modules. | |
| Public Member Functions inherited from ImFusion::Dicom::ElementList | |
| const std::vector< ElementBase * > & | elements () const |
| List of all elements. | |
| Public Member Functions inherited from ImFusion::Dicom::ErrorRecorder | |
| virtual void * | registerErrorHandler (ErrorCallback handler) |
| Registers a new handler callback function. | |
| virtual void | unregisterErrorHandler (void *handler) |
| Removes a previously registered handler again. | |
| void * | forwardErrors (const ErrorRecorder *otherRecorder) |
| Convenient function to forward all errors registered to this recorder to another recorder. | |
| virtual void | registerError (const Error &error) const |
| Sends the given error to all error handler callbacks. | |
| void | registerError (Error::Code code, Error::Type type, const std::string &details, TagProxy tag=TagProxy()) const |
Public Attributes | |
| PixelSpacingCalibration | pixelSpacingCalib |
| ModalityLUT | modalityLut |
| Public Attributes inherited from ImFusion::Dicom::IOD | |
| const OFString | sopClassUID |
| DICOM SOP used. | |
| std::string | pathInfo |
| Optional information from which file this IOD was loaded from (only use for display purposes). | |
| CommonModule | common |
| ImagePixel | imagePixel |
| Element< int > | numberOfFrames |
| If this element exists and is larger than 1, multiple frames will be loaded regardless of the SOP Class defining it or not. | |
Additional Inherited Members | |
| Public Types inherited from ImFusion::Dicom::ErrorRecorder | |
| using | ErrorCallback = std::function<void(const Error&)> |
| Alias for a function to call for each error recorded. | |
| Protected Member Functions inherited from ImFusion::Dicom::ModuleList | |
| virtual void | addModule (const Module &m) |
| Adds a the module to the list. Should only be called by the Module constructor. | |
| virtual void | removeModule (const Module &m) |
| Protected Member Functions inherited from ImFusion::Utils::NotCopyable | |
| NotCopyable (NotCopyable &&) noexcept=default | |
| NotCopyable & | operator= (NotCopyable &&) noexcept=default |
| NotCopyable (const NotCopyable &)=delete | |
| NotCopyable & | operator= (const NotCopyable &)=delete |
| Protected Attributes inherited from ImFusion::Dicom::IOD | |
| DcmDataset & | m_dataset |
| Protected Attributes inherited from ImFusion::Dicom::ModuleList | |
| std::vector< const Module * > | m_modules |
| List of all modules. | |
| Protected Attributes inherited from ImFusion::Dicom::ElementList | |
| std::vector< ElementBase * > | m_elements |
| List of all elements. | |
|
overridevirtual |
Loads all frames contained in this IOD.
Might be multiple frames depending on numberOfFrames.
Implements ImFusion::Dicom::IOD.
Reimplemented in ImFusion::Dicom::VolumetricImageIOD, and ImFusion::NuclearMedicineImageIOD.
|
overridevirtual |
Groups each frame individual, i.e. as an imageset (sorted by instanceNumber).
Implements ImFusion::Dicom::IOD.
Reimplemented in ImFusion::Dicom::VolumetricImageIOD.
|
overridevirtual |
Loads the actual frame data into the given image.
The frameNumber in the given FrameDescriptor is the index of the corresponding frame as returned by loadFrames. If slice is not -1, the frame should be loaded into the given slice of the image.
Implements ImFusion::Dicom::IOD.
|
overridevirtual |
Loads any additional properties into the given image.
This method is called after the complete image data has been loaded. desc will contain valid sharedImageIndex and sliceIndex parameters indicating where this frame has been stored in the image. Implementations must not reorder, remove or resize the images of the given SharedImageSet!
The order or amount of images must not be changed inside the SharedImageSet! Also, the size of the individual images must not change. Otherwise, this would lead to inconsistent sharedImageIndex and sliceIndex values.
This method might throw an exception if the properties somehow make the image completely invalid. This should only be used as a last restort if there is really no way to use the image in any meaningful way!
Reimplemented from ImFusion::Dicom::IOD.
|
overridevirtual |
Stores the general image descriptor and metadata of imageSet in the DICOM data set.
sharedImageIndex and sliceIndex describe which part of the image set should be stored.
Reimplemented from ImFusion::Dicom::IOD.
Reimplemented in ImFusion::Dicom::VolumetricImageIOD, and ImFusion::NuclearMedicineImageIOD.
|
overridevirtual |
Writes the pixel data of imageSet in the DICOM data set.
sharedImageIndex and sliceIndex describe which part of the image set should be stored.
Implements ImFusion::Dicom::IOD.
Reimplemented in ImFusion::NuclearMedicineImageIOD.