00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_SOIMAGEREGISTRATIONTRANSFORM3D_H_
00025 #define _SO_SOIMAGEREGISTRATIONTRANSFORM3D_H_
00026
00027 #include <Inventor/SbMatrix.h>
00028 #include <Inventor/fields/SoSFEnum.h>
00029 #include <Inventor/fields/SoSFMatrix.h>
00030 #include <Inventor/fields/SoSFInt32.h>
00031 #include <Inventor/fields/SoSFVec2f.h>
00032 #include <Inventor/fields/SoSFVec3i32.h>
00033 #include <Inventor/fields/SoSFBool.h>
00034
00035 #include <ImageViz/Fields/SoSFImageDataAdapter.h>
00036 #include <ImageViz/SoImageViz.h>
00037 #include <ImageViz/Engines/SoImageVizEngineOutput.h>
00038 #include <ImageViz/Engines/SoImageVizEngine.h>
00039 #include <ImageViz/Engines/SoSubImageVizEngine.h>
00040 #include <ImageViz/Nodes/Registration/SoRegistrationResult.h>
00041
00042 class SoDEPRECATED SoImageRegistrationTransform3d : public SoImageVizEngine
00081 {
00082 SO_IMAGEVIZ_ENGINE_HEADER( SoImageRegistrationTransform3d );
00083
00084 public:
00085
00091 struct RegistrationEvent : public SbEventArg
00092 {
00094 SoImageVizEngine* getSource() const
00095 {
00096 return m_engine;
00097 }
00098
00100 float getProgress() const
00101 {
00102 return m_progress;
00103 }
00104
00106 double getSimilarity() const
00107 {
00108 return m_similarity;
00109 }
00110
00112 SbMatrix getTransform() const
00113 {
00114 return m_transform;
00115 }
00116
00118 RegistrationEvent( SoImageVizEngine* engine, float progress, double similarity, const SbMatrix& matrix )
00119 : m_engine( engine ),
00120 m_progress( progress ),
00121 m_similarity( similarity ),
00122 m_transform( matrix )
00123 { }
00124
00126 ~RegistrationEvent() { }
00127
00128 private:
00129 SoImageVizEngine* m_engine;
00130 float m_progress;
00131 double m_similarity;
00132 SbMatrix m_transform;
00133 };
00134
00136 SbEventHandler<RegistrationEvent&> onProgressRegistration;
00137
00139 SoImageRegistrationTransform3d();
00140
00144 SoSFEnum computeMode;
00145
00147 SoSFImageDataAdapter inMovingImage;
00148
00150 SoSFImageDataAdapter inFixedImage;
00151
00154 SoSFMatrix initialTransform;
00155
00158 SoSFBool autoParameterMode;
00159
00167 SoSFVec2f optimizerStep;
00168
00175 SoSFVec3i32 coarsestResampling;
00176
00180 enum TransformationType
00181 {
00185 TRANSLATION = 4,
00186
00190 RIGID = 0,
00194 RIGID_ISOTROPIC_SCALING = 1,
00198 RIGID_ANSISOTROPIC_SCALING = 2,
00202 AFFINE = 3,
00203 };
00204
00209 SoSFEnum transformType;
00210
00215 SoSFBool ignoreFinestLevel;
00216
00220 enum MetricType
00221 {
00226 EUCLIDIAN = 0,
00231 CORRELATION,
00236 NORMALIZED_MUTUAL_INFORMATION,
00237 };
00238
00243 SoSFEnum metricType;
00244
00245
00247 SoImageVizEngineOutput<SoSFFieldContainer, SoRegistrationResult*> outTransform;
00248
00250 SbMatrix getOutputTransformation();
00251
00252 private:
00254 virtual ~SoImageRegistrationTransform3d();
00255 };
00256
00257 #endif //_SO_SOIMAGEREGISTRATIONTRANSFORM3D_H_
00258