plastimatch
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Plm_image_header Class Reference

The Plm_image_header class defines the geometry of an image.
It defines image origin, spacing, dimensions, and direction cosines, but does not contain image voxels. More...

#include <plm_image_header.h>

Public Member Functions

 Plm_image_header ()
 
 Plm_image_header (plm_long dim[3], float origin[3], float spacing[3])
 
 Plm_image_header (plm_long dim[3], float origin[3], float spacing[3], float direction_cosines[9])
 
 Plm_image_header (const RegionType &region, const OriginType &origin, const SpacingType &spacing, const DirectionType &direction)
 
 Plm_image_header (Plm_image *pli)
 
 Plm_image_header (const Plm_image &pli)
 
 Plm_image_header (const Plm_image::Pointer &pli)
 
 Plm_image_header (const Volume_header &vh)
 
 Plm_image_header (const Volume::Pointer &vol)
 
 Plm_image_header (const Volume &vol)
 
 Plm_image_header (const Volume *vol)
 
 Plm_image_header (Volume *vol)
 
template<class T >
 Plm_image_header (T image)
 
 Plm_image_header (const Plm_image_header &)
 
 ~Plm_image_header ()
 
const Plm_image_headeroperator= (const Plm_image_header &)
 
int dim (int d) const
 
float origin (int d) const
 
float spacing (int d) const
 
void set_dim (const plm_long dim[3])
 
void set_origin (const float origin[3])
 
void set_origin (const OriginType &origin)
 
void set_spacing (const float spacing[3])
 
void set_direction_cosines (const float direction_cosines[9])
 
void set_direction_cosines (const Direction_cosines &dc)
 
void set (const Plm_image_header &src)
 
void set (const plm_long dim[3], const float origin[3], const float spacing[3], const Direction_cosines &dc)
 
void set (const plm_long dim[3], const float origin[3], const float spacing[3], const float direction_cosines[9])
 
void set_from_gpuit (const plm_long dim[3], const float origin[3], const float spacing[3], const float direction_cosines[9])
 
void set_from_gpuit_bspline (Bspline_xform *bxf)
 
void set_from_plm_image (const Plm_image *pli)
 
void set_from_plm_image (const Plm_image &pli)
 
void set_from_plm_image (const Plm_image::Pointer &pli)
 
void set_from_volume_header (const Volume_header &vh)
 
void set (const Volume_header &vh)
 
void set (const Volume::Pointer &vol)
 
void set (const Volume &vol)
 
void set (const Volume *vol)
 
void set (const RegionType &region, const OriginType &origin, const SpacingType &spacing, const DirectionType &direction)
 
template<class T >
void set_from_itk_image (const T &image)
 
template<class T >
void set_from_itk_image (const T *image)
 
const OriginTypeGetOrigin () const
 
const SpacingTypeGetSpacing () const
 
const RegionTypeGetRegion () const
 
const DirectionTypeGetDirection () const
 
const SizeTypeGetSize (void) const
 
void get_volume_header (Volume_header *vh) const
 
void get_origin (float origin[3]) const
 
void get_spacing (float spacing[3]) const
 
void get_dim (plm_long dim[3]) const
 
void get_direction_cosines (float direction_cosines[9]) const
 
void expand_to_contain (const FloatPoint3DType &position)
 Expand existing geometry to contain the specified point. Only origin and dimensions can change, spacing and direction cosines will stay the same.
 
void set_geometry_to_contain (const Plm_image_header &reference_pih, const Plm_image_header &compare_pih)
 Create a new geometry that can contain both the reference and compare image, with direction cosines and voxel spacing of the reference image.
 
void print (void) const
 
FloatPoint3DType get_index (const FloatPoint3DType &pos) const
 
FloatPoint3DType get_position (const float index[3]) const
 
void get_image_center (float center[3]) const
 
plm_long get_num_voxels () const
 Get the number of voxels in the image.
 
void get_image_extent (float extent[3]) const
 Get the physical extent (size) of the image, from first voxel center to last voxel center. Extent is zero if only one voxel.
 

Static Public Member Functions

static void clone (Plm_image_header *dest, const Plm_image_header *src)
 
static bool compare (const Plm_image_header *pli1, const Plm_image_header *pli2, float threshold=1e-5)
 Return true if the two headers are the same. Tolerance on origin and spacing can be specified using the threshold parameter.
 
static bool compare (const Plm_image_header &pli1, const Plm_image_header &pli2, float threshold=1e-5)
 

Public Attributes

Plm_image_header_private * d_ptr
 

Detailed Description

The Plm_image_header class defines the geometry of an image.
It defines image origin, spacing, dimensions, and direction cosines, but does not contain image voxels.

Constructor & Destructor Documentation

◆ Plm_image_header() [1/14]

Plm_image_header::Plm_image_header ( )

◆ Plm_image_header() [2/14]

Plm_image_header::Plm_image_header ( plm_long  dim[3],
float  origin[3],
float  spacing[3] 
)

◆ Plm_image_header() [3/14]

Plm_image_header::Plm_image_header ( plm_long  dim[3],
float  origin[3],
float  spacing[3],
float  direction_cosines[9] 
)

◆ Plm_image_header() [4/14]

Plm_image_header::Plm_image_header ( const RegionType region,
const OriginType origin,
const SpacingType spacing,
const DirectionType direction 
)

◆ Plm_image_header() [5/14]

Plm_image_header::Plm_image_header ( Plm_image pli)

◆ Plm_image_header() [6/14]

Plm_image_header::Plm_image_header ( const Plm_image pli)

◆ Plm_image_header() [7/14]

Plm_image_header::Plm_image_header ( const Plm_image::Pointer &  pli)

◆ Plm_image_header() [8/14]

Plm_image_header::Plm_image_header ( const Volume_header vh)

◆ Plm_image_header() [9/14]

Plm_image_header::Plm_image_header ( const Volume::Pointer &  vol)

◆ Plm_image_header() [10/14]

Plm_image_header::Plm_image_header ( const Volume vol)

◆ Plm_image_header() [11/14]

Plm_image_header::Plm_image_header ( const Volume vol)

◆ Plm_image_header() [12/14]

Plm_image_header::Plm_image_header ( Volume vol)

◆ Plm_image_header() [13/14]

template<class T >
Plm_image_header::Plm_image_header ( image)

◆ Plm_image_header() [14/14]

Plm_image_header::Plm_image_header ( const Plm_image_header other)

◆ ~Plm_image_header()

Plm_image_header::~Plm_image_header ( )

Member Function Documentation

◆ clone()

void Plm_image_header::clone ( Plm_image_header dest,
const Plm_image_header src 
)
static

◆ compare() [1/2]

bool Plm_image_header::compare ( const Plm_image_header pli1,
const Plm_image_header pli2,
float  threshold = 1e-5 
)
static

◆ compare() [2/2]

bool Plm_image_header::compare ( const Plm_image_header pli1,
const Plm_image_header pli2,
float  threshold = 1e-5 
)
static

Return true if the two headers are the same. Tolerance on origin and spacing can be specified using the threshold parameter.

◆ dim()

int Plm_image_header::dim ( int  d) const

◆ expand_to_contain()

void Plm_image_header::expand_to_contain ( const FloatPoint3DType position)

Expand existing geometry to contain the specified point. Only origin and dimensions can change, spacing and direction cosines will stay the same.

◆ get_dim()

void Plm_image_header::get_dim ( plm_long  dim[3]) const

◆ get_direction_cosines()

void Plm_image_header::get_direction_cosines ( float  direction_cosines[9]) const

◆ get_image_center()

void Plm_image_header::get_image_center ( float  center[3]) const

◆ get_image_extent()

void Plm_image_header::get_image_extent ( float  extent[3]) const

Get the physical extent (size) of the image, from first voxel center to last voxel center. Extent is zero if only one voxel.

◆ get_index()

FloatPoint3DType Plm_image_header::get_index ( const FloatPoint3DType pos) const

◆ get_num_voxels()

plm_long Plm_image_header::get_num_voxels ( void  ) const

Get the number of voxels in the image.

◆ get_origin()

void Plm_image_header::get_origin ( float  origin[3]) const

◆ get_position()

FloatPoint3DType Plm_image_header::get_position ( const float  index[3]) const

◆ get_spacing()

void Plm_image_header::get_spacing ( float  spacing[3]) const

◆ get_volume_header()

void Plm_image_header::get_volume_header ( Volume_header vh) const

◆ GetDirection()

const DirectionType & Plm_image_header::GetDirection ( ) const

◆ GetOrigin()

const OriginType & Plm_image_header::GetOrigin ( ) const

◆ GetRegion()

const RegionType & Plm_image_header::GetRegion ( ) const

◆ GetSize()

const SizeType & Plm_image_header::GetSize ( void  ) const

◆ GetSpacing()

const SpacingType & Plm_image_header::GetSpacing ( ) const

◆ operator=()

const Plm_image_header & Plm_image_header::operator= ( const Plm_image_header other)

◆ origin()

float Plm_image_header::origin ( int  d) const

◆ print()

void Plm_image_header::print ( void  ) const

◆ set() [1/8]

void Plm_image_header::set ( const Plm_image_header src)

◆ set() [2/8]

void Plm_image_header::set ( const plm_long  dim[3],
const float  origin[3],
const float  spacing[3],
const Direction_cosines dc 
)

◆ set() [3/8]

void Plm_image_header::set ( const plm_long  dim[3],
const float  origin[3],
const float  spacing[3],
const float  direction_cosines[9] 
)

◆ set() [4/8]

void Plm_image_header::set ( const RegionType region,
const OriginType origin,
const SpacingType spacing,
const DirectionType direction 
)

◆ set() [5/8]

void Plm_image_header::set ( const Volume vol)

◆ set() [6/8]

void Plm_image_header::set ( const Volume vol)

◆ set() [7/8]

void Plm_image_header::set ( const Volume::Pointer &  vol)

◆ set() [8/8]

void Plm_image_header::set ( const Volume_header vh)

◆ set_dim()

void Plm_image_header::set_dim ( const plm_long  dim[3])

◆ set_direction_cosines() [1/2]

void Plm_image_header::set_direction_cosines ( const Direction_cosines dc)

◆ set_direction_cosines() [2/2]

void Plm_image_header::set_direction_cosines ( const float  direction_cosines[9])

◆ set_from_gpuit()

void Plm_image_header::set_from_gpuit ( const plm_long  dim[3],
const float  origin[3],
const float  spacing[3],
const float  direction_cosines[9] 
)

◆ set_from_gpuit_bspline()

void Plm_image_header::set_from_gpuit_bspline ( Bspline_xform bxf)

◆ set_from_itk_image() [1/2]

template<class T >
void Plm_image_header::set_from_itk_image ( const T &  image)

◆ set_from_itk_image() [2/2]

template<class T >
void Plm_image_header::set_from_itk_image ( const T *  image)

◆ set_from_plm_image() [1/3]

void Plm_image_header::set_from_plm_image ( const Plm_image pli)

◆ set_from_plm_image() [2/3]

void Plm_image_header::set_from_plm_image ( const Plm_image pli)

◆ set_from_plm_image() [3/3]

void Plm_image_header::set_from_plm_image ( const Plm_image::Pointer &  pli)

◆ set_from_volume_header()

void Plm_image_header::set_from_volume_header ( const Volume_header vh)

◆ set_geometry_to_contain()

void Plm_image_header::set_geometry_to_contain ( const Plm_image_header reference_pih,
const Plm_image_header compare_pih 
)

Create a new geometry that can contain both the reference and compare image, with direction cosines and voxel spacing of the reference image.

◆ set_origin() [1/2]

void Plm_image_header::set_origin ( const float  origin[3])

◆ set_origin() [2/2]

void Plm_image_header::set_origin ( const OriginType origin)
inline

◆ set_spacing()

void Plm_image_header::set_spacing ( const float  spacing[3])

◆ spacing()

float Plm_image_header::spacing ( int  d) const

Member Data Documentation

◆ d_ptr

Plm_image_header_private* Plm_image_header::d_ptr

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