13 #ifndef mitkDICOMImageBlockDescriptor_h
14 #define mitkDICOMImageBlockDescriptor_h
29 #include <unordered_map>
63 return "DICOMCachedValueLookupTable";
140 void SetFlag(
const std::string& key,
bool value);
142 bool GetFlag(
const std::string& key,
bool defaultValue)
const;
150 const std::string &contextName =
"",
151 bool fallBackOnDefaultContext =
true)
const override;
154 bool includeDefaultContext =
false)
const override;
161 void SetSliceIsLoaded(
unsigned int index,
bool isLoaded);
163 bool IsSliceLoaded(
unsigned int index)
const;
165 bool AllSlicesAreLoaded()
const;
238 void Print(std::ostream& os,
bool filenameDetails)
const;
243 std::string GetPixelSpacing()
const;
244 std::string GetImagerPixelSpacing()
const;
246 Image::Pointer FixupSpacing(
Image* mitkImage);
247 Image::Pointer DescribeImageWithProperties(
Image* mitkImage);
248 void UpdateImageDescribingProperties()
const;
252 double stringtodouble(
const std::string& str)
const;
255 Image::Pointer m_MitkImage;
261 PropertyList::Pointer m_PropertyList;
267 mutable bool m_PropertiesOutOfDate;
270 std::set<std::string> m_FoundAdditionalTags;
Abstract base class for properties.
Lookup table mapping slice indices to cached DICOM tag value information.
const char * GetNameOfClass() const override
Return the class name as a string.
~DICOMCachedValueLookupTable() override
DICOMCachedValueLookupTable Self
Superclass & operator=(const Superclass &other) override
DICOMCachedValueLookupTable()
GenericLookupTable< DICOMCachedValueInfo > Superclass
Output descriptor for DICOMFileReader.
std::vector< std::string > GetPropertyKeys(const std::string &contextName="", bool includeDefaultContext=false) const override
Query keys of existing properties.
Image::Pointer GetMitkImage() const
the 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList
void SetIntProperty(const std::string &key, int value)
Convenience function around SetProperty()
void SetSplitReason(IOVolumeSplitReason::Pointer reason)
bool GetFlag(const std::string &key, bool defaultValue) const
Convenience function around GetProperty()
void SetReaderImplementationLevel(const ReaderImplementationLevel &level)
Reader's capability to appropriately load this set of frames.
void Print(std::ostream &os, bool filenameDetails) const
Print information about this image block to given stream.
BaseProperty::ConstPointer GetConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
Get property by its key.
std::map< DICOMTagPath, std::string > AdditionalTagsMapType
DICOMImageBlockDescriptor()
void SetTiltInformation(const GantryTiltInformation &info)
Describe the gantry tilt of the acquisition.
std::string GetSOPClassUID() const
SOP Class UID of this set of frames.
const DICOMImageFrameList & GetImageFrameList() const
List of frames that constitute the mitk::Image (DICOMImageFrames)
PixelSpacingInterpretation GetPixelSpacingInterpretation() const
Describe how the mitk::Image's pixel spacing should be interpreted.
IOVolumeSplitReason::Pointer GetSplitReason()
void SetFlag(const std::string &key, bool value)
Convenience function around SetProperty()
static DICOMTagList GetTagsOfInterest()
Return the list of DICOM tags that the descriptor internally uses.
std::string GetSOPClassUIDAsName() const
SOP Class as human readable name (e.g. "CT Image Storage")
void GetDesiredMITKImagePixelSpacing(ScalarType &spacingXinMM, ScalarType &spacingYinMM) const
Describe the correct x/y pixel spacing of the mitk::Image (which some readers might need to adjust af...
~DICOMImageBlockDescriptor() override
DICOMImageBlockDescriptor & operator=(const DICOMImageBlockDescriptor &other)
DICOMImageBlockDescriptor(const DICOMImageBlockDescriptor &other)
ReaderImplementationLevel GetReaderImplementationLevel() const
Reader's capability to appropriately load this set of frames.
int GetNumberOfFramesPerTimeStep() const
Return the number of frames that constitute one time step.
std::string GetPropertyAsString(const std::string &) const
Convenience function around GetProperty()
void SetProperty(const std::string &key, BaseProperty *value)
Key-value store describing aspects of the image to be loaded.
std::vector< std::string > GetPropertyContextNames() const override
Query names of existing contexts.
std::function< mitk::BaseProperty::Pointer(const DICOMCachedValueLookupTable &) > TagLookupTableToPropertyFunctor
void SetImageFrameList(const DICOMImageFrameList &framelist)
List of frames that constitute the mitk::Image (DICOMImageFrames)
BaseProperty * GetProperty(const std::string &key) const
Key-value store describing aspects of the image to be loaded.
const GantryTiltInformation GetTiltInformation() const
Describe the gantry tilt of the acquisition.
void SetSOPClassUID(const std::string &uid)
SOP Class UID of this set of frames.
void SetMitkImage(Image::Pointer image)
The 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList.
IOVolumeSplitReason::ConstPointer GetSplitReason() const
int GetNumberOfTimeSteps() const
Convenience method that returns the number of time steps.
int GetIntProperty(const std::string &key, int defaultValue) const
Convenience function around GetProperty()
void SetAdditionalTagsOfInterest(const AdditionalTagsMapType &tagMap)
Set a list of DICOMTagPaths that specify all DICOM-Tags that will be copied into the property of the ...
void SetTagLookupTableToPropertyFunctor(TagLookupTableToPropertyFunctor)
Set a functor that defines how the slice-specific tag-values are stored in a Property.
void SetTagCache(DICOMTagCache *privateCache)
Set the tag cache used for reading tag values during image description.
Abstract base class for caching DICOM tag values scanned from files.
Template class for generating lookup-tables.
virtual Self & operator=(const Self &other)
Assignment operator.
std::shared_ptr< IOVolumeSplitReason > Pointer
Shared pointer type.
std::shared_ptr< const IOVolumeSplitReason > ConstPointer
Shared pointer to const type.
Interface implemented by classes that provide access to property information.
Image class for storing multi-dimensional medical image data.
A weak pointer that observes an itk::Object without preventing its deletion.
ReaderImplementationLevel
Describes how well the reader is tested for a certain file type (see mitk::DICOMFileReader).
PixelSpacingInterpretation
How the mitk::Image spacing should be interpreted (see mitk::DICOMFileReader).
Declares commonly used GenericProperty specializations for MITK.
Find image slices visible on a given plane.
std::vector< DICOMImageFrameInfo::Pointer > DICOMImageFrameList
std::vector< DICOMTag > DICOMTagList
A list of DICOMTag instances.
double ScalarType
Scalar type used throughout MITK for geometric computations.
std::vector< bool > BoolList
A list of boolean values, used e.g. for tracking per-slice loaded states.
Stores cached DICOM tag value information for a specific slice.
unsigned int TimePoint
The time point index this value belongs to.
unsigned int SliceInTimePoint
The slice index within the time point.
std::string Value
The cached tag value as a string.