zxhproj v 2.2
zxhproj

zxh Namespace Reference

zxhRegistration.cpp : Defines the entry point for the console application. More...

Classes

struct  surface_point
struct  zxhmat44

Typedefs

typedef zxhmat44 mat44

Enumerations

enum  TypeHistogramCompute { PDFType_ParzenWindow_BSpline = 1, PDFType_Histogram = 2, PDFType_PV = 3, UniformVolumeHistogram }
enum  TypeMutualInformation { MutualInformation = 1, NormalizedMutualInformation = 2, MixtureProbabilityModel = 3 }
enum  TypeSEMIKernelFunction { SEMIGaussian = -1, SEMIBSplineZeroOrder = 0, SEMIBSpline = 3, SEMIMixtureModel = 10 }
enum  ImageModeling_XYZ {
  ImageModeling_X = 0, ImageModeling_Y = 1, ImageModeling_Z = 2, ImageModeling_T = 3,
  ImageModeling_5D = 4
}
enum  ZXH_TransformType {
  TransformTypeRigid = 0, TransformTypeScale = 1, TransformTypeAffine = 2, TransformTypeFFD = 3,
  TransformTypeSkew = 5, TransformTypeLocalAffine = 10
}

Functions

Users Xiahai work zxhproj v21
src ApplicationFunctions
zxhRegistration cpp void 
RegHELP ()
void RegArg (int argc, char *argv[], zxhRegistrationStruct &StructRegistration, int &dimension)
void RegArgSetRoiForDim2Reg (zxhRegistrationStruct &StructRegistration, int &dimension)
 this is for setting ROI (z-dim=0) for -dim 2 registration
void RegNewOptimiser (zxhRegistrationStruct &StructRegistration, zxhOptimizerGradient *&optimizer)
void RegOptimiseArg (int argc, char *argv[], zxhRegistrationStruct &StructRegistration)
int RegMetricArg (int argc, char *argv[], zxhRegistrationStruct &StructRegistration, zxhMetricBase *&pMetric)
void RegAffineArg (int argc, char *argv[], zxhRegistrationStruct &StructRegistration)
void RegPreSetGlobalAffine (zxhRegistrationStruct &StructRegistration)
 used to be used in zxhlarm, but useless now
void RegSetTransformInfo (zxhRegistrationStruct &StructRegistration)
void SetDilateLocalRegionForIRBReg (zxhTransformLocalAffines *pTransform, float *afLength, bool Dilation)
void RegLocalAffinesBackwardTransformAllTestImages (zxhRegistrationStruct &StructRegistration, zxhTransformBase *&pInverseTransformTestImages)
 Currently only for reg_option -pre i s.TFM.
void InactivateFFDBorders (zxhTransformFFD *pDifferential)
void RegSetDifferentialInfo (zxhRegistrationStruct &StructRegistration)
void SetInfluence2D (zxhTransformAffine *aff)
void RegSet2DInflucence (int iTransType, int dimension, zxhTransformBase *&pTransform, zxhTransformBase *&pDifferential, zxhTransformBase *&pInfluence)
bool RegComputeSimilarity (int argc, char *argv[])
void SetRegOptimizer (zxhOptimizerGradient *optimizer, zxhRegistrationStruct &StructRegistration)
int reg_option (int argc, char *argv[])
void SaveRegistrationMiddleResults (int argc, char *argv[], zxhRegistrationStruct &StructRegistration)
void SaveRegistrationResult (zxhOptimizerBase *pOptimiser, zxhRegistrationStruct &StructRegistration, bool bComputeInverse, float fInvJacWeighting)
void SaveTransform (zxhTransformBase *pTransform, const char *pFilename)
void SaveString2File (std::string str2save, char *pfilename)
void SaveString2File (std::string str2save, std::string filename)
void BackwardTransformImageByList (zxhImageData *pSave, zxhImageData *pImg, zxhTransformBase *pList[], int nTransform, int interpolation, bool bBackground, PixelTypeDefault background)
void ForwardNearestTransformImageByList (zxhImageModelingBase *pTest, zxhImageModelingBase *pRef, zxhImageData *pSave, zxhTransformBase *pList[], int nTransform, int empty)
void ForwardBSplineTransformImageByList (zxhImageData *pTest, zxhImageData *pSave, zxhTransformBase *pList[], int nTransform, int empty)
void __FillEmptyVoxelByLinearMean3D (zxhImageData *pImage, int emptyvoxel, int nSearchSize, int ix, int iy, int iz)
void FillEmptyVoxelByMean3D (zxhImageData *pImage, int emptyvoxel, int nSearchSize, int background)
bool ReadTransformFromFile (zxhTransformBase *&pTransform, std::string file)
bool NewTransformFromTypeName (zxhTransformBase *&pTransform, std::string type)
bool NewMetricFromTypeName (zxhMetricBase *&pMetric, std::string type)
zxhTransformBaseRegriddingLocalAffines (zxhTransformBase *pTjAfter, zxhTransformLocalAffines *pLocalAffinesFirst, zxhImageData *pTestImageTemplate, float *roiWorldFrom, float *roiWorldTo)
 result(X)=pTjAfter( pLocalAffinesFist( X ) )
zxhTransformBaseConcatenateTransformsByExponent (zxhTransformBase *pTrans, int eK, const zxhImageInfo *pImageInfo)
 transform = (pTrans)^(2^eK) where eK>=1; pImageInfo is used as the image reference in transformfield
zxhTransformBaseConcatenateTransforms (zxhTransformBase *pTransList[], int nTrans, int dimension, const float *spacing, const float *extent, const float *roiWorldFrom, const float *roiWorldTo, const zxhImageInfo *pImgInfo)
bool MaskFFDCtrPntStatus (zxhTransformFFDBase *pInfl, zxhTransformBase *pTrans, zxhImageData *pMask, bool bActivate)
float ComputeAverageDisplacement (zxhImageData *pTest, int *iRoiTestFrom, int *iRoiTestTo, zxhImageData *pMaskTest, zxhTransformBase **pTransformList, int nTransforms, zxhImageData *pMaskRef)
 compute the average displacement of a transform
float GetMaskImageVolumeByResample (zxhImageData *pImg, float spacex, float spacey, float spacez)
 volume = pixel_value * voxel_size (only for 3D)
template<class PixelType >
bool SetImageIntensityBetween (zxhImageDataT< PixelType > *pIn, PixelType RangeFrom, PixelType RangeTo, PixelType value, int op, PixelType background=ZXH_Background)
template<class PixelType , class MaskType >
bool MaskTestImageByTrans3D (zxhImageDataT< PixelType > *pIn, zxhImageDataT< MaskType > *pMask, zxhTransformBase *pTrans, float value, int compare, float background, int nRanges, float fRangeFrom[], float fRangeTo[])
template<class PixelType , class MaskType >
bool MaskRefImageByTrans3D (zxhImageDataT< PixelType > *pIn, zxhImageDataT< MaskType > *pMask, zxhTransformBase *pTrans, float value, int compare, float background)
Users Xiahai work zxhproj v21
src ApplicationFunctions
zxhValidation cpp
ZXH_DLL_EXPORT void 
Seg2Binf (zxhImageData *seg, zxhImageDataT< float > *bin)
ZXH_DLL_EXPORT void Binf2Sur (zxhImageDataT< float > *bin, zxhImageData *sur)
ZXH_DLL_EXPORT void TransformImageInverseByDeformField (zxhImageDataT< float > *pInvImg, zxhImageModelingLinearT< float, float > *pRef, zxhImageDataT< float > *pDef[ImageDimensionMax])
ZXH_DLL_EXPORT std::string ComputeRealError (zxhImageData *pTest, zxhTransformBase *pGold, zxhTransformBase *pTrans, int iSaveMedial, std::string strSavePathName, zxhImageData *pMask)
ZXH_DLL_EXPORT std::string ComputeInconsistency (zxhImageData *pTest, zxhTransformBase *pTest2Ref, zxhTransformBase *pRef2Test, int iSaveMedial, std::string strSavePathName, zxhImageData *pMask)
ZXH_DLL_EXPORT std::string ComputeDeformField (zxhImageData *pTest, zxhImageDataT< float > *pDeformMag, zxhImageData *pMask)
ZXH_DLL_EXPORT std::string ComputeDeformField (zxhImageData *pTest, zxhTransformBase *pTest2Ref, int iSaveMedial, std::string strSavePathName, zxhImageData *pMask)
ZXH_DLL_EXPORT std::string ComputeDeformField (zxhImageData *pTest, zxhImageDataT< float > *pDeform[ImageDimensionMax], int iSaveMedial, std::string strSavePathName, zxhImageData *pMask)
ZXH_DLL_EXPORT std::string ComputeSurfaceDistance (zxhImageData *pSurTest, zxhImageData *pSurRef, zxhTransformBase *pTrans, int iSaveMedial, std::string strSaveFileName)
 2010-4-30: ComputeSurfaceDistance seem to be problematic using DisPnt2Triangle which causing 0 distance
ZXH_DLL_EXPORT std::string ComputeSurfaceDistanceClostPoint (zxhImageData *pSurTest, zxhImageData *pSurRef, zxhTransformBase *pTrans, int iSaveMedial, std::string strSaveFileName)
 only compute the point to the close point distance
ZXH_DLL_EXPORT bool ComputeSurfaceDistance (zxhImageData *pSurTest, zxhImageData *pSurRef, zxhTransformBase *pTrans, zxhlfloat &fsum, zxhlfloat &fsqsum, zxhlfloat &fmax, zxhlfloat &fmin, zxhlfloat &nTestSurface, zxhlfloat errorrange[6], zxhImageDataT< float > *pdis_mag)
ZXH_DLL_EXPORT std::string ComputeSurfaceDistanceSwap (zxhImageData *apSurTest[2], zxhImageData *apSurRef[2])
 compute ( (test[0],ref[0]) + (test[1],ref[1]) )/2
float DisPnt2Triangle (float pnt[3], float pTr1[3], float pTr2[3], float pTr3[3])
zxhlfloat DisPnt2Triangle (zxhlfloat pnt[3], zxhlfloat pTr1[3], zxhlfloat pTr2[3], zxhlfloat pTr3[3])
zxhlfloat VOPDistance (int dim, const zxhlfloat *A, const zxhlfloat *B)
void VOPCrossProduct (const zxhlfloat *A, const zxhlfloat *B, zxhlfloat *AxB)
zxhlfloat VOPDotProduct (int dim, const zxhlfloat *A, const zxhlfloat *B)
zxhlfloat VOPVectorLength (int dim, const zxhlfloat *A)
ZXH_DLL_EXPORT float ComputeOverlap (zxhImageDataT< float > *pBinTest, zxhImageDataT< float > *pBinRef, zxhTransformBase *pTrans)
ZXH_DLL_EXPORT float ComputeOverlap (zxhImageDataT< float > *pBinTest, zxhImageDataT< float > *pBinRef, zxhImageDataT< float > *pDeform[ImageDimensionMax])
template<class imagevoxel >
void SelectRoi (zxhImageDataT< imagevoxel > *pImg, const int pFrom[3], const int pTo[3])
template<class type >
void NewMedialImage (zxhImageDataT< type > *pTem, zxhImageDataT< float > *pDim, zxhImageDataT< float > *pMag)
ZXH_DLL_EXPORT void trim_left (std::string &s)
ZXH_DLL_EXPORT void trim_right (std::string &s)
ZXH_DLL_EXPORT void trim_both (std::string &s)
ZXH_DLL_EXPORT void case_upper (std::string &s)
ZXH_DLL_EXPORT void case_lower (std::string &s)
ZXH_DLL_EXPORT bool is_option (std::string s)
ZXH_DLL_EXPORT bool is_digital (std::string s)
 not exactly digital
ZXH_DLL_EXPORT void ParseStringLine (std::string &sContent, std::string &sComment, std::string &strLine)
ZXH_DLL_EXPORT bool FindStringFromStream (char *buffer, int buffersize, std::ifstream &ifs, char *substring)
ZXH_DLL_EXPORT bool NextContentLine (std::string &sContent, char *buffer, int buffersize, std::ifstream &ifs)
ZXH_DLL_EXPORT bool ScanInteger (std::ifstream &ifs, char *buffer, int ibuffersize, int &idata)
ZXH_DLL_EXPORT bool ScanFloat (std::ifstream &ifs, char *buffer, int ibuffersize, float &fdata)
ZXH_DLL_EXPORT bool ScanString (std::ifstream &ifs, char *buffer, int ibuffersize, char *pdata)
ZXH_DLL_EXPORT void Swap2Bytes (void *p)
 swap data
ZXH_DLL_EXPORT void Swap4Bytes (void *p)
ZXH_DLL_EXPORT void Swap8Bytes (void *p)
ZXH_DLL_EXPORT void Swap10Bytes (void *p)
ZXH_DLL_EXPORT void SwapBytes (void *p, unsigned char nbyte)
ZXH_DLL_EXPORT bool fileexists (const std::string filename)
ZXH_DLL_EXPORT std::string GetFileNameNoExtension (const std::string filename)
 end swap data
ZXH_DLL_EXPORT std::string GetExtension (const std::string filename)
 end of swap
ZXH_DLL_EXPORT std::string GetFileNameNoPath (const std::string filename)
ZXH_DLL_EXPORT std::string GetFileNamePath (const std::string filename)
ZXH_DLL_EXPORT float absf (const float f)
ZXH_DLL_EXPORT int round (const float f)
ZXH_DLL_EXPORT float maxf (const float f1, const float f2)
ZXH_DLL_EXPORT float minf (const float f1, const float f2)
ZXH_DLL_EXPORT void echo_arguments (int argc, char *argv[])
ZXH_DLL_EXPORT void echo_zxh ()
ZXH_DLL_EXPORT void NormaliseVector (float v[], int dimension)
ZXH_DLL_EXPORT float MagnitudeOfVector (const float v[], const int dimension)
ZXH_DLL_EXPORT float Gaussian (const float f, const float u, const float sigma)
ZXH_DLL_EXPORT float NGaussian (const float f)
ZXH_DLL_EXPORT void MatrixIdentity (float *pMatDes, const int iMatrixLength)
 matrix op
ZXH_DLL_EXPORT void SetMatrix (float *pMatDes, const float *pMatSrc1, const int iMatrixLength)
ZXH_DLL_EXPORT void MultiplyMatrix (float *pJacDes, const float *pJacSrc1, const float *pJacSrc2, const int iMatrixLength)
ZXH_DLL_EXPORT void MultiplyMatrixVector (float *pVecDes, const float *pMatSrc, const float *pVecSrc, const int iMatrixLength)
ZXH_DLL_EXPORT float DeterminentMatrix3D (const float *pMat, const int iMatrixRowLength)
ZXH_DLL_EXPORT void InvertMatrix3D (float *pInvMat, const float *pForMat, const int iMatrixRowLength)
 assume the arrays are both 3*3=9
ZXH_DLL_EXPORT void InvertMatrix4D3D (zxhmat44 &inv, const zxhmat44 &forward)
ZXH_DLL_EXPORT float BSpline (float u)
ZXH_DLL_EXPORT float BSplineDerivative (float u)
ZXH_DLL_EXPORT float BSplineSecondDerivative (float u)
ZXH_DLL_EXPORT float BSplinei (int iOrd, float u)
ZXH_DLL_EXPORT float DerivativeOfBSplinei (int iOrd, float u)
ZXH_DLL_EXPORT float SecondDerivativeOfBSplinei (int iOrd, float u)
template<class type >
ZXH_DLL_EXPORT bool InclusiveBetween (type value, type from, type to)
template<class TYPE >
ZXH_DLL_EXPORT TYPE abs (TYPE f)
template<class TYPE >
ZXH_DLL_EXPORT TYPE SqaredDistance (TYPE *co1, TYPE *co2, int Dimension)
Users Xiahai work zxhproj v21
src Common zxhLibFunctions cpp
bool 
vtkEuclideanDistanceTransform (zxhImageData *pImage, zxhImageDataT< float > *pDistance, int iForegroundFrom, int iForegroundTo, bool OnForeground, bool ReturnSquare)
void ComputeNormalVectorUsingDistanceTransform (zxhImageData *pImageRegion, zxhImageDataT< float > *pNV)
Users Xiahai work zxhproj v21
src Images zxhImageGipl cpp
bool 
ReadHeader (zxhImageInfo &imageinfo, std::string strFilename, bool showinfo)
template<class PixelType >
bool OpenImage (zxhImageDataT< PixelType > *pImg, std::string strFilename)
template<class PixelType >
bool SaveImage (zxhImageDataT< PixelType > *pImg, zxhushort type, std::string strFilename)
template<class PixelType >
bool SaveImage (zxhImageDataT< PixelType > *pImg, std::string strFilename)
bool TransformWorld2WorldByCollection (zxhTransformBase *pListTransform[], int nTransform, int dimension, const float fWorldFrom[ImageDimensionMax], float fWorldTo[ImageDimensionMax])
bool IsAffTransform (zxhTransformBase *pTrans)
bool IsAffineMatrix (zxhTransformBase *pTrans)
bool IsFFDTransform (std::string type)
bool IsFFDTransform (zxhTransformBase *pTrans)
void ComputeInverseTransformMatrix (zxhTransformMatrix *pMatrixResult, zxhTransformAffine *pTransSource)

Detailed Description

zxhRegistration.cpp : Defines the entry point for the console application.

: proivde methods/functions


Function Documentation

template<class TYPE >
ZXH_DLL_EXPORT TYPE zxh::abs ( TYPE  f)
Returns:
abs value of the type
ZXH_DLL_EXPORT float zxh::absf ( const float  f)
Returns:
abs value of float type
void zxh::BackwardTransformImageByList ( zxhImageData pSave,
zxhImageData pImg,
zxhTransformBase pList[],
int  nTransform,
int  interpolation,
bool  bBackground,
PixelTypeDefault  background 
)
Returns:
backward transform using transform list
backward transform using transform list interpolation: nearest(0), linear(1) bBackground = false, donot use background value but use closest pixel points to fill
ZXH_DLL_EXPORT void zxh::Binf2Sur ( zxhImageDataT< float > *  bin,
zxhImageData sur 
)
Returns:
convert 0-1 float type image into a surface image with short type surface value 1, else 0, if the border is a fraction between 0-1, then round it
ZXH_DLL_EXPORT float zxh::BSpline ( float  u)
Returns:
BSpline
ZXH_DLL_EXPORT float zxh::BSplineDerivative ( float  u)
Returns:
ZXH_DLL_EXPORT float zxh::BSplinei ( int  iOrd,
float  u 
)
Returns:
BSpline
ZXH_DLL_EXPORT void zxh::case_lower ( std::string &  s)
Returns:
modified string to lower case
ZXH_DLL_EXPORT void zxh::case_upper ( std::string &  s)
Returns:
modified string to upper case
ZXH_DLL_EXPORT std::string zxh::ComputeDeformField ( zxhImageData pTest,
zxhImageDataT< float > *  pDeformMag,
zxhImageData pMask 
)
Returns:
ZXH_DLL_EXPORT std::string zxh::ComputeDeformField ( zxhImageData pTest,
zxhTransformBase pTest2Ref,
int  iSaveMedial,
std::string  strSavePathName,
zxhImageData pMask = 0 
)
Returns:
ZXH_DLL_EXPORT std::string zxh::ComputeDeformField ( zxhImageData pTest,
zxhImageDataT< float > *  pDeform[ImageDimensionMax],
int  iSaveMedial,
std::string  strSavePathName,
zxhImageData pMask = 0 
)
Returns:
ZXH_DLL_EXPORT std::string zxh::ComputeInconsistency ( zxhImageData pTest,
zxhTransformBase pTest2Ref,
zxhTransformBase pRef2Test,
int  iSaveMedial,
std::string  strSavePathName,
zxhImageData pMask = 0 
)
Returns:
ZXH_DLL_EXPORT float zxh::ComputeOverlap ( zxhImageDataT< float > *  pBinTest,
zxhImageDataT< float > *  pBinRef,
zxhTransformBase pTrans 
)
Returns:
two float images for the volume,0 is background, 1 is in the volume, for the border might be a fractional 0-1 then the overlap of the boundary is computed as factional voxels union = max(test,ref), intersect=min(test,ref)
ZXH_DLL_EXPORT float zxh::ComputeOverlap ( zxhImageDataT< float > *  pBinTest,
zxhImageDataT< float > *  pBinRef,
zxhImageDataT< float > *  pDeform[ImageDimensionMax] 
)
Returns:
ZXH_DLL_EXPORT std::string zxh::ComputeRealError ( zxhImageData pTest,
zxhTransformBase pGold,
zxhTransformBase pTrans,
int  iSaveMedial,
std::string  strSavePathName,
zxhImageData pMask = 0 
)
Returns:
mask image doesn't need same dimension,size,spacing as pTest
zxhTransformBase * zxh::ConcatenateTransforms ( zxhTransformBase pTransList[],
int  nTrans,
int  dimension,
const float *  spacing,
const float *  extend,
const float *  roiWorldFrom,
const float *  roiWorldTo,
const zxhImageInfo pImgInfo 
)
Returns:
this is fluid-like regridding
zxhTransformBase * zxh::ConcatenateTransformsByExponent ( zxhTransformBase pTrans,
int  eK,
const zxhImageInfo pImageInfo 
)

transform = (pTrans)^(2^eK) where eK>=1; pImageInfo is used as the image reference in transformfield

transform = (pTrans)^eK; pImageInfo is used as the image reference in transformfield

zxhlfloat zxh::DisPnt2Triangle ( zxhlfloat  pnt[3],
zxhlfloat  pTr1[3],
zxhlfloat  pTr2[3],
zxhlfloat  pTr3[3] 
)
Returns:
point to 3-points-surface distance (this 3points could be in a line which causes problem)
ZXH_DLL_EXPORT void zxh::echo_arguments ( int  argc,
char *  argv[] 
)
Returns:
echo the application arguments
void zxh::FillEmptyVoxelByMean3D ( zxhImageData pImage,
int  empyvoxel,
int  nSearchSize,
int  background = 0 
)
Returns:
for atlas forward transform
ZXH_DLL_EXPORT bool zxh::FindStringFromStream ( char *  buffer,
int  buffersize,
std::ifstream &  ifs,
char *  substring 
)
Returns:
find a line with searching string
void zxh::ForwardNearestTransformImageByList ( zxhImageModelingBase pTest,
zxhImageModelingBase pRef,
zxhImageData pSave,
zxhTransformBase pList[],
int  nTransform,
int  empty 
)
Returns:
forward transform using tranform list and nearest interpolation, without fill the empty voxels
ZXH_DLL_EXPORT float zxh::Gaussian ( const float  f,
const float  u,
const float  sigma 
)
Returns:
gaussian
ZXH_DLL_EXPORT std::string zxh::GetExtension ( const std::string  filename)

end of swap

Returns:
extension file name from a string
ZXH_DLL_EXPORT void zxh::InvertMatrix3D ( float *  pInvMat,
const float *  pForMat,
const int  iMatrixRowLength 
)

assume the arrays are both 3*3=9

assume the arrays are both 3*iMatrixRowLength

bool zxh::IsAffTransform ( zxhTransformBase pTrans)
Returns:
whether affine
bool zxh::IsFFDTransform ( zxhTransformBase pTrans)
Returns:
whether FFD based transform
bool zxh::IsFFDTransform ( std::string  type)
Returns:
whether FFD based transform
bool zxh::MaskFFDCtrPntStatus ( zxhTransformFFDBase pInfl,
zxhTransformBase pTrans,
zxhImageData pMask,
bool  bActivate 
)
Returns:
if success function: inactivate the control points outside of the msak regions
template<class PixelType , class MaskType >
bool zxh::MaskRefImageByTrans3D ( zxhImageDataT< PixelType > *  pIn,
zxhImageDataT< MaskType > *  pMask,
zxhTransformBase pTrans,
float  value,
int  compare,
float  background 
)
Returns:
mask ref image, highly recommend the mask image spacing is smaller than the pIn's, zxh update 2010-08-27 if compare==true set bk
template<class PixelType , class MaskType >
bool zxh::MaskTestImageByTrans3D ( zxhImageDataT< PixelType > *  pIn,
zxhImageDataT< MaskType > *  pMask,
zxhTransformBase pTrans,
float  value,
int  compare,
float  background,
int  nRanges,
float  fRangeFrom[],
float  fRangeTo[] 
)
Returns:
mask test image only for 3D 0 eq, 1: >=, -1: <=, 2:-neq, zxh update 2010-08-27 if compare==true set bk

=

ZXH_DLL_EXPORT float zxh::maxf ( const float  f1,
const float  f2 
)
Returns:
max value of float type
ZXH_DLL_EXPORT float zxh::minf ( const float  f1,
const float  f2 
)
Returns:
min value of float type
bool zxh::NewMetricFromTypeName ( zxhMetricBase *&  pMetric,
std::string  type 
)
Returns:
new a metric according to the type
bool zxh::NewTransformFromTypeName ( zxhTransformBase *&  pTransform,
std::string  type 
)
Returns:
new a transform according to the transform type name
ZXH_DLL_EXPORT bool zxh::NextContentLine ( std::string &  sContent,
char *  buffer,
int  buffersize,
std::ifstream &  ifs 
)
Returns:
find next line with sContent.empty()==false
ZXH_DLL_EXPORT float zxh::NGaussian ( const float  f)
Returns:
Ngaussian: NG(f) = Gaussian(f,0,1)*sqrt(2*pi)
ZXH_DLL_EXPORT void zxh::ParseStringLine ( std::string &  sContent,
std::string &  sComment,
std::string &  strLine 
)
Returns:
sContent sComents of the strLine
bool zxh::ReadTransformFromFile ( zxhTransformBase *&  pTransform,
std::string  file 
)
Returns:
new a transform according to the ext name of file
int zxh::reg_option ( int  argc,
char *  argv[] 
)
Returns:
registration based on options
void zxh::RegArg ( int  argc,
char *  argv[],
zxhRegistrationStruct StructRegistration,
int &  dimension 
)
Returns:
registration, dimension is StructRegistration.m_iRegistrationDimension
void zxh::RegSetDifferentialInfo ( zxhRegistrationStruct StructRegistration)

pre-transformation and gradient settings

differential step object

Gradient settings

differential step object

pInfluence was clone from pDifferential which has multiply with fDiff, hence here need to divided

void zxh::RegSetTransformInfo ( zxhRegistrationStruct StructRegistration)

pre-transformation and gradient settings

pre for affine and pre Gradient settings

now for gradient pre settings

ZXH_DLL_EXPORT int zxh::round ( const float  f)
Returns:
round value of float type
void zxh::SaveString2File ( std::string  str2save,
char *  pfilename 
)
Returns:
save string to filename
void zxh::SaveTransform ( zxhTransformBase pTransform,
const char *  pFilename 
)
Returns:
save results
ZXH_DLL_EXPORT bool zxh::ScanFloat ( std::ifstream &  ifs,
char *  buffer,
int  ibuffersize,
float &  fdata 
)
Returns:
float scan from the stream
ZXH_DLL_EXPORT bool zxh::ScanInteger ( std::ifstream &  ifs,
char *  buffer,
int  ibuffersize,
int &  idata 
)
Returns:
int from the stream
ZXH_DLL_EXPORT bool zxh::ScanString ( std::ifstream &  ifs,
char *  buffer,
int  ibuffersize,
char *  pdata 
)
Returns:
string scan from stream, stop before space ect.
string scan from stream
ZXH_DLL_EXPORT void zxh::Seg2Binf ( zxhImageData seg,
zxhImageDataT< float > *  bin 
)
Returns:
convert segmented image into a 0-1 float type image as atlas
template<class imagevoxel >
void zxh::SelectRoi ( zxhImageDataT< imagevoxel > *  pImg,
const int  pFrom[3],
const int  pTo[3] 
)
Returns:
template<class PixelType >
bool zxh::SetImageIntensityBetween ( zxhImageDataT< PixelType > *  pIn,
PixelType  RangeFrom,
PixelType  RangeTo,
PixelType  value,
int  op,
PixelType  background = ZXH_Background 
)
Returns:
change image intensity inclusively between RangeFrom and RangeTo op: va 11, vs 12, VS 13 same as imageop
template<class TYPE >
ZXH_DLL_EXPORT TYPE zxh::SqaredDistance ( TYPE *  co1,
TYPE *  co2,
int  Dimension 
)
Returns:
distance squared of two coordinates
ZXH_DLL_EXPORT void zxh::Swap10Bytes ( void *  p)
Returns:
ZXH_DLL_EXPORT void zxh::Swap2Bytes ( void *  p)

swap data

{string&stream operation}

perform machine dependent byte swapping. Byte swapping is often used when reading or writing binary files.

ZXH_DLL_EXPORT void zxh::Swap4Bytes ( void *  p)
Returns:
ZXH_DLL_EXPORT void zxh::Swap8Bytes ( void *  p)
Returns:
ZXH_DLL_EXPORT void zxh::SwapBytes ( void *  p,
unsigned char  nbyte 
)
Returns:
nbyte:2,4,8
ZXH_DLL_EXPORT void zxh::TransformImageInverseByDeformField ( zxhImageDataT< float > *  pInvImg,
zxhImageModelingLinearT< float, float > *  pRef,
zxhImageDataT< float > *  pDef[ImageDimensionMax] 
)
Returns:
invert transform an float image into another float image with ffd
bool zxh::TransformWorld2WorldByCollection ( zxhTransformBase pListTransform[],
int  nTransform,
int  dimension,
const float  fWorldFrom[ImageDimensionMax],
float  fWorldTo[ImageDimensionMax] 
)
Returns:
transformation collection to transform from Worldical to Worldical coordinates
transformation collection to transform from world to world coordinates
ZXH_DLL_EXPORT void zxh::trim_both ( std::string &  s)
Returns:
modified string s with spaces trimmed from edges
ZXH_DLL_EXPORT void zxh::trim_left ( std::string &  s)
Returns:
modified string s with spaces trimmed from left

{string&stream operation}

Returns:
modified string s with spaces trimmed from left
ZXH_DLL_EXPORT void zxh::trim_right ( std::string &  s)
Returns:
modified string s with spaces trimmed from right
void zxh::VOPCrossProduct ( const zxhlfloat *  A,
const zxhlfloat *  B,
zxhlfloat *  AxB 
)
Returns:
cross product
zxhlfloat zxh::VOPDistance ( int  dim,
const zxhlfloat *  A,
const zxhlfloat *  B 
)
Returns:
zxhlfloat zxh::VOPDotProduct ( int  dim,
const zxhlfloat *  A,
const zxhlfloat *  B 
)
Returns:
zxhlfloat zxh::VOPVectorLength ( int  dim,
const zxhlfloat *  A 
)
Returns:
 All Classes Namespaces Functions Variables Typedefs