|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Image class for storing multi-dimensional medical image data. More...
#include <mitkImage.h>


Public Types | |
| enum | ImportMemoryManagementType { CopyMemory , ManageMemory , ReferenceMemory , DontManageMemory } |
| Defines how imported memory is managed when setting data on an Image. More... | |
| typedef itk::SmartPointer< ImageDataItem > | ImageDataItemPointer |
| Smart Pointer type to an ImageDataItem. More... | |
| typedef itk::Statistics::Histogram< double > | HistogramType |
| Histogram type used for image statistics (double-precision). More... | |
| typedef mitk::ImageStatisticsHolder * | StatisticsHolderPointer |
| Pointer type to the ImageStatisticsHolder. More... | |
| typedef std::vector< ImageDataItemPointer > | ImageDataItemPointerArray |
| Vector container of SmartPointers to ImageDataItems. More... | |
Public Types inherited from mitk::SlicedData | |
| typedef itk::ImageRegion< RegionDimension > | RegionType |
| typedef itk::Index< RegionDimension > | IndexType |
| typedef IndexType::IndexValueType | IndexValueType |
| typedef itk::Offset< RegionDimension > | OffsetType |
| typedef OffsetType::OffsetValueType | OffsetValueType |
| typedef itk::Size< RegionDimension > | SizeType |
| typedef SizeType::SizeValueType | SizeValueType |
Public Types inherited from mitk::Identifiable | |
| using | UIDType = std::string |
| Type alias for unique identifiers. More... | |
Public Member Functions | |
| mitkClassMacro (Image, SlicedData) | |
| Pointer | Clone () const |
| const mitk::PixelType | GetPixelType (int n=0) const |
| Returns the PixelType of channel n. More... | |
| unsigned int | GetDimension () const |
| Get the number of dimensions of the image. More... | |
| unsigned int | GetDimension (int i) const |
| Get the size of dimension i. More... | |
| virtual vtkImageData * | GetVtkImageData (int t=0, int n=0) |
| Get a volume at a specific time step t of channel n as a vtkImageData. More... | |
| virtual const vtkImageData * | GetVtkImageData (int t=0, int n=0) const |
| Get a volume at a specific time step t of channel n as a vtkImageData. More... | |
| bool | IsSliceSet (int s=0, int t=0, int n=0) const override |
| Check whether slice s at time t in channel n is set. More... | |
| bool | IsVolumeSet (int t=0, int n=0) const override |
| Check whether the volume at time t in channel n is set. More... | |
| bool | IsChannelSet (int n=0) const override |
| Check whether channel n is set. More... | |
| virtual bool | SetSlice (const void *data, int s=0, int t=0, int n=0) |
| Set data as slice s at time t in channel n. More... | |
| virtual bool | SetVolume (const void *data, int t=0, int n=0) |
| Set data as volume at time t in channel n. More... | |
| virtual bool | SetChannel (const void *data, int n=0) |
| Set data as the data for channel n. More... | |
| virtual bool | SetImportSlice (void *data, int s=0, int t=0, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory) |
| Set data as slice s at time t in channel n with configurable memory management. More... | |
| virtual bool | SetImportVolume (void *data, int t=0, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory) |
| Set data as volume at time t in channel n with configurable memory management. More... | |
| virtual bool | SetImportVolume (const void *const_data, int t=0, int n=0) |
| Set const_data as volume at time t in channel n (copy-only). More... | |
| virtual void | AllocateZeroedVolume (int t=0, int n=0) |
| Allocate a zero-initialized volume at time t in channel n. More... | |
| virtual bool | SetImportChannel (void *data, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory) |
| Set data as the data for channel n with configurable memory management. More... | |
| virtual void | Initialize (const mitk::PixelType &type, unsigned int dimension, const unsigned int *dimensions, unsigned int channels=1) |
| Initialize (or re-initialize) image with pixel type and dimensions. More... | |
| virtual void | Initialize (const mitk::PixelType &type, const mitk::BaseGeometry &geometry, unsigned int channels=1, int tDim=1) |
| Initialize (or re-initialize) image from a BaseGeometry. More... | |
| virtual void | Initialize (const mitk::PixelType &type, const mitk::TimeGeometry &geometry, unsigned int channels=1, int tDim=-1) |
| Initialize (or re-initialize) image from a TimeGeometry. More... | |
| virtual void | Initialize (const mitk::PixelType &type, int sDim, const mitk::PlaneGeometry &geometry2d, unsigned int channels=1, int tDim=1) |
| Initialize (or re-initialize) image from a PlaneGeometry and number of slices. More... | |
| virtual void | Initialize (const mitk::Image *image) |
| Initialize (or re-initialize) image from another mitk::Image. More... | |
| virtual void | Initialize (const mitk::ImageDescriptor::Pointer inDesc) |
| Initialize (or re-initialize) image from an ImageDescriptor. More... | |
| virtual void | Initialize (vtkImageData *vtkimagedata, int channels=1, int tDim=-1, int sDim=-1, int pDim=-1) |
| Initialize (or re-initialize) image from a vtkImageData. More... | |
| template<typename itkImageType > | |
| void | InitializeByItk (const itkImageType *itkimage, int channels=1, int tDim=-1, int sDim=-1) |
| Initialize (or re-initialize) image from a templated ITK image. More... | |
| virtual bool | IsValidSlice (int s=0, int t=0, int n=0) const |
| Check whether slice s at time t in channel n is valid. More... | |
| virtual bool | IsValidVolume (int t=0, int n=0) const |
| Check whether the volume at time t in channel n is valid. More... | |
| virtual bool | IsValidChannel (int n=0) const |
| Check whether channel n is valid. More... | |
| bool | IsRotated () const |
| Check whether the image has a rotated geometry. More... | |
| unsigned int * | GetDimensions () const |
| Get the sizes of all dimensions as an integer array. More... | |
| ImageDescriptor::Pointer | GetImageDescriptor () const |
| Get the image descriptor containing type and dimension information. More... | |
| ChannelDescriptor | GetChannelDescriptor (int id=0) const |
| Get the channel descriptor for channel id. More... | |
| void | SetGeometry (BaseGeometry *aGeometry3D) override |
| Set the geometry of the image. More... | |
| virtual ImageDataItemPointer | GetSliceData (int s=0, int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| Get the ImageDataItem for slice s at time t in channel n. More... | |
| virtual ImageDataItemPointer | GetVolumeData (int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| Get the ImageDataItem for the volume at time t in channel n. More... | |
| virtual ImageDataItemPointer | GetChannelData (int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| Get the ImageDataItem for channel n. More... | |
| void * | GetData (int t=0, int n=0) |
| Get a raw pointer to the volume data at t in channel n without locking. More... | |
| const void * | GetData (int t=0, int n=0) const |
| Get a raw pointer to the volume data at t in channel n without locking. More... | |
| StatisticsHolderPointer | GetStatistics () const |
| Get the ImageStatisticsHolder that provides statistics for this image. More... | |
Public Member Functions inherited from mitk::SlicedData | |
| mitkClassMacro (SlicedData, BaseData) | |
| itkStaticConstMacro (RegionDimension, unsigned int, 5) | |
| void | UpdateOutputInformation () override |
| Update the information for this DataObject so it can be used as an output of a ProcessObject. More... | |
| void | PrepareForNewData () override |
| Prepare the data object to receive new data. More... | |
| void | SetRequestedRegionToLargestPossibleRegion () override |
| Set the RequestedRegion to the LargestPossibleRegion. More... | |
| bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
| Determine whether the RequestedRegion is outside of the BufferedRegion. More... | |
| bool | VerifyRequestedRegion () override |
| Verify that the RequestedRegion is within the LargestPossibleRegion. More... | |
| void | SetRequestedRegion (const itk::DataObject *data) override |
| Set the requested region from another data object. More... | |
| virtual void | SetRequestedRegion (SlicedData::RegionType *region) |
| Set the requested region from a RegionType pointer. More... | |
| void | SetLargestPossibleRegion (SlicedData::RegionType *region) |
| Set the largest possible region. More... | |
| const RegionType & | GetLargestPossibleRegion () const |
| Get the largest possible region. More... | |
| virtual const RegionType & | GetRequestedRegion () const |
| Get the region object that defines the size and starting index for the requested region (i.e., the part of the data to be operated on). More... | |
| void | CopyInformation (const itk::DataObject *data) override |
| Copy information from the specified data set. More... | |
| unsigned int | GetNumberOfChannels () const |
| Get the number of channels. More... | |
| SlicedGeometry3D * | GetSlicedGeometry (unsigned int t=0) const |
| Convenience access method for the geometry, which is of type SlicedGeometry3D (or a sub-class of it). More... | |
| const SlicedGeometry3D * | GetUpdatedSlicedGeometry (unsigned int t=0) |
| Convenience access method that returns an up-to-date SlicedGeometry3D. More... | |
| void | SetGeometry (BaseGeometry *aGeometry3D) override |
| Set the BaseGeometry of the data, which will be referenced (not copied!). More... | |
| void | SetOrigin (const Point3D &origin) override |
| Convenience method for setting the origin of the SlicedGeometry3D instances of all time steps. More... | |
| virtual void | SetSpacing (const ScalarType aSpacing[]) |
| Convenience method for setting the spacing of the SlicedGeometry3D instances of all time steps. More... | |
| virtual void | SetSpacing (mitk::Vector3D aSpacing) |
| Convenience method for setting the spacing of the SlicedGeometry3D instances of all time steps. More... | |
Public Member Functions inherited from mitk::BaseData | |
| mitkClassMacroItkParent (BaseData, itk::DataObject) | |
| BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
| Get a const property by its key. More... | |
| std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
| Get all property keys stored in the property list. More... | |
| std::vector< std::string > | GetPropertyContextNames () const override |
| Get the names of all property contexts. More... | |
| BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
| Get a non-const property by its key. More... | |
| void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Set a property in the property list. More... | |
| void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Remove a property from the property list. More... | |
| const mitk::TimeGeometry * | GetTimeGeometry () const |
| Return the TimeGeometry of the data as const pointer. More... | |
| mitk::TimeGeometry * | GetTimeGeometry () |
| Return the TimeGeometry of the data as non-const pointer. More... | |
| const mitk::TimeGeometry * | GetUpdatedTimeGeometry () |
| Return the TimeGeometry of the data after ensuring it is up-to-date. More... | |
| const mitk::BaseGeometry * | GetUpdatedGeometry (int t=0) |
| Return the BaseGeometry of the data at time step t after ensuring it is up-to-date. More... | |
| mitk::BaseGeometry * | GetGeometry (int t=0) const |
| Return the BaseGeometry of the data at time step t as a non-const pointer. More... | |
| void | UpdateOutputInformation () override |
| Update the information for this BaseData so that it can be used as an output of a BaseProcess. More... | |
| void | CopyInformation (const itk::DataObject *data) override |
| Copy information from the specified data set. More... | |
| virtual bool | IsInitialized () const |
| Check whether the data has been initialized. More... | |
| virtual bool | IsEmptyTimeStep (unsigned int t) const |
| Check whether the object contains data at the specified time step. More... | |
| virtual bool | IsEmpty () const |
| Check whether the object contains data at any time step. More... | |
| void | ExecuteOperation (Operation *operation) override |
| Execute an operation on this data object. More... | |
| virtual void | SetTimeGeometry (TimeGeometry *geometry) |
| Set the TimeGeometry of the data, which will be referenced (not copied!). More... | |
| virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D) |
| Set a clone of the provided geometry as the BaseGeometry of the data. More... | |
| virtual void | SetClonedTimeGeometry (const TimeGeometry *geometry) |
| Set a clone of the provided TimeGeometry as the TimeGeometry of the data. More... | |
| virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time) |
| Set a clone of the provided geometry as the BaseGeometry of a given time step. More... | |
| mitk::PropertyList::Pointer | GetPropertyList () const |
| Get the data's property list. More... | |
| void | SetPropertyList (PropertyList *propertyList) |
| Set the data's property list, replacing the existing one. More... | |
| mitk::BaseProperty::Pointer | GetProperty (const char *propertyKey) const |
| Get a property by its key from the PropertyList. More... | |
| void | SetProperty (const char *propertyKey, BaseProperty *property) |
| Set a property in the PropertyList. More... | |
| itk::SmartPointer< mitk::BaseDataSource > | GetSource () const |
| Get the process object that generated this data object. More... | |
| unsigned int | GetTimeSteps () const |
| Get the number of time steps from the TimeGeometry. More... | |
| itk::ModifiedTimeType | GetMTime () const override |
| Get the modification time of this data object or its geometry, whichever was modified most recently. More... | |
| void | Graft (const DataObject *) override |
| Graft data and information from another data object. More... | |
Public Member Functions inherited from mitk::OperationActor | |
| itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Public Member Functions inherited from mitk::Identifiable | |
| Identifiable () | |
| Default constructor. Generates a new random UID. More... | |
| Identifiable (const UIDType &uid) | |
| Construct with a pre-existing UID. More... | |
| Identifiable (const Identifiable &)=delete | |
| Copy construction is deleted to prevent UID duplication. More... | |
| Identifiable (Identifiable &&) noexcept | |
| Move constructor. Transfers ownership of the UID. More... | |
| virtual | ~Identifiable () |
| Virtual destructor. More... | |
| Identifiable & | operator= (const Identifiable &)=delete |
| Copy assignment is deleted to prevent UID duplication. More... | |
| Identifiable & | operator= (Identifiable &&other) noexcept |
| Move assignment operator. Transfers ownership of the UID. More... | |
| virtual UIDType | GetUID () const |
| Get the unique identifier of this object. More... | |
| UIDType | GetRuntimeUID () const noexcept |
| Get a runtime-unique ID for this object instance. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
| ~IPropertyOwner () override | |
| virtual bool | PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const |
| Checks if a certain property exists. More... | |
Public Member Functions inherited from mitk::IPropertyProvider | |
| virtual | ~IPropertyProvider () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Types | |
| typedef std::lock_guard< std::mutex > | MutexHolder |
Protected Member Functions | |
| mitkCloneMacro (Self) | |
| int | GetSliceIndex (int s=0, int t=0, int n=0) const |
| int | GetVolumeIndex (int t=0, int n=0) const |
| void | ComputeOffsetTable () |
| virtual bool | IsValidTimeStep (int t) const |
| void | Expand (unsigned int timeSteps) override |
| Expand the TimeGeometry to a number of time steps. More... | |
| virtual ImageDataItemPointer | AllocateSliceData (int s=0, int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| virtual ImageDataItemPointer | AllocateVolumeData (int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| virtual ImageDataItemPointer | AllocateChannelData (int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const |
| Image () | |
| Image (const Image &other) | |
| ~Image () override | |
| void | Clear () override |
| Reset the data object by calling ClearData() and InitializeEmpty(). More... | |
| void | Initialize () override |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Member Functions inherited from mitk::SlicedData | |
| SlicedData () | |
| SlicedData (const SlicedData &other) | |
| ~SlicedData () override | |
Protected Member Functions inherited from mitk::BaseData | |
| BaseData () | |
| BaseData (const BaseData &other) | |
| ~BaseData () override | |
| virtual void | InitializeTimeGeometry (unsigned int timeSteps=1) |
| Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More... | |
| virtual void | ClearData () |
| reset to non-initialized state, release memory More... | |
| virtual void | InitializeEmpty () |
| Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More... | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Member Functions inherited from mitk::Identifiable | |
| virtual void | SetUID (const UIDType &uid) |
Protected Attributes | |
| ImageDataItemPointerArray | m_Channels |
| ImageDataItemPointerArray | m_Volumes |
| ImageDataItemPointerArray | m_Slices |
| std::mutex | m_ImageDataArraysLock |
| unsigned int | m_Dimension |
| unsigned int * | m_Dimensions |
| ImageDescriptor::Pointer | m_ImageDescriptor |
| size_t * | m_OffsetTable |
| ImageDataItemPointer | m_CompleteData |
| StatisticsHolderPointer | m_ImageStatistics |
Protected Attributes inherited from mitk::SlicedData | |
| RegionType | m_LargestPossibleRegion |
| RegionType | m_RequestedRegion |
| bool | m_RequestedRegionInitialized |
| RegionType | m_BufferedRegion |
| bool | m_UseLargestPossibleRegion |
Protected Attributes inherited from mitk::BaseData | |
| bool | m_LastRequestedRegionWasOutsideOfTheBufferedRegion |
| unsigned int | m_SourceOutputIndexDuplicate |
| bool | m_Initialized |
Image class for storing multi-dimensional medical image data.
Image is the primary data class for pixel-based image data in MITK. It can be queried for header information, raw data vectors, or vtkImageData objects. If access to only part of the data is required, use the appropriate accessor classes (ImageReadAccessor, ImageWriteAccessor, ImagePixelReadAccessor, ImagePixelWriteAccessor) rather than direct data access.
Image organizes data hierarchically as:
All channels must share the same geometry (including dimensions). Only the pixel type may differ between channels.
For importing ITK images, use of mitk::ITKImageImport is recommended. See Adaptor Classes for details.
For more information, see MITK Image.
Definition at line 75 of file mitkImage.h.
| typedef itk::Statistics::Histogram<double> mitk::Image::HistogramType |
Histogram type used for image statistics (double-precision).
Definition at line 96 of file mitkImage.h.
Smart Pointer type to an ImageDataItem.
Definition at line 93 of file mitkImage.h.
| typedef std::vector<ImageDataItemPointer> mitk::Image::ImageDataItemPointerArray |
Vector container of SmartPointers to ImageDataItems.
For internal usage to allow convenient access to all slices via iterators.
Definition at line 121 of file mitkImage.h.
|
protected |
Definition at line 742 of file mitkImage.h.
Pointer type to the ImageStatisticsHolder.
Definition at line 99 of file mitkImage.h.
Defines how imported memory is managed when setting data on an Image.
This enum is evaluated by SetImportSlice, SetImportVolume, and SetImportChannel to decide ownership of the provided data buffer.
| Enumerator | |
|---|---|
| CopyMemory | Data is copied to a new memory block owned by the Image. The original buffer is not freed by Image. |
| ManageMemory | Data is referenced by the Image. The Image takes ownership and will free the buffer on deletion. |
| ReferenceMemory | Data is referenced by the Image. The Image does not free the buffer on deletion; the caller retains ownership. |
| DontManageMemory | Alias for ReferenceMemory. |
Definition at line 107 of file mitkImage.h.
|
protected |
|
protected |
|
overrideprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Allocate a zero-initialized volume at time t in channel n.
The image must already be initialized with a pixel type and dimensions (via any Initialize() overload) but must not yet have volume data set for the given time step and channel.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
| mitk::Exception | if any precondition is violated. |
|
overrideprotectedvirtual |
Reset the data object by calling ClearData() and InitializeEmpty().
Reimplemented from mitk::BaseData.
| Pointer mitk::Image::Clone | ( | ) | const |
|
protected |
|
overrideprotectedvirtual |
Expand the TimeGeometry to a number of time steps.
The method expands the TimeGeometry to the given number of time steps, filling newly created elements with empty geometries. Sub-classes should override this method to handle the elongation of their data vectors, too.
| [in] | timeSteps | The desired number of time steps. |
Reimplemented from mitk::BaseData.
|
virtual |
Get the ImageDataItem for channel n.
| [in] | n | Channel number (default: 0). |
| [in] | data | Optional pre-allocated data buffer (default: nullptr). |
| [in] | importMemoryManagement | Memory management policy (default: CopyMemory). |
|
inline |
Get the channel descriptor for channel id.
| [in] | id | The channel index (default: 0). |
Definition at line 642 of file mitkImage.h.
| void* mitk::Image::GetData | ( | int | t = 0, |
| int | n = 0 |
||
| ) |
Get a raw pointer to the volume data at t in channel n without locking.
Returns the underlying voxel buffer for direct, unlocked access. No ImageReadAccessor or ImageWriteAccessor is created and the accessor lock list is left untouched. The caller is responsible for ensuring no concurrent SetVolume(), SetSlice(), or Initialize() call runs while the returned pointer is in use.
Use the accessor classes (ImageReadAccessor, ImageWriteAccessor) when lock-based concurrency control is required instead.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
nullptr if no volume data is available at (t, n). | const void* mitk::Image::GetData | ( | int | t = 0, |
| int | n = 0 |
||
| ) | const |
Get a raw pointer to the volume data at t in channel n without locking.
Returns the underlying voxel buffer for direct, unlocked access. No ImageReadAccessor or ImageWriteAccessor is created and the accessor lock list is left untouched. The caller is responsible for ensuring no concurrent SetVolume(), SetSlice(), or Initialize() call runs while the returned pointer is in use.
Use the accessor classes (ImageReadAccessor, ImageWriteAccessor) when lock-based concurrency control is required instead.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
nullptr if no volume data is available at (t, n). | unsigned int mitk::Image::GetDimension | ( | ) | const |
Get the number of dimensions of the image.
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), and mitk::AccessItkImageFunctor< X, VDimension, T1, T2, T3 >::operator()().
| unsigned int mitk::Image::GetDimension | ( | int | i | ) | const |
Get the size of dimension i.
For example, i=0 gives the number of pixels in x-direction, i=1 in y-direction, i=2 in z-direction (number of slices), and i=3 the number of time steps.
| [in] | i | The dimension index. |
| unsigned int* mitk::Image::GetDimensions | ( | ) | const |
Get the sizes of all dimensions as an integer array.
|
inline |
Get the image descriptor containing type and dimension information.
Definition at line 634 of file mitkImage.h.
| const mitk::PixelType mitk::Image::GetPixelType | ( | int | n = 0 | ) | const |
Returns the PixelType of channel n.
| [in] | n | The channel index (default: 0). |
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), and mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetConsecutivePixelsAsVector().
|
virtual |
Get the ImageDataItem for slice s at time t in channel n.
| [in] | s | Slice index (default: 0). |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
| [in] | data | Optional pre-allocated data buffer (default: nullptr). |
| [in] | importMemoryManagement | Memory management policy (default: CopyMemory). |
|
protected |
|
inline |
Get the ImageStatisticsHolder that provides statistics for this image.
All statistics query methods (min, max, scalar 2nd, etc.) are available through the returned ImageStatisticsHolder object.
Definition at line 737 of file mitkImage.h.
|
virtual |
Get the ImageDataItem for the volume at time t in channel n.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
| [in] | data | Optional pre-allocated data buffer (default: nullptr). |
| [in] | importMemoryManagement | Memory management policy (default: CopyMemory). |
|
protected |
|
virtual |
Get a volume at a specific time step t of channel n as a vtkImageData.
If the image is not initialized, the method will attempt to trigger an update from the pipeline source.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
virtual |
Get a volume at a specific time step t of channel n as a vtkImageData.
If the image is not initialized, the method will attempt to trigger an update from the pipeline source.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
overrideprotected |
|
virtual |
Initialize (or re-initialize) image from another mitk::Image.
Only the header information is copied, not the data vector.
| [in] | image | The source image whose header to copy. |
|
virtual |
Initialize (or re-initialize) image from an ImageDescriptor.
| [in] | inDesc | The image descriptor providing type and dimension information. |
|
virtual |
Initialize (or re-initialize) image from a BaseGeometry.
| [in] | type | The pixel type for the image. |
| [in] | geometry | The spatial geometry to use. |
| [in] | channels | Number of channels (default: 1). |
| [in] | tDim | Number of time steps (default: 1). |
|
virtual |
Initialize (or re-initialize) image from a TimeGeometry.
| [in] | type | The pixel type for the image. |
| [in] | geometry | The time geometry providing spatial and temporal information. |
| [in] | channels | Number of channels (default: 1). |
| [in] | tDim | Override the time dimension if the value is > 0 (default: -1, meaning use the number of time steps from the TimeGeometry). |
|
virtual |
Initialize (or re-initialize) image from a PlaneGeometry and number of slices.
The bounding box is initialized according to the width/height of the PlaneGeometry and sDim via SlicedGeometry3D::InitializeEvenlySpaced. The spacing is calculated from the PlaneGeometry.
| [in] | type | The pixel type for the image. |
| [in] | sDim | Number of slices. |
| [in] | geometry2d | The 2D plane geometry. |
| [in] | channels | Number of channels (default: 1). |
| [in] | tDim | Number of time steps (default: 1). |
|
virtual |
Initialize (or re-initialize) image with pixel type and dimensions.
Creates a plane, evenly spaced geometry starting at origin (0,0,0).
| [in] | type | The pixel type for the image. |
| [in] | dimension | The number of dimensions (2, 3, or 4). |
| [in] | dimensions | Array of sizes for each dimension. |
| [in] | channels | Number of channels (default: 1). |
|
virtual |
Initialize (or re-initialize) image from a vtkImageData.
Only the header is used, not the data vector. Use SetVolume(vtkimage->GetScalarPointer()) to transfer the pixel data.
| [in] | vtkimagedata | The VTK image providing header information. |
| [in] | channels | Number of channels (default: 1). |
| [in] | tDim | Override time dimension (default: -1, use VTK value). |
| [in] | sDim | Override z-space dimension (default: -1, use VTK value). |
| [in] | pDim | Override y-space dimension (default: -1, use VTK value). |
|
inline |
Initialize (or re-initialize) image from a templated ITK image.
Only the header (spacing, origin, direction, dimensions) is used, not the data vector. Use SetVolume(itkimage->GetBufferPointer()) to transfer data.
| itkImageType | The ITK image type. |
| [in] | itkimage | The ITK image providing header information. |
| [in] | channels | Number of channels (default: 1). |
| [in] | tDim | Override time dimension (default: -1, use ITK value). |
| [in] | sDim | Override z-space dimension (default: -1, use ITK value). |
Definition at line 443 of file mitkImage.h.
References mitk::eps, mitk::FillVector3D(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::SlicedGeometry3D::InitializeEvenlySpaced(), MITK_DEBUG, MITK_ERROR, MITK_WARN, mitk::ProportionalTimeGeometry::New(), mitk::BaseGeometry::SetOrigin(), and mitk::BaseGeometry::SetSpacing().
|
overridevirtual |
Check whether channel n is set.
| [in] | n | Channel number (default: 0). |
Implements mitk::SlicedData.
| bool mitk::Image::IsRotated | ( | ) | const |
Check whether the image has a rotated geometry.
Returns true if the geometry's transformation matrix has non-zero off-diagonal elements larger than 1/1000 of the matrix trace.
|
overridevirtual |
Check whether slice s at time t in channel n is set.
| [in] | s | Slice index (default: 0). |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
Implements mitk::SlicedData.
|
virtual |
Check whether channel n is valid.
A valid channel has an index within the image bounds.
| [in] | n | Channel number (default: 0). |
|
virtual |
Check whether slice s at time t in channel n is valid.
A valid slice is one whose indices are within the image bounds.
| [in] | s | Slice index (default: 0). |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
protectedvirtual |
|
virtual |
Check whether the volume at time t in channel n is valid.
A valid volume has indices within the image bounds.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
overridevirtual |
Check whether the volume at time t in channel n is set.
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
Implements mitk::SlicedData.
| mitk::Image::mitkClassMacro | ( | Image | , |
| SlicedData | |||
| ) |
|
protected |
|
static |
Referenced by mitk::CastToMitkImage(), mitk::ImageGenerator::GenerateGradientImage(), mitk::ImageGenerator::GenerateImageFromReference(), mitk::ImageGenerator::GenerateRandomImage(), mitk::PlanarFigureMaskGenerator::PlanarFigureMaskGenerator(), mitk::NonBlockingAlgorithm::SetItkImageAsMITKImagePointerParameter(), and mitk::CLUtil::Transform().
|
overrideprotected |
|
virtual |
Set data as the data for channel n.
The data is copied into an array managed by the Image. If the image should reference external data instead, use SetImportChannel with ImportMemoryManagementType set to ReferenceMemory.
| [in] | data | Pointer to the channel data. |
| [in] | n | Channel number (default: 0). |
|
overridevirtual |
Set the geometry of the image.
Overrides BaseData::SetGeometry to handle SlicedGeometry3D and PlaneGeometry conversion.
| [in] | aGeometry3D | The geometry to set. |
Reimplemented from mitk::BaseData.
|
virtual |
Set data as the data for channel n with configurable memory management.
| [in] | data | Pointer to the channel data. |
| [in] | n | Channel number (default: 0). |
| [in] | importMemoryManagement | Specifies how the data buffer is managed (default: CopyMemory). |
|
virtual |
Set data as slice s at time t in channel n with configurable memory management.
| [in] | data | Pointer to the slice data. |
| [in] | s | Slice index (default: 0). |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
| [in] | importMemoryManagement | Specifies how the data buffer is managed (default: CopyMemory). |
|
virtual |
Set const_data as volume at time t in channel n (copy-only).
This overload always copies the data (equivalent to CopyMemory).
| [in] | const_data | Pointer to the const volume data to copy. |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
virtual |
Set data as volume at time t in channel n with configurable memory management.
| [in] | data | Pointer to the volume data. |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
| [in] | importMemoryManagement | Specifies how the data buffer is managed (default: CopyMemory). |
|
virtual |
Set data as slice s at time t in channel n.
The data is copied into an array managed by the Image. If the image should reference external data instead, use SetImportSlice with ImportMemoryManagementType set to ReferenceMemory.
| [in] | data | Pointer to the slice data. |
| [in] | s | Slice index (default: 0). |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
virtual |
Set data as volume at time t in channel n.
The data is copied into an array managed by the Image. If the image should reference external data instead, use SetImportVolume with ImportMemoryManagementType set to ReferenceMemory.
| [in] | data | Pointer to the volume data. |
| [in] | t | Time step (default: 0). |
| [in] | n | Channel number (default: 0). |
|
mutableprotected |
Definition at line 780 of file mitkImage.h.
|
protected |
Definition at line 792 of file mitkImage.h.
|
protected |
Definition at line 785 of file mitkImage.h.
|
protected |
Definition at line 787 of file mitkImage.h.
|
mutableprotected |
Definition at line 783 of file mitkImage.h.
|
protected |
Definition at line 789 of file mitkImage.h.
|
protected |
Definition at line 796 of file mitkImage.h.
|
protected |
Definition at line 791 of file mitkImage.h.
|
mutableprotected |
Definition at line 782 of file mitkImage.h.
|
mutableprotected |
Definition at line 781 of file mitkImage.h.