Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ChannelDescriptor Class Reference

An object which holds all essential information about a single channel of an Image. More...

#include <mitkChannelDescriptor.h>

Collaboration diagram for mitk::ChannelDescriptor:

Public Member Functions

 ChannelDescriptor (mitk::PixelType type, vcl_size_t numOfElements, bool allocate=false)
 
 ~ChannelDescriptor ()
 
PixelType GetPixelType () const
 Get the type of channel's elements. More...
 
vcl_size_t GetSize () const
 Get the size in bytes of the channel. More...
 
unsigned char * GetData () const
 Get the pointer to the actual data of the channel. More...
 

Protected Member Functions

void SetData (void *dataPtr)
 
void AllocateData ()
 

Protected Attributes

std::string m_Name
 
PixelType m_PixelType
 
vcl_size_t m_Size
 
unsigned char * m_Data
 

Detailed Description

An object which holds all essential information about a single channel of an Image.

The channel descriptor is designed to be used only as a part of the ImageDescriptor. A consequence to this is that the ChannelDescriptor does not hold the geometry information, only the PixelType. The pixel type is the single information that can differ among an image with multiple channels.

Definition at line 31 of file mitkChannelDescriptor.h.

Constructor & Destructor Documentation

mitk::ChannelDescriptor::ChannelDescriptor ( mitk::PixelType  type,
vcl_size_t  numOfElements,
bool  allocate = false 
)

Definition at line 19 of file mitkChannelDescriptor.cpp.

mitk::ChannelDescriptor::~ChannelDescriptor ( )

Definition at line 25 of file mitkChannelDescriptor.cpp.

Member Function Documentation

void mitk::ChannelDescriptor::AllocateData ( )
protected

Definition at line 54 of file mitkChannelDescriptor.cpp.

unsigned char* mitk::ChannelDescriptor::GetData ( ) const
inline

Get the pointer to the actual data of the channel.

Warning
Such access to the image's data is not safe and will be replaced

Definition at line 47 of file mitkChannelDescriptor.h.

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

Get the type of channel's elements.

Definition at line 39 of file mitkChannelDescriptor.h.

Referenced by mitk::ImageDescriptor::GetChannelTypeById(), and QmitkAdaptiveRegionGrowingToolGUI::OnPointAdded().

vcl_size_t mitk::ChannelDescriptor::GetSize ( ) const
inline

Get the size in bytes of the channel.

Definition at line 41 of file mitkChannelDescriptor.h.

void mitk::ChannelDescriptor::SetData ( void *  dataPtr)
inlineprotected

Definition at line 52 of file mitkChannelDescriptor.h.

Member Data Documentation

unsigned char* mitk::ChannelDescriptor::m_Data
protected

Pointer to the data of the channel

Warning
Not safe

Definition at line 78 of file mitkChannelDescriptor.h.

std::string mitk::ChannelDescriptor::m_Name
protected

Name of the channel

Definition at line 63 of file mitkChannelDescriptor.h.

PixelType mitk::ChannelDescriptor::m_PixelType
protected

The type of each element of the channel

See also
PixelType

Definition at line 68 of file mitkChannelDescriptor.h.

vcl_size_t mitk::ChannelDescriptor::m_Size
protected

Size of the channel in bytes

Definition at line 71 of file mitkChannelDescriptor.h.


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