Medical Imaging Interaction Toolkit  2016.11.0
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
 
virtual 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, vcl_size_t offset=0)
 
 ~ImageDataItem ()
 
 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)
 
void * GetData () const
 
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
 
unsigned long GetSize () const
 
virtual void Modified () const
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 

Protected Attributes

unsigned char * m_Data
 
PixelTypem_PixelType
 
bool m_ManageMemory
 
vtkImageData * m_VtkImageData
 
ImageVtkReadAccessorm_VtkImageReadAccessor
 
ImageVtkWriteAccessorm_VtkImageWriteAccessor
 
int m_Offset
 
bool m_IsComplete
 
unsigned long 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 (ipPicDescriptor, 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 also used to convert ipPic images to vtkImageData.

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 51 of file mitkImageDataItem.h.

Member Typedef Documentation

Definition at line 69 of file mitkImageDataItem.h.

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

Definition at line 69 of file mitkImageDataItem.h.

Constructor & Destructor Documentation

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

Definition at line 38 of file mitkImageDataItem.cpp.

References m_Data, and m_Size.

mitk::ImageDataItem::~ImageDataItem ( )

Definition at line 78 of file mitkImageDataItem.cpp.

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

Definition at line 102 of file mitkImageDataItem.cpp.

References m_Data, m_ManageMemory, and m_Size.

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

Definition at line 136 of file mitkImageDataItem.cpp.

References m_Data, m_ManageMemory, and m_Size.

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

Definition at line 171 of file mitkImageDataItem.cpp.

References MAX_IMAGE_DIMENSIONS.

Member Function Documentation

Pointer mitk::ImageDataItem::Clone ( ) const
void mitk::ImageDataItem::ConstructVtkImageData ( ImageConstPointer  iP) const
virtual

Definition at line 207 of file mitkImageDataItem.cpp.

References mitk::BaseGeometry::GetSpacing(), and mitk::New().

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

Definition at line 69 of file mitkImageDataItem.h.

virtual const char* mitk::ImageDataItem::GetClassName ( ) const
virtual
void* mitk::ImageDataItem::GetData ( ) const
inline
Deprecated:
(as of 2012_09) Please use image accessors instead: See Doxygen/Related-Pages/Concepts/Image. This method can be replaced by ImageWriteAccessor::GetData() or ImageReadAccessor::GetData()

Definition at line 98 of file mitkImageDataItem.h.

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

Definition at line 106 of file mitkImageDataItem.h.

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

Definition at line 131 of file mitkImageDataItem.h.

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

Definition at line 101 of file mitkImageDataItem.h.

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

Definition at line 117 of file mitkImageDataItem.h.

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

Definition at line 102 of file mitkImageDataItem.h.

unsigned long mitk::ImageDataItem::GetSize ( ) const
inline

Definition at line 134 of file mitkImageDataItem.h.

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

Definition at line 69 of file mitkImageDataItem.h.

mitk::ImageVtkReadAccessor * mitk::ImageDataItem::GetVtkImageAccessor ( ImageConstPointer  iP) 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

Definition at line 314 of file mitkImageDataItem.cpp.

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

Definition at line 327 of file mitkImageDataItem.cpp.

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

Definition at line 191 of file mitkImageDataItem.cpp.

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

Definition at line 99 of file mitkImageDataItem.h.

Referenced by ThreadMethod().

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

Definition at line 308 of file mitkImageDataItem.cpp.

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

Definition at line 100 of file mitkImageDataItem.h.

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

Definition at line 104 of file mitkImageDataItem.h.

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

Definition at line 103 of file mitkImageDataItem.h.

Member Data Documentation

unsigned char* mitk::ImageDataItem::m_Data
protected
bool mitk::ImageDataItem::m_IsComplete
protected

Definition at line 149 of file mitkImageDataItem.h.

bool mitk::ImageDataItem::m_ManageMemory
protected

Definition at line 142 of file mitkImageDataItem.h.

Referenced by ImageDataItem().

int mitk::ImageDataItem::m_Offset
protected

Definition at line 147 of file mitkImageDataItem.h.

PixelType* mitk::ImageDataItem::m_PixelType
protected

Definition at line 140 of file mitkImageDataItem.h.

unsigned long mitk::ImageDataItem::m_Size
protected
vtkImageData* mitk::ImageDataItem::m_VtkImageData
mutableprotected

Definition at line 144 of file mitkImageDataItem.h.

ImageVtkReadAccessor* mitk::ImageDataItem::m_VtkImageReadAccessor
mutableprotected

Definition at line 145 of file mitkImageDataItem.h.

ImageVtkWriteAccessor* mitk::ImageDataItem::m_VtkImageWriteAccessor
protected

Definition at line 146 of file mitkImageDataItem.h.


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