PixelDataset Class Reference
[Datasets]

The interface for pixel datasets. More...

#include <pixel_dataset.h>

Inherits Dataset.

Inherited by ImagePixelDataset, and VolumePixelDataset.

Inheritance diagram for PixelDataset:

Inheritance graph
[legend]
Collaboration diagram for PixelDataset:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PixelDataset (dataset_type type, dataset_key_type dataset_key, unsigned char num_dimensions, unsigned char num_bytes_per_pixel)
virtual ~PixelDataset ()
metadata_pointer_type getMetadata () const
virtual external_data_pointer_type getData () const =0 throw (NullPointerException)
virtual unsigned char getNumDimensions () const
unsigned char getNumBytesPerPixel () const
dataset_position_type const & getSize () const
void setFocusPoint (dataset_position_type const &focus_point)
void setFocusPointAt (unsigned char dimension, index_type index) throw (IndexOutOfBoundsException)
dataset_position_type const & getFocusPoint () const
void setSpacings (std::vector< double > spacings)
virtual size_type getNumElements () const
virtual void setIntensity (double window, double level)=0
virtual double getIntensityWindow () const =0 throw (NullPointerException)
virtual double getIntensityLevel () const =0 throw (NullPointerException)
double getMinPixelValue () const
double getMaxPixelValue () const
void setTransformationMatrix (matrix_type const &matrix)
matrix_type const & getTransformationMatrix () const
void setOffsetVector (offset_vector_type const &offset)
offset_vector_type const & getOffsetVector () const

Protected Member Functions

 PixelDataset (PixelDataset const &)

Protected Attributes

unsigned char num_dimensions_
unsigned char num_bytes_per_pixel_
dataset_position_type dataset_size_
dataset_position_type current_focus_point_
std::vector< double > spacings_
double min_pixel_value_
double max_pixel_value_
matrix_type transformation_matrix_
offset_vector_type offset_vector_

Detailed Description

The interface for pixel datasets.

The interface for datasets of arbitrary dimension.

Author:
Tobias Gross (tobias.gross@imedgine.org)

Christian Koerner (christian.koerner@imedgine.org)

Alexander Lex (alexander.lex@imedgine.org)

Marc Streit (marc.streit@imedgine.org)

Martin Reininger (martin.reininger@imedgine.org)

See also:
ImageDataset, VolumeDataset

Definition at line 48 of file pixel_dataset.h.


Constructor & Destructor Documentation

PixelDataset dataset_type  type,
dataset_key_type  dataset_key,
unsigned char  num_dimensions,
unsigned char  num_bytes_per_pixel
 

Constructor

Parameters:
type The type of the dataset
dataset_key The unique key of the dataset
num_dimensions The number of dimensions of the dataset
num_bytes_per_pixel The number of bytes used to store one pixel

Definition at line 53 of file pixel_dataset.cpp.

~PixelDataset  )  [virtual]
 

Destructor

Definition at line 79 of file pixel_dataset.cpp.

PixelDataset PixelDataset const &   )  [protected]
 

Copy constructor

Definition at line 72 of file pixel_dataset.cpp.


Member Function Documentation

virtual external_data_pointer_type getData  )  const throw (NullPointerException) [pure virtual]
 

Returns a pointer to the raw data held by the dataset.

Returns:
A pointer to the dataset

Implemented in FourByteImagePixelDataset, FourByteVolumePixelDataset, OneByteImagePixelDataset, OneByteVolumePixelDataset, TwoByteImagePixelDataset, and TwoByteVolumePixelDataset.

dataset_position_type const & getFocusPoint  )  const
 

Return the current n dimensional focus point within the dataset.

Returns:
A reference to the current focus point (NOTE: The returned reference can also be used to set the values of single dimensions)

Definition at line 152 of file pixel_dataset.cpp.

References PixelDataset::current_focus_point_.

virtual double getIntensityLevel  )  const throw (NullPointerException) [pure virtual]
 

Return the intensity level of the dataset.

Returns:
The intensity level (pixel value in the center of the window)

Implemented in FourByteImagePixelDataset, FourByteVolumePixelDataset, OneByteImagePixelDataset, OneByteVolumePixelDataset, TwoByteImagePixelDataset, and TwoByteVolumePixelDataset.

virtual double getIntensityWindow  )  const throw (NullPointerException) [pure virtual]
 

Return the intensity window of the dataset.

Returns:
The intensity window (pixel value range)

Implemented in FourByteImagePixelDataset, FourByteVolumePixelDataset, OneByteImagePixelDataset, OneByteVolumePixelDataset, TwoByteImagePixelDataset, and TwoByteVolumePixelDataset.

double getMaxPixelValue  )  const
 

Return the maximum pixel value of the dataset.

Returns:
The maximum pixel value of the dataset.

Definition at line 181 of file pixel_dataset.cpp.

References PixelDataset::max_pixel_value_.

metadata_pointer_type getMetadata  )  const [virtual]
 

Returns the metadata for this dataset

Returns:
The metadata of this dataset

Implements Dataset.

Definition at line 85 of file pixel_dataset.cpp.

References PixelDataset::dataset_size_, PixelDataset::num_bytes_per_pixel_, PixelDataset::num_dimensions_, and PixelDataset::spacings_.

double getMinPixelValue  )  const
 

Return the mimimum pixel value of the dataset.

Returns:
The mimimum pixel value of the dataset.

Definition at line 174 of file pixel_dataset.cpp.

References PixelDataset::min_pixel_value_.

unsigned char getNumBytesPerPixel  )  const
 

Get the number of bytes used to store one pixel of the datasets

Definition at line 113 of file pixel_dataset.cpp.

References PixelDataset::num_bytes_per_pixel_.

unsigned char getNumDimensions  )  const [virtual]
 

Return the number of dimensions of the dataset.

Returns:
The number of dimensions

Definition at line 106 of file pixel_dataset.cpp.

References PixelDataset::num_dimensions_.

size_type getNumElements  )  const [virtual]
 

Returns the number of elements within the PixelDataset.

Returns:
The number of elements

Definition at line 93 of file pixel_dataset.cpp.

References PixelDataset::dataset_size_, and PixelDataset::num_dimensions_.

offset_vector_type const & getOffsetVector  )  const
 

Returns the 3 dimensional offset vector of the affine transform slices are subjected to (Without an prior call to setOffsetVector a null vector will be used)

Returns:
The 3 dimensional offset vector

Definition at line 209 of file pixel_dataset.cpp.

References PixelDataset::offset_vector_.

dataset_position_type const & getSize  )  const
 

Returns a vector storing the number of pixels in each dimension of the dataset

Returns:
The size of the volume

Definition at line 120 of file pixel_dataset.cpp.

References PixelDataset::dataset_size_.

matrix_type const & getTransformationMatrix  )  const
 

Returns the 3x3 transformation matrix of the affine transform slices are subjected to (Without an prior call to setTransformationMatrix this will always be the identity matrix).

Returns:
The 3x3 transformation matrix

Definition at line 195 of file pixel_dataset.cpp.

References PixelDataset::transformation_matrix_.

void setFocusPoint dataset_position_type const &  focus_point  ) 
 

Set the current n dimensional focus point within the dataset.

Parameters:
focus_point The new focus point

Definition at line 127 of file pixel_dataset.cpp.

References PixelDataset::current_focus_point_.

void setFocusPointAt unsigned char  dimension,
index_type  index
throw (IndexOutOfBoundsException)
 

Set one dimension of the current n dimensional focus point within the dataset.

Parameters:
dimension The dimension to set
index The new index to set for this dimension

Definition at line 135 of file pixel_dataset.cpp.

virtual void setIntensity double  window,
double  level
[pure virtual]
 

Set the intensity window and level for the dataset.

Parameters:
window The window (pixel value range) to set
level The level (pixel value in the center of the window) to set

Implemented in FourByteImagePixelDataset, FourByteVolumePixelDataset, OneByteImagePixelDataset, OneByteVolumePixelDataset, TwoByteImagePixelDataset, and TwoByteVolumePixelDataset.

void setOffsetVector offset_vector_type const &  offset  ) 
 

Sets the 3 dimensional offset vector of the affine transform slices are subjected to (If not explicitly specified there is no offset)

Parameters:
offset The 3 dimensional offset vector

Reimplemented in VolumePixelDataset.

Definition at line 202 of file pixel_dataset.cpp.

References PixelDataset::offset_vector_.

Referenced by VolumePixelDataset::setOffsetVector().

void setSpacings std::vector< double >  spacings  ) 
 

Set the pixel spacings

Parameters:
spacings A vector defining the pixel spacing in each dimension

Definition at line 159 of file pixel_dataset.cpp.

References PixelDataset::num_dimensions_, and PixelDataset::spacings_.

void setTransformationMatrix matrix_type const &  matrix  ) 
 

Sets the 3x3 transformation matrix of the affine transform slices are subjected to (If not explicitly specified the identity matrix is used)

Parameters:
matrix The 3x3 transformation matrix

Reimplemented in VolumePixelDataset.

Definition at line 188 of file pixel_dataset.cpp.

References PixelDataset::transformation_matrix_.

Referenced by VolumePixelDataset::setTransformationMatrix().


Member Data Documentation

dataset_position_type current_focus_point_ [protected]
 

The current n-dimensional focus position within the dataset

Definition at line 243 of file pixel_dataset.h.

Referenced by PixelDataset::getFocusPoint(), and PixelDataset::setFocusPoint().

dataset_position_type dataset_size_ [protected]
 

A vector storing the number of pixels in each dimension

Definition at line 237 of file pixel_dataset.h.

Referenced by PixelDataset::getMetadata(), PixelDataset::getNumElements(), and PixelDataset::getSize().

double max_pixel_value_ [protected]
 

The maximum pixel value within the volume

Definition at line 262 of file pixel_dataset.h.

Referenced by PixelDataset::getMaxPixelValue(), TwoByteVolumePixelDataset::setDatasetInternal(), TwoByteImagePixelDataset::setDatasetInternal(), OneByteVolumePixelDataset::setDatasetInternal(), OneByteImagePixelDataset::setDatasetInternal(), FourByteVolumePixelDataset::setDatasetInternal(), and FourByteImagePixelDataset::setDatasetInternal().

double min_pixel_value_ [protected]
 

The minimum pixel value within the volume

Definition at line 255 of file pixel_dataset.h.

Referenced by PixelDataset::getMinPixelValue(), TwoByteVolumePixelDataset::setDatasetInternal(), OneByteVolumePixelDataset::setDatasetInternal(), and FourByteVolumePixelDataset::setDatasetInternal().

unsigned char num_bytes_per_pixel_ [protected]
 

The number of bytes used to store one pixel (voxel) of the dataset

Definition at line 231 of file pixel_dataset.h.

Referenced by PixelDataset::getMetadata(), and PixelDataset::getNumBytesPerPixel().

unsigned char num_dimensions_ [protected]
 

The number of dimensions of the dataset

Definition at line 225 of file pixel_dataset.h.

Referenced by PixelDataset::getMetadata(), PixelDataset::getNumDimensions(), PixelDataset::getNumElements(), and PixelDataset::setSpacings().

offset_vector_type offset_vector_ [protected]
 

The 3 dimensional offset vector of the affine transform

Definition at line 274 of file pixel_dataset.h.

Referenced by PixelDataset::getOffsetVector(), and PixelDataset::setOffsetVector().

std::vector<double> spacings_ [protected]
 

The pixel spacings

Definition at line 249 of file pixel_dataset.h.

Referenced by PixelDataset::getMetadata(), and PixelDataset::setSpacings().

matrix_type transformation_matrix_ [protected]
 

The 3x3 transformation matrix of the affine transform

Definition at line 268 of file pixel_dataset.h.

Referenced by PixelDataset::getTransformationMatrix(), and PixelDataset::setTransformationMatrix().


The documentation for this class was generated from the following files:
Generated on Sun Aug 13 18:20:02 2006 for iMEDgine by  doxygen 1.4.6