plastimatch
|
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 ®ion, 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_header & | operator= (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 ®ion, 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 OriginType & | GetOrigin () const |
const SpacingType & | GetSpacing () const |
const RegionType & | GetRegion () const |
const DirectionType & | GetDirection () const |
const SizeType & | GetSize (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 |
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.
Plm_image_header::Plm_image_header | ( | ) |
Plm_image_header::Plm_image_header | ( | plm_long | dim[3], |
float | origin[3], | ||
float | spacing[3] ) |
Plm_image_header::Plm_image_header | ( | plm_long | dim[3], |
float | origin[3], | ||
float | spacing[3], | ||
float | direction_cosines[9] ) |
Plm_image_header::Plm_image_header | ( | const RegionType & | region, |
const OriginType & | origin, | ||
const SpacingType & | spacing, | ||
const DirectionType & | direction ) |
Plm_image_header::Plm_image_header | ( | Plm_image * | pli | ) |
Plm_image_header::Plm_image_header | ( | const Plm_image & | pli | ) |
Plm_image_header::Plm_image_header | ( | const Plm_image::Pointer & | pli | ) |
Plm_image_header::Plm_image_header | ( | const Volume_header & | vh | ) |
Plm_image_header::Plm_image_header | ( | const Volume::Pointer & | vol | ) |
Plm_image_header::Plm_image_header | ( | const Volume & | vol | ) |
Plm_image_header::Plm_image_header | ( | const Volume * | vol | ) |
Plm_image_header::Plm_image_header | ( | Volume * | vol | ) |
Plm_image_header::Plm_image_header | ( | T | image | ) |
Plm_image_header::Plm_image_header | ( | const Plm_image_header & | other | ) |
Plm_image_header::~Plm_image_header | ( | ) |
|
static |
|
static |
|
static |
Return true if the two headers are the same. Tolerance on origin and spacing can be specified using the threshold parameter.
int Plm_image_header::dim | ( | int | d | ) | const |
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.
void Plm_image_header::get_dim | ( | plm_long | dim[3] | ) | const |
void Plm_image_header::get_direction_cosines | ( | float | direction_cosines[9] | ) | const |
void Plm_image_header::get_image_center | ( | float | center[3] | ) | const |
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.
FloatPoint3DType Plm_image_header::get_index | ( | const FloatPoint3DType & | pos | ) | const |
plm_long Plm_image_header::get_num_voxels | ( | void | ) | const |
Get the number of voxels in the image.
void Plm_image_header::get_origin | ( | float | origin[3] | ) | const |
FloatPoint3DType Plm_image_header::get_position | ( | const float | index[3] | ) | const |
void Plm_image_header::get_spacing | ( | float | spacing[3] | ) | const |
void Plm_image_header::get_volume_header | ( | Volume_header * | vh | ) | const |
const DirectionType & Plm_image_header::GetDirection | ( | ) | const |
const OriginType & Plm_image_header::GetOrigin | ( | ) | const |
const RegionType & Plm_image_header::GetRegion | ( | ) | const |
const SizeType & Plm_image_header::GetSize | ( | void | ) | const |
const SpacingType & Plm_image_header::GetSpacing | ( | ) | const |
const Plm_image_header & Plm_image_header::operator= | ( | const Plm_image_header & | other | ) |
float Plm_image_header::origin | ( | int | d | ) | const |
void Plm_image_header::print | ( | void | ) | const |
void Plm_image_header::set | ( | const Plm_image_header & | src | ) |
void Plm_image_header::set | ( | const plm_long | dim[3], |
const float | origin[3], | ||
const float | spacing[3], | ||
const Direction_cosines & | dc ) |
void Plm_image_header::set | ( | const plm_long | dim[3], |
const float | origin[3], | ||
const float | spacing[3], | ||
const float | direction_cosines[9] ) |
void Plm_image_header::set | ( | const RegionType & | region, |
const OriginType & | origin, | ||
const SpacingType & | spacing, | ||
const DirectionType & | direction ) |
void Plm_image_header::set | ( | const Volume & | vol | ) |
void Plm_image_header::set | ( | const Volume * | vol | ) |
void Plm_image_header::set | ( | const Volume::Pointer & | vol | ) |
void Plm_image_header::set | ( | const Volume_header & | vh | ) |
void Plm_image_header::set_dim | ( | const plm_long | dim[3] | ) |
void Plm_image_header::set_direction_cosines | ( | const Direction_cosines & | dc | ) |
void Plm_image_header::set_direction_cosines | ( | const float | direction_cosines[9] | ) |
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] ) |
void Plm_image_header::set_from_gpuit_bspline | ( | Bspline_xform * | bxf | ) |
void Plm_image_header::set_from_itk_image | ( | const T & | image | ) |
void Plm_image_header::set_from_itk_image | ( | const T * | image | ) |
void Plm_image_header::set_from_plm_image | ( | const Plm_image & | pli | ) |
void Plm_image_header::set_from_plm_image | ( | const Plm_image * | pli | ) |
void Plm_image_header::set_from_plm_image | ( | const Plm_image::Pointer & | pli | ) |
void Plm_image_header::set_from_volume_header | ( | const Volume_header & | vh | ) |
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.
void Plm_image_header::set_origin | ( | const float | origin[3] | ) |
|
inline |
void Plm_image_header::set_spacing | ( | const float | spacing[3] | ) |
float Plm_image_header::spacing | ( | int | d | ) | const |
Plm_image_header_private* Plm_image_header::d_ptr |