Medical Imaging Interaction Toolkit  2021.02.99-121d8b57
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 27 of file mitkChannelDescriptor.h.

Constructor & Destructor Documentation

◆ ChannelDescriptor()

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

◆ ~ChannelDescriptor()

mitk::ChannelDescriptor::~ChannelDescriptor ( )

Member Function Documentation

◆ AllocateData()

void mitk::ChannelDescriptor::AllocateData ( )
protected

◆ GetData()

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 43 of file mitkChannelDescriptor.h.

◆ GetPixelType()

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

Get the type of channel's elements.

Definition at line 35 of file mitkChannelDescriptor.h.

◆ GetSize()

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

Get the size in bytes of the channel.

Definition at line 37 of file mitkChannelDescriptor.h.

◆ SetData()

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

Definition at line 48 of file mitkChannelDescriptor.h.

Member Data Documentation

◆ m_Data

unsigned char* mitk::ChannelDescriptor::m_Data
protected

Pointer to the data of the channel

Warning
Not safe

Definition at line 74 of file mitkChannelDescriptor.h.

◆ m_Name

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

Name of the channel

Definition at line 59 of file mitkChannelDescriptor.h.

◆ m_PixelType

PixelType mitk::ChannelDescriptor::m_PixelType
protected

The type of each element of the channel

See also
PixelType

Definition at line 64 of file mitkChannelDescriptor.h.

◆ m_Size

vcl_size_t mitk::ChannelDescriptor::m_Size
protected

Size of the channel in bytes

Definition at line 67 of file mitkChannelDescriptor.h.


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