Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::ImageDataItem Class Reference

Internal class for managing references on sub-images. More...

#include <mitkImageDataItem.h>

Inheritance diagram for mitk::ImageDataItem:
Collaboration diagram for mitk::ImageDataItem:

Public Types

typedef itk::SmartPointer< mitk::ImageImagePointer
 
typedef itk::SmartPointer< const mitk::ImageImageConstPointer
 
typedef ImageDataItem Self
 
typedef itk::LightObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
itk::LightObject::Pointer InternalClone () const override
 
 ImageDataItem (const ImageDataItem &aParent, const mitk::ImageDescriptor::Pointer desc, int timestep, unsigned int dimension, void *data=nullptr, bool manageMemory=false, size_t offset=0)
 
 ~ImageDataItem () override
 
 ImageDataItem (const mitk::ImageDescriptor::Pointer desc, int timestep, void *data, bool manageMemory)
 
 ImageDataItem (const mitk::PixelType &type, int timestep, unsigned int dimension, unsigned int *dimensions, void *data, bool manageMemory)
 
 ImageDataItem (const ImageDataItem &other)
 
bool IsComplete () const
 
void SetComplete (bool complete)
 
int GetOffset () const
 
PixelType GetPixelType () const
 
void SetTimestep (int t)
 
void SetManageMemory (bool b)
 
int GetDimension () const
 
int GetDimension (int i) const
 
ImageDataItem::ConstPointer GetParent () const
 
ImageVtkReadAccessorGetVtkImageAccessor (ImageConstPointer) const
 GetVtkImageAccessor Returns a vtkImageDataItem, if none is present, a new one is constructed by the ConstructVtkImageData method. Due to historical development of MITK and VTK, the vtkImage origin is explicitly set to (0, 0, 0) for 3D images. See bug 5050 for detailed information. More...
 
ImageVtkWriteAccessorGetVtkImageAccessor (ImagePointer)
 
bool GetManageMemory () const
 
virtual void ConstructVtkImageData (ImageConstPointer) const
 
size_t GetSize () const
 
virtual void Modified () const
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 

Protected Member Functions

void * GetData () const
 

Protected Attributes

unsigned char * m_Data
 
PixelTypem_PixelType
 
bool m_ManageMemory
 
vtkImageData * m_VtkImageData
 
ImageVtkReadAccessorm_VtkImageReadAccessor
 
ImageVtkWriteAccessorm_VtkImageWriteAccessor
 
int m_Offset
 
bool m_IsComplete
 
size_t m_Size
 

Detailed Description

Internal class for managing references on sub-images.

ImageDataItem is a container for image data which is used internal in mitk::Image to handle the communication between the different data types for images used in MITK (mitk::Image, vtkImageData). Common for these image data types is the actual image data, but they differ in representation of pixel type etc.

The class is mainly used to extract sub-images inside of mitk::Image, like single slices etc. It should not be used outside of this.

Parameters
manageMemoryDetermines if image data is removed while destruction of ImageDataItem or not.

Definition at line 43 of file mitkImageDataItem.h.

Member Typedef Documentation

◆ ConstPointer

◆ ImageConstPointer

◆ ImagePointer

◆ Pointer

◆ Self

Definition at line 61 of file mitkImageDataItem.h.

◆ Superclass

typedef itk::LightObject mitk::ImageDataItem::Superclass

Definition at line 61 of file mitkImageDataItem.h.

Constructor & Destructor Documentation

◆ ImageDataItem() [1/4]

mitk::ImageDataItem::ImageDataItem ( const ImageDataItem aParent,
const mitk::ImageDescriptor::Pointer  desc,
int  timestep,
unsigned int  dimension,
void *  data = nullptr,
bool  manageMemory = false,
size_t  offset = 0 
)

◆ ~ImageDataItem()

mitk::ImageDataItem::~ImageDataItem ( )
override

◆ ImageDataItem() [2/4]

mitk::ImageDataItem::ImageDataItem ( const mitk::ImageDescriptor::Pointer  desc,
int  timestep,
void *  data,
bool  manageMemory 
)

◆ ImageDataItem() [3/4]

mitk::ImageDataItem::ImageDataItem ( const mitk::PixelType type,
int  timestep,
unsigned int  dimension,
unsigned int *  dimensions,
void *  data,
bool  manageMemory 
)

◆ ImageDataItem() [4/4]

mitk::ImageDataItem::ImageDataItem ( const ImageDataItem other)

Member Function Documentation

◆ Clone()

Pointer mitk::ImageDataItem::Clone ( ) const

◆ ConstructVtkImageData()

virtual void mitk::ImageDataItem::ConstructVtkImageData ( ImageConstPointer  ) const
virtual

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::ImageDataItem::GetClassHierarchy ( ) const
inlinevirtual

Definition at line 61 of file mitkImageDataItem.h.

◆ GetClassName()

virtual const char* mitk::ImageDataItem::GetClassName ( ) const
virtual

◆ GetData()

void* mitk::ImageDataItem::GetData ( ) const
inlineprotected

Helper function to allow friend classes to access m_Data without changing their code. Moved to protected visibility because only friends are allowed to access m_Data directly. Other classes should used ImageWriteAccessor::GetData() or ImageReadAccessor::GetData() to get access.

Definition at line 131 of file mitkImageDataItem.h.

◆ GetDimension() [1/2]

int mitk::ImageDataItem::GetDimension ( ) const
inline

◆ GetDimension() [2/2]

int mitk::ImageDataItem::GetDimension ( int  i) const
inline

Definition at line 94 of file mitkImageDataItem.h.

◆ GetManageMemory()

bool mitk::ImageDataItem::GetManageMemory ( ) const
inline

Definition at line 119 of file mitkImageDataItem.h.

◆ GetOffset()

int mitk::ImageDataItem::GetOffset ( ) const
inline

Definition at line 89 of file mitkImageDataItem.h.

◆ GetParent()

ImageDataItem::ConstPointer mitk::ImageDataItem::GetParent ( ) const
inline

Definition at line 105 of file mitkImageDataItem.h.

◆ GetPixelType()

PixelType mitk::ImageDataItem::GetPixelType ( ) const
inline

Definition at line 90 of file mitkImageDataItem.h.

◆ GetSize()

size_t mitk::ImageDataItem::GetSize ( ) const
inline

Definition at line 122 of file mitkImageDataItem.h.

◆ GetStaticNameOfClass()

static const char* mitk::ImageDataItem::GetStaticNameOfClass ( )
inlinestatic

Definition at line 61 of file mitkImageDataItem.h.

◆ GetVtkImageAccessor() [1/2]

ImageVtkReadAccessor* mitk::ImageDataItem::GetVtkImageAccessor ( ImageConstPointer  ) const

GetVtkImageAccessor Returns a vtkImageDataItem, if none is present, a new one is constructed by the ConstructVtkImageData method. Due to historical development of MITK and VTK, the vtkImage origin is explicitly set to (0, 0, 0) for 3D images. See bug 5050 for detailed information.

Returns
Pointer of type ImageVtkReadAccessor

◆ GetVtkImageAccessor() [2/2]

ImageVtkWriteAccessor* mitk::ImageDataItem::GetVtkImageAccessor ( ImagePointer  )

◆ InternalClone()

itk::LightObject::Pointer mitk::ImageDataItem::InternalClone ( ) const
override

◆ IsComplete()

bool mitk::ImageDataItem::IsComplete ( ) const
inline

Definition at line 87 of file mitkImageDataItem.h.

◆ Modified()

virtual void mitk::ImageDataItem::Modified ( ) const
virtual

◆ SetComplete()

void mitk::ImageDataItem::SetComplete ( bool  complete)
inline

Definition at line 88 of file mitkImageDataItem.h.

◆ SetManageMemory()

void mitk::ImageDataItem::SetManageMemory ( bool  b)
inline

Definition at line 92 of file mitkImageDataItem.h.

◆ SetTimestep()

void mitk::ImageDataItem::SetTimestep ( int  t)
inline

Definition at line 91 of file mitkImageDataItem.h.

Member Data Documentation

◆ m_Data

unsigned char* mitk::ImageDataItem::m_Data
protected

Definition at line 133 of file mitkImageDataItem.h.

◆ m_IsComplete

bool mitk::ImageDataItem::m_IsComplete
protected

Definition at line 144 of file mitkImageDataItem.h.

◆ m_ManageMemory

bool mitk::ImageDataItem::m_ManageMemory
protected

Definition at line 137 of file mitkImageDataItem.h.

◆ m_Offset

int mitk::ImageDataItem::m_Offset
protected

Definition at line 142 of file mitkImageDataItem.h.

◆ m_PixelType

PixelType* mitk::ImageDataItem::m_PixelType
protected

Definition at line 135 of file mitkImageDataItem.h.

◆ m_Size

size_t mitk::ImageDataItem::m_Size
protected

Definition at line 146 of file mitkImageDataItem.h.

◆ m_VtkImageData

vtkImageData* mitk::ImageDataItem::m_VtkImageData
mutableprotected

Definition at line 139 of file mitkImageDataItem.h.

◆ m_VtkImageReadAccessor

ImageVtkReadAccessor* mitk::ImageDataItem::m_VtkImageReadAccessor
mutableprotected

Definition at line 140 of file mitkImageDataItem.h.

◆ m_VtkImageWriteAccessor

ImageVtkWriteAccessor* mitk::ImageDataItem::m_VtkImageWriteAccessor
protected

Definition at line 141 of file mitkImageDataItem.h.


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