zxhproj v 2.2
zxhproj

zxhImageInfo Class Reference

: record image info ; when copy or remove orientation info, always use method(-2) More...

#include <zxhImageInfo.h>

List of all members.

Public Member Functions

virtual zxhImageInfoClone (zxhImageInfo *&pRet) const
 new an image and clone
virtual void RemoveOrientationInfo ()
 remove orientation or set orientation info to identity
virtual void CopyOrientationInfoFrom (const zxhImageInfo *pSource)
 set orientation correspondingly using source info without guarantee consistent, need to call update afterwards
virtual void SetOrientationQuaternFrom (const zxhImageInfo *pSource)
 set orientation using quatenion paramters
virtual void UpdateOrientationInfo (int iOrientatationMethod)
virtual bool SameDimSizeSpacingAs (const zxhImageInfo *pTest) const
 whether two images have same image and voxel dimensions
virtual bool SameOrientationAs (const zxhImageInfo *pTest) const
 whether two images have same image and voxel dimensions
virtual void GetExtent (float e[]) const
virtual void GetExtent (float worldfrom[], float worldto[]) const
 return the start and end of extent in world coordinates
virtual int GetNumberOfPixels () const
virtual void GetSizeUsingExtent (const float e[ImageDimensionMax], int s[ImageDimensionMax]) const
 get new size if change to different extent
virtual void GetSizeUsingSpacing (const float sp[ImageDimensionMax], int sz[ImageDimensionMax]) const
 get new size if change to different spacing
virtual std::string GetPrintString () const
void WorldToImage (float fv[]) const
void ImageToWorld (float fv[]) const
void ImageToPhysical (float fv[]) const
void PhysicalToImage (float fv[]) const
void ProjectPhysVectorToWorldCoordinate (float &fvx, float &fvy, float &fvz) const
void ProjectWorldVectorToPhysCoordinate (float &fvx, float &fvy, float &fvz) const
int GridToIndex (int ix, int iy, int iz=0, int it=0) const
 image grid indices to imagedata index
void IndexToGrid (const int index, int *ix, int *iy, int *iz=0, int *it=0) const
 image data index to image grid indices

Static Public Member Functions

static short Analyze_to_gipl_type (short analyze_type)
 analyze_to_gipl_type: Convert from Analyze/nifti to gipl image types
static short Gipl_to_analyze_type (short gipl_type)

Public Attributes

std::string FileName
int Dimension
std::string ImageFormat
 image format is related to datatype
zxhushort DataType
 data type, definition is based on GIPL_??? ONLY
int ByteOfDataType
int OrientationMethod
 define orientation method
float Spacing [ImageDimensionMax]
 image spacing info default 1, [0-2] unit is mm, [3]is temporal dimension and unit is ms
int Size [ImageDimensionMax]
 image size default 1, [3] is num. of phases
float Origin [ImageDimensionMax]
 gipl origin
float OrientationRotationMatrix [3][3]
float QuaternFactor
 Quaternion factor, sign of spacingZ step (< 0 is negative, improper left-hand coordinate; >= 0 is positive, proper right-hand coordinate)
float QuaternB
 Quaternion b parameter.
float QuaternC
 Quaternion c parameter.
float QuaternD
 Quaternion d parameter.
float Qoffsetxyz [3]
 Quaternion x,y,z shift.
float ImageToWorldMatrix [4][4]
float WorldToImageMatrix [4][4]

Detailed Description

: record image info ; when copy or remove orientation info, always use method(-2)


Member Function Documentation

void zxhImageInfo::UpdateOrientationInfo ( int  iOrientatationMethod) [virtual]

update orientation method 1,2,-2,3 using given method always assume spacing set, method1 will update all the others, while the others do not update method1 set OrientationMethod at the end


Member Data Documentation

orientation rotation matrix (ORM) ; ORM[0-2][0] is x-axis, ORM[0-2][1] is y-axis, ORM[0-2][2] is z-axis notice that x-axis -> gipl.header[106,110,114]; y-axis -> gipl.header[122,126,130] ImageToWorldMatrix = [identity origin] x [ORM 0] x [scaling matrix] x [identity -(image_size-1)/2]


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs