zxhproj v 2.2
zxhproj

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
point
StructAtlasLabels
surface_point
zxh::surface_point
zxhEdgeBaseT< PixelType >ZxhEdgeBase.cpp return edge contour points image which is short pixel type, ZXH_Background and ZXH_Foreground only for 2D and 3D
zxhEdgeCannyT< PixelType >ZxhEdgeCanny.cpp return canny edge contour points image, no gaussian filter is applied here
zxhGradientBaseThis class is used as gradient class
zxhGradientFFDBaseThis class is used as gradient class for FFD
zxhGradientMultiRigidOnly add gradient interface To use as Differential/Influence/Gradient, SetDimension,SetNoOfRigidTransform,SetTranslationDirectionVectorForEcho first ,
zxhImageDataT< PixelType >: interface for the zxhImageDataT class 4D image zxhImageDataT include datavalue stored in signed short [] can not read image from file default pixel valut type is short when reading real image float/struct type image only used in interpolate spline ffd Do not have origin and orientation matrix YET
zxhImageGiplT< PixelType >Image reader read gipl image, need to swap according to magic number Orientation issue: read: will consider header[106,110,114] and header[122,126,130] as x-axis and y-axis if header[138,142,146]==0 (method2), else header[106-154] is image to world matrix(method3) write: always use method2 unless det(imagetoworldmatrix)<0 then use method3 ADD: read analyze format (.hdr,.img),y-dim index should be mirror flip in order to match gipl
zxhImageHistogramT< PixelType >Compute images histogram imagespacing is the intensity span of the histogram bin histogram bin value m_pImageData[1]~m_pImageData[m_iHistogramSize]
zxhImageInfo: record image info ; when copy or remove orientation info, always use method(-2)
zxhImageModelingBaseT< PixelType, DerivativeType >Image modeling base class use for getting pixel, gradient, different claas stands for different interpolation Here: pixelvalue and gradient type should be float type for registration image modeling, the pixeltype is default PixelTypeDefault(short) the template only used in interpolate the bspline ffd implemented derived sub-class, Nearest, Linear, BSpline(1D,2D,3D,3D+1D)
zxhImageModelingBsplineT< PixelType, DerivativeType >Image modeling by bspline intepolation, 3d validated
zxhImageModelingLinearT< PixelType, DerivativeType >Image modeling by Linear interpolation
zxhImageNiftiT< PixelType >Image reader read gipl image, need to swap according to magic number ADD: read analyze format (.hdr,.img),y-dim index should be mirror flip in order to match gipl
zxhImageParRecREC_PAR image data operation
zxhImageProcessBaseT< PixelTypeIn, PixelTypeOut >ZxhImageProcessBase.cpp
zxhImageProcessConvoluteT< PixelTypeIn, PixelTypeOut >ZxhImageProcessConvolute.cpp
zxhImageProcessGaussianT< PixelTypeIn, PixelTypeOut >ZxhImageProcessGaussian.cpp for each dimension: sigma, compute kernalsize, compute the 1D kernal The parameter sigma^2 is referred to as the scale parameter with the interpretation that image structures of spatial size smaller than about sigma have largely been smoothed away in the scale-space level at scale sigma^2
zxhImageProcessPhaseT< PixelTypeIn, PixelTypeOut >ZxhImageProcessPhase.cpp
zxhIntensityDistance1) normalise the intensity of two images based on a given surface points image and NV 2) along NV compute the intensity difference from -fRang~-fAccPos before hitting other edge compute avgNeg1(2), fAccPos~fRange before hitting other edge: avgPos1(2) to derive Intensity1'=a*Intensity1+b 3) -fAccPos~fAccPos, compute sum(Thresh(Intensity1')-Thresh(Intensity2)), 4) distance= Sum/Thresh
zxh::zxhmat44
zxhMetricBaseRegistration similarity measurement the derivative is computed in gradient object 2010-May-14 add: consider weight function for pixel: m_pWeightModelTest(Ref), GetWeightByWorld; No mask: 1, outlier: 0;
zxhMetricCCUse square of correlation coefficient = ( SumAB - SumA*SumB/N )^2 /( (SumA2 - SumA*SumA/N)*(SumB2-SumB*SumB/N) ) ; OR use minus sum square difference = -(sumA2+sumB2-2*sumAB)
zxhMetricCCFFD2
zxhMetricCCFFD2ConstDiscretePath
zxhMetricConstDiscretePathBaseCan input multiple images for registration m_pImageTest(Ref) are the same, and used as coordinate reference, such as when define FFD m_imgRef are dT(m_pImageRef)^{-n} to implement methods in drived classes SetConstDiscretePathMetricBase; GetValue/ComputeConstant (UpdateImage); SetImage; SetMaskImage; SetFFDMaskImage (ffd) for registration using this metric, there should not involve transformation concatenation (e.g. for diffeomorphism)
zxhMetricFFD2BaseFFD GetValue: DO NOT call PreComputeTransformField DO NOT assume this anymore: ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI
zxhMetricFFDBaseSpecial design interface for metric can be used in FFD transformation and gradient to compute gradient 2010-04-13 ADD 1) Compute the bending energy on ffd grid points ONLY: GetBendingEnergy 2) Compute derivative of current FFD: ComputeCtrPntOnTargetForceForBendingEnergy need derived class to implement the ComputeConstanceForFFDGradient with ComputeCtrPntOnTargetForceForBendingEnergy RMS CC NV not implement yet 3) Set WeightFFDBendingEnergy
zxhMetricJEJoint entropy based on histogram
zxhMetricLocalAffinesBaseMethods for locally affine registration
zxhMetricLogProbability
zxhMetricMI(normalized) mutual information based on histogram or parzen window default is normalised mi and histogram gray level preprocess and PDF estimation weight pixel added 1. set test / ref image 2. set sample physical -> sample interval 3. compute similarity: 1) For SEMI/MMI +++++ resample test image -> sample physical ++++++ IMPORTANT (for FFD registration to use pre-transform) 2) reset sample interval
zxhMetricMIConstraint(normalized) mutual information + penalty term(constraint)
zxhMetricMIFFDMIconstraint + FFD (mainly for FFD+SEMI) For similarity/ gradient computation, apply ResampleTestImagesSpacingPhysIntervel first
zxhMetricMIFFD2MIconstraint + FFD2 GetValue: call PreComputeTransformField assume this : ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI
zxhMetricMIFFD2ConstDiscretePath
zxhMetricMIFFD2MultiImageMultiple images for registration using MIFFD2
zxhMetricMIFFDSEMIOnly SEMI, where {S} = MI, no mixture model for fast computation: pre-compute: compute transformation, resample test image for I_f with integer coordinate x, I_f(y) with integer coordinate x, GradientI_r(y)_1/2/3 with interger coordinate x (gradients are projected onto FFD grid) bHupdated(r,f) records whether H(r,f) has been updated, if not H(r,f)=0 only compute MI as {S} no normal MI/NMI (c.f. FFD2); for SEMI, H_s is computed during computation of H_s
zxhMetricMILocalAffines(normalized) mutual information based on histogram or parzen window default is normalised mi and histogram, only constraint computed on test space be considered NOTICE: resample test image
zxhMetricMIMultiImageMultiple images for rigid registration
zxhMetricMultiImageBaseCan input multiple images for registration m_pImageTest(ref) are the same, and used as coordinate reference, such as when define FFD m_pImageTest3D[?] and m_imgTest3DResampled[2][?] are other 3D test images (number: m_nImage3D) m_pImagRef3D[?] and m_imgRef3D[?] are other 3D ref images (number: m_nImage3D) GetValue and MetricGradient are first normalized by number of voxels computed
zxhMetricNVZxhMetricNV.h: interface for the zxhMetricNV class. metric=1/|v| * sum(cos2) 使用该类需要: setImage 初始化参数: pInterpolator,m_pTransform only for rigid transformation **** TODO NOT implemented in v2.1 zxhtod
zxhMetricPhaseDo not resample the test image into the m_afSamplingWorldical 2010-06-20, currently only cc_intensity (wi>0), cc_phase (wf>0), cos_orient (wo>0) for same modality zxhtodo(todo) nmi_intensity (wi<0, bsplinePZ), nmi_phase (wf<0, bsplinePZ), cos^2_orient (wo<0) for different modalities NOTICE: test image is not resample to sample phyiscal like zxhMetricMI
zxhMetricPhaseFFD+ FFD 1. DO NOT use 'The computation of ref image's phase needs updating every iteration,This is made sure in zxhffd:RegFFDandRegSetting4' 2. DO NOT Resample test or ref image according to the physical interval the outlier use GetPixelFloatValueWithCheckMirrorByPhys to avoid the boundary effect in phase computation 3. NEED to implement the bending energy
zxhMetricPhaseLocalAffines
zxhMetricPhaseLocalAffinesConstDiscretePath
zxhMetricPhaseLocalMatrixConstDiscretePathForward save test images and local regions in larm transformation
zxhMetricRMSSimilarity metric based on mean absolute image graylevel subtraction value change to return minus root mean square 25 Sep 2007
zxhMetricSquareRootTransformCompute transformation field T which argmin_{T} sum||T(T(x))-D(x)||^2 zxhMetricSquareRootTransform} M = {argmin}_{T} {-||T T(x)-D(x)||^2} { M}{ t_j} in zxhMetricSquareRootTransform.pdf
zxhMorphologyT< PixelType >ZxhMorphology.cpp : operators using morphology binary . all pixels that aren't the intensity of m_Background are regarded as foreground m_Forground is for setting dilation pixel value images operated need to be isotropic, operator step size is based on voxel/pixel size
zxhMultiCannyEdgeZxhEdgeCanny.cpp return canny edge contour points image, no gaussian filter is applied here
zxhOptimizerBaseOptimizers search for the optimal value of the metric within the transformation
zxhOptimizerGradientOptimizers search for the optimal value of the metric within the transformation follow gradient direction
zxhOptimizerGradientFieldLess transformation field operation
zxhOptimizerGradientLocalAffinesOptimizers search for the optimal value of the metric within the transformation follow gradient direction
zxhOptimizerGradientLocalMatrix
zxhRegistrationStructZxhRegistrationStruct record registration information
zxhStructFFDReg
zxhStructLocalAffineReg
zxhStructMultiImage
zxhStructPhaseReg
zxhStructSEMI
zxhTransformAffineZxhTransformAffine.h: interface for the zxhTransformAffine class. Y = Mskew x {Mscale x Mrotate x (X-Center) + Translate + Center} = K x {S x R x (X-C) + L + C} Kind 1- old (not used) rotate (clockwise is positive) by center,scaling,translate, X'= cos(fDegZ)*cos(fDegY)*(fFixx - fCx)*fScalingX + (sin(fDegZ)*cos(fDegX) + cos(fDegZ)*(sin(fDegY))*(sin(fDegX)))*(fFixy - fCy)*fScalingY + ((sin(fDegZ))*(sin(fDegX)) + cos(fDegZ)*(-sin(fDegY))*cos(fDegX))*(fFixz - fCz)*fScalingZ + fCx*fScalingX + fTx; Y'= (-sin(fDegZ))*cos(fDegY)*(fFixx - fCx) *fScalingX + (cos(fDegZ)*cos(fDegX) + (-sin(fDegZ))*(sin(fDegY))*(sin(fDegX)))*(fFixy - fCy) *fScalingY + (cos(fDegZ)*(sin(fDegX)) + (sin(fDegZ))*(sin(fDegY))*cos(fDegX))*(fFixz - fCz)*fScalingZ + fCy*fScalingY + fTy; Z'= sin(fDegY)*(fFixx - fCx)*fScalingX + cos(fDegY)*(-sin(fDegX))*(fFixy - fCy)*fScalingY + cos(fDegY)*cos(fDegX)*(fFixz - fCz)*fScalingZ + fCz*fScalingZ + fTz; for 4thDimension(temporal), only scaling, then translating independent from spatial dimension differs from itk++, fDegX..Z need *(-1), fC*fScaling% while in itk++ no *fScaling% adding skew info
zxhTransformBaseThis class is used as tranformation class Transformation This class is an abstract class to represent the transformation, or gradient type of Metrics 在Transform中,只是针对imageTest,因为所谓的transform是对test image 进行transform,其实不涉及到别的image。只有在把test image transform完 后的image 映射到reference image时才与之有关系。而test与ref image的关系 是通过test原来的原点坐标(就是世界坐标)与ref image的原点坐标(也是世界坐标) 是一样的。 所以 T(x) = x' 为image 内部坐标x 变换到 内部坐标 x' AdjustTestToWorldicalx'*spacing or x*spacing 为世界坐标 smm smm 映射到ref image 上的坐标为 xref=smm/spacing_ref AdjustToRefGrid: x'(x)*spacing/spacing_ref = xref 1. setdimension, setimage before reading transform from file in order to keep consistency 2. transform type:AFF,FFD,FFDMI,FLD
zxhTransformCmriShiftCorrectEach local affine is 2D transformation using physical coordinae only
zxhTransformFFDTransformation type: Free form deformation file extension name:.FFD, currently save as text file, will change to imagedata files in the future zxhtodo todo
zxhTransformFFDBaseThis class is used as FFD class base Free form deformation offset of control grid is Worldical offset(unit:mm) ADD: m_ImageInfo for conversion between control grid index and world coordinate; NOTICE: imageinfo's quaternion parameters always same as test image, if different, will be re-set using test image's quaternion para when SetImage save ffd: zxhTransformBase::string, then FFD control point offsets, finally quaternion parameters read ffd: zxhTransformBase::string, then FFD control point offsets, finally quaternion parameters if no gridtoworld matrix available, set to identity*spacing Revision: 2010-12-22 by zxh, displacement in grid of FFD is on grid coordinate but physical displacement, NOT world displacement : 2011-02-11 by zxh, read FFD from float image
zxhTransformFieldGradient
zxhTransformFieldLogEuclideanDisplacement/ velocity field should be very close to zero
zxhTransformFieldLogEuclideanOPOp on velocity field (should be very close to zero)
zxhTransformFieldsTransform fields in each dimension as a transformations the dimension of image and voxels should be the same between the transform fields and reference images transform field images are gipl and unit of millbimetre transform point, if the point is not in the grid, then linear interpolation this transformation type can NOT be gradient type at this moment
zxhTransformIterateInverseForwardTransformToRefGrid: DRAW sampling FillInFindInverse: one closest per quadrant DistanceWeightInterpolateByNeighbours: inv(s) = s + sum w(si)(ti-si)
zxhTransformIterateInverseSDIScatter point interpolation (use all scatter points within one voxel size) ForwardTransformToRefGrid: DRAW sampling DistanceWeightInterpolateByNeighbours: inv(s) = sum w(si) ti
zxhTransformIterateSquareRoot
zxhTransformLocalAffinesNo global_affine anymore zxhTransformLocalAffines.h: interface for the zxhTransformLocalAffines class. T = first Region_Affines,then Global_Affine = G ( R(x) ) R= sum wi(Gi)+w_facets, these {wi} are computed from the distance_transform images, hence it is better to have the facets fixed on the test image boundary, because local_affine is identity outside the test image facet or fixed facet w_facets is regarded as 6*ZXH_LocalAffineFacetWeighting identity local affine Length_finite_difference = Length_advance < resample/2 Compute similarity measures, e.g. histogram table, i regions based on Ri, and background regions based on interpolated R(x) For each region i Update the histogram table with finite difference step to compute the gradient against affine parameters; Update Ri R(x) is overlap corrected distance weighting interpolation between Ri; If need overlap correction, then update the regions and recomputed the distance transformation for them Local Affine interpolation: (1) based on affine (2) based on closest points' displacment GRADIENT all 1 based on influence_object
zxhTransformLocalAffines2.AFFS
zxhTransformMatrixZxhTransformMatrix.h: used as a affine matrix storage struct CAN NOT be used as Gradient object or in GradientBase class operations
zxhTransformMultipleAffinesZxhTransformMultipleAffines.h: interface for all transformations using multiple affine transformations. multiple affine = global affine + local affines
zxhTransformMultiRigidThis class is used for multi-rigid transformations, the first, index 0, is for MR the rest (n-1) are for echo images, respectively. To access the rigid transformation, use GetMRRigidTransform(void), GetEchoRigidTransform(index_of_echo) to get the transformation matrix from Echo to MR use GetMatrixFromEcho2MR(index_of_echo) CAN NOT be used as A transformation type for transforming AN image, ad hoc class To use as storage for transformation, SetDimension,SetNoOfRigidTransform first
 All Classes Namespaces Functions Variables Typedefs