12 #ifndef AIMS_REGISTRATION_BLOCK_MATCHING_D_H
13 #define AIMS_REGISTRATION_BLOCK_MATCHING_D_H
41 _seuils[2]=_seuils[0];
42 _seuils[3]=_seuils[1];
65 test = reech.
doit( identity,
96 testtrans = reech.
doit( p,
109 transformation.
setcx(0);
110 transformation.
setcy(0);
111 transformation.
setcz(0);
112 if(
ref->getSizeZ()==1) _tailleBloc[2] = 1;
113 scaleControl.
init<T>(
ref, _level_start, _level_stop, _cutVar, _stopVar, _seuilCorrel, _tailleBloc);
122 std::cout<<std::endl<<
"PARAMETRES INITIAUX :"<<std::endl;
123 std::cout<<
"Transfo initiale : "<<std::flush;
126 std::cout<<
"Transformation recherchee : ";
128 case 1: std::cout<<
"RIGIDE"<<std::endl;
break;
129 case 2: std::cout<<
"SIMILITUDE"<<std::endl;
break;
130 case 3: std::cout<<
"AFFINE"<<std::endl;
break;}
132 std::cout<<
"Pyramide debut : "<<scaleControl.
getScale()<<
" fin : "<<scaleControl.
getlevel_stop()<<std::endl;
133 std::cout<<
"Taille des blocs : x = "<<_tailleBloc[0]<<
" y = "<<_tailleBloc[1]<<
" z = "<<_tailleBloc[2]<<std::endl;
134 std::cout<<
"Pourcentage de blocs conserves par variance : %initial = "<<scaleControl.
getcutVar()<<
" %final ="<<scaleControl.
getstopVar()<<std::endl;
135 std::cout<<
"Seuil sur la mesure de similarite = "<<_seuilCorrel<<std::endl;
136 std::cout<<
"Seuils sur les niveaux de gris : "<<std::endl;
137 std::cout<<
" seuilBasRef = "<<_seuils[0]<<
" seuilHautRef = "<<_seuils[1]<<std::endl;
138 std::cout<<
" seuilBasTest = "<<_seuils[2]<<
" seuilHautTest = "<<_seuils[3]<<std::endl;
139 std::cout<<
"Nombre d'iterations par niveau de pyramide : "<<_itermax<<std::endl;
151 std::cout << std::endl << std::endl <<
"PYRAMIDE NIVEAU : " << scaleControl.
getScale() << std::endl;
154 displacementField.
init(
ref, scaleControl, _seuils);
162 std::cout<<
" ITERATION No "<<count<<std::endl;
174 q = minimisation.
quaternion(displacementField);
197 }
while ( count < (_itermax + 1) );
204 }
while (scaleControl.
goOn());
209 linres.
setRef( test_orig );
210 _result = linres.
doit( r,
211 test_orig->getSizeX(),
212 test_orig->getSizeY(),
213 test_orig->getSizeZ(),
214 Point3df( test_orig->getVoxelSize() ) );
aims::AffineTransformation3d doit(carto::rc_ptr< carto::Volume< T > > &ref, const carto::rc_ptr< carto::Volume< T > > &test_orig)
void init(carto::rc_ptr< carto::Volume< T > > ref, ScaleControl &scaleControl, T *seuils)
carto::VolumeRef< Point3d > getField(carto::rc_ptr< carto::Volume< T > > test)
Motion quaternion(DisplacementField< T > &displacementField)
void init(const carto::rc_ptr< carto::Volume< T > > ref, int level_start, int level_stop, double cutVar, double stopVar, double seuilCorrel, const Point3d &tailleBloc=Point3d(4, 4, 4))
Volume resampler using linear (order 1) interpolation.
void setRef(const carto::rc_ptr< carto::Volume< T > > &ref)
Set the input data to be resampled by the doit() methods.
void doit(const aims::AffineTransformation3d &transform, carto::Volume< T > &output_data) const
Resample the input volume set with setRef() into an existing volume.
std::vector< float > getVoxelSize() const
VolumeRef< T > copy() const
reference_wrapper< T > ref(T &ref)