📄 rigidreg3dinfo.cpp
字号:
// RigidReg3DInfo.cpp: implementation of the RxRigidReg3DInfo class.//////////////////////////////////////////////////////////////////////////// Title: Set information related to 3D rigid-body registration//////////////////////////////////////////////////////////////////////////// Author: Helen Hong, 3DMed co. LTD// 138-dong 417-ho Seoul National Univ.// San 56-1 Shinlim-dong Kwanak-gu, Seoul, Korea// Email. hlhong@cglab.snu.ac.kr//// Date : 2002. 9. 5.// Update : 2003. 1. 11.//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// include//////////////////////////////////////////////////////////////////////#include "stdafx.h"#include "RigidReg3DInfo.h"#include "VolumeInfo.h"//////////////////////////////////////////////////////////////////////// define////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// declaration////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Construction/Destruction//////////////////////////////////////////////////////////////////////RxRigidReg3DInfo::RxRigidReg3DInfo(){ if(m_pnReferVolume) m_pnReferVolume = NULL; if(m_pnFloatVolume) m_pnFloatVolume = NULL;}RxRigidReg3DInfo::~RxRigidReg3DInfo(){}//********************************************************************// SetReferVolumeData(): Set reference volume data//********************************************************************BOOL RxRigidReg3DInfo::SetReferVolumeData(unsigned short *ReferVolume){ m_pnReferVolume = ReferVolume; return TRUE;}//********************************************************************// SetFloatVolumeData(): Set float volume data//********************************************************************BOOL RxRigidReg3DInfo::SetFloatVolumeData(unsigned short *FloatVolume){ m_pnFloatVolume = FloatVolume; return TRUE;}//********************************************************************// SetReferVolumeResolution(): Set reference volume resolution//********************************************************************BOOL RxRigidReg3DInfo::SetReferVolumeResolution(int ReferVolX, int ReferVolY, int ReferVolZ){ m_ReferVolInfo.Ru = ReferVolX; m_ReferVolInfo.Rv = ReferVolY; m_ReferVolInfo.Rw = ReferVolZ; return TRUE;}//********************************************************************// SetFloatVolumeResolution(): Set float volume resolution//********************************************************************BOOL RxRigidReg3DInfo::SetFloatVolumeResolution(int FloatVolX, int FloatVolY, int FloatVolZ){ m_FloatVolInfo.Ru = FloatVolX; m_FloatVolInfo.Rv = FloatVolY; m_FloatVolInfo.Rw = FloatVolZ; return TRUE;}//********************************************************************// SetReferVoxelSize(): Set reference voxel size//********************************************************************BOOL RxRigidReg3DInfo::SetReferVoxelSize(double ReferVoxelX, double ReferVoxelY, double ReferVoxelZ){ m_ReferVolInfo.Su = ReferVoxelX; m_ReferVolInfo.Sv = ReferVoxelY; m_ReferVolInfo.Sw = ReferVoxelZ; return TRUE;}//********************************************************************// SetFloatVoxelSize(): Set float voxel size//********************************************************************BOOL RxRigidReg3DInfo::SetFloatVoxelSize(double FloatVoxelX, double FloatVoxelY, double FloatVoxelZ){ m_FloatVolInfo.Su = FloatVoxelX; m_FloatVolInfo.Sv = FloatVoxelY; m_FloatVolInfo.Sw = FloatVoxelZ; return TRUE;}//********************************************************************// SetReferSliceThickness(): Set slice thickness in reference//********************************************************************BOOL RxRigidReg3DInfo::SetReferSliceThickness(float ReferSliceThickness){ m_ReferSliceThickness = ReferSliceThickness; return TRUE;}//********************************************************************// SetFloatSliceThickness(): Set slice thickness in float//********************************************************************BOOL RxRigidReg3DInfo::SetFloatSliceThickness(float FloatSliceThickness){ m_FloatSliceThickness = FloatSliceThickness; return TRUE;}//********************************************************************// SetSamplingInfo(): Set sampling information//********************************************************************BOOL RxRigidReg3DInfo::SetSamplingInfo(int SampleMode,int SampleNum,unsigned short Threshold,double Tolerance){ m_SampleMode = SampleMode; // sampling mode: 0-uniform, 1-random, 2-sobel, 3-sobellevoy m_SampleNum = SampleNum; // number of sampling points m_Threshold = Threshold; // threshold m_Tolerance = Tolerance; // tolerance return TRUE;}//********************************************************************// SetMIDerivateMIInfo(): Set Mi derivation information//********************************************************************BOOL RxRigidReg3DInfo::SetMIDerivate3DInfo(double varFloat,double covarRefer,double covarFloat){ m_varFloat = varFloat; m_covarRefer = covarRefer; m_covarFloat = covarFloat; return TRUE;}//********************************************************************// SetRegistrationInfo(): Set registration information//********************************************************************BOOL RxRigidReg3DInfo::SetRegistrationInfo(int maxIter,double etaTrans,double etaRot,double TransLimit,double RotLimit){ m_maxIter = maxIter; // maximum iteration number m_etaTrans = etaTrans; // learning rate for translation m_etaRot = etaRot; // learning rate for rotating m_TransLimit = TransLimit; // converge limit of translation m_RotLimit = RotLimit; // converge limit of rotating return TRUE;}//********************************************************************// SetMIAnalysisInfo(): Set MI analysis information//********************************************************************BOOL RxRigidReg3DInfo::SetMIAnalysisInfo(int MIAnalysisMode,int MIInterpolationMode){ m_MIAnalysis = MIAnalysisMode; // MI calculation mode: 0-original MI 1-fast MI 2-surface m_MIInterpolation = MIInterpolationMode; // MI interpolation mode: 0-partial volume 1-trilinear 2-nearest neighbor return TRUE;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -