Holds all essential metadata about an Image object.
More...
#include <mitkImageDescriptor.h>
Holds all essential metadata about an Image object.
The ImageDescriptor stores a vector of ChannelDescriptor objects together with the image's dimension sizes. The general assumption is that every channel of an image shares the same geometry; only the pixel type may differ between channels.
- See also
- Image, ChannelDescriptor, PixelType
Definition at line 40 of file mitkImageDescriptor.h.
◆ ImageDescriptor()
| mitk::ImageDescriptor::ImageDescriptor |
( |
| ) |
|
|
protected |
◆ ~ImageDescriptor()
| mitk::ImageDescriptor::~ImageDescriptor |
( |
| ) |
|
|
inlineoverrideprotected |
◆ AddNewChannel()
| void mitk::ImageDescriptor::AddNewChannel |
( |
mitk::PixelType |
ptype, |
|
|
const char * |
name = nullptr |
|
) |
| |
Add a new channel to this image descriptor.
The channel's element count is computed from the current dimension sizes. If no name is given, a default name "Unnamed [PixelTypeName]" is assigned.
- Parameters
-
| [in] | ptype | The pixel type of the new channel. |
| [in] | name | Optional human-readable name for the channel. |
◆ Clone()
| Pointer mitk::ImageDescriptor::Clone |
( |
| ) |
const |
◆ GetChannelDescriptor()
| ChannelDescriptor mitk::ImageDescriptor::GetChannelDescriptor |
( |
unsigned int |
id = 0 | ) |
const |
Get the ChannelDescriptor for a specific channel.
- Parameters
-
| [in] | id | Zero-based channel index (default: 0). |
- Returns
- A copy of the ChannelDescriptor.
- Exceptions
-
| std::invalid_argument | If id exceeds the number of active channels. |
◆ GetChannelName()
| const std::string mitk::ImageDescriptor::GetChannelName |
( |
unsigned int |
id | ) |
const |
Get the name of a channel by its index.
If the channel name was not explicitly set, the returned string is "Unnamed [PixelTypeName]". Returns "Out-of-range-access" if id exceeds the channel count.
- Parameters
-
| [in] | id | Zero-based channel index. |
- Returns
- The channel name string.
- See also
- PixelType, ChannelDescriptor
◆ GetChannelTypeById()
| PixelType mitk::ImageDescriptor::GetChannelTypeById |
( |
unsigned int |
id | ) |
const |
Get the pixel type of a channel identified by index.
- Parameters
-
| [in] | id | Zero-based channel index. |
- Returns
- The PixelType of the specified channel.
- Exceptions
-
| std::invalid_argument | If id exceeds the number of active channels. |
◆ GetChannelTypeByName()
| PixelType mitk::ImageDescriptor::GetChannelTypeByName |
( |
const char * |
name | ) |
const |
Get the pixel type of a channel identified by name.
- Parameters
-
| [in] | name | The channel name to search for. |
- Returns
- The PixelType of the matching channel.
- Exceptions
-
| std::invalid_argument | If no channel with the given name is found. |
◆ GetDimensions()
| const unsigned int* mitk::ImageDescriptor::GetDimensions |
( |
| ) |
const |
|
inline |
Get the array of dimension sizes.
The returned C-array always has MAX_IMAGE_DIMENSIONS elements. Unused dimensions are set to 1.
- Returns
- Pointer to the internal dimension size array.
Definition at line 85 of file mitkImageDescriptor.h.
◆ GetNumberOfChannels()
| unsigned int mitk::ImageDescriptor::GetNumberOfChannels |
( |
| ) |
const |
|
inline |
◆ GetNumberOfDimensions()
| unsigned int mitk::ImageDescriptor::GetNumberOfDimensions |
( |
| ) |
const |
|
inline |
Get the number of active dimensions.
The return value does not exceed MAX_IMAGE_DIMENSIONS.
- Returns
- The number of dimensions with meaningful size.
Definition at line 94 of file mitkImageDescriptor.h.
◆ Initialize() [1/2]
| void mitk::ImageDescriptor::Initialize |
( |
const ImageDescriptor::Pointer |
refDescriptor, |
|
|
unsigned int |
channel = 0 |
|
) |
| |
Initialize this descriptor from an existing ImageDescriptor.
Copies dimension information and one channel descriptor from the reference.
- Parameters
-
| [in] | refDescriptor | The source descriptor to copy from. |
| [in] | channel | Index of the channel to copy (default: 0). |
◆ Initialize() [2/2]
| void mitk::ImageDescriptor::Initialize |
( |
const unsigned int * |
dims, |
|
|
const unsigned int |
dim |
|
) |
| |
Initialize the image descriptor with dimension sizes.
- Parameters
-
| [in] | dims | Array of dimension sizes (must have at least dim elements). |
| [in] | dim | Number of dimensions to use (must not exceed MAX_IMAGE_DIMENSIONS). |
◆ mitkClassMacroItkParent()
| mitk::ImageDescriptor::mitkClassMacroItkParent |
( |
ImageDescriptor |
, |
|
|
itk::Object |
|
|
) |
| |
◆ New()
| static Pointer mitk::ImageDescriptor::New |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: