12 #ifndef AIMS_REGISTRATION_FFD_H
13 #define AIMS_REGISTRATION_FFD_H
99 { std::vector<float> v( 3 ); v[0] =
_vsx; v[1] =
_vsy; v[2] =
_vsz;
108 default:
return false;
124 void write(
const std::string & filename )
const;
141 template <
typename T>
144 int dimX,
int dimY,
int dimZ,
146 _ctrlPointDelta( dimX, dimY, dimZ ),
147 _dimx( dimX ), _dimy( dimY ), _dimz( dimZ ),
148 _flatx( dimX == 1 ), _flaty( dimY == 1 ), _flatz( dimZ == 1 )
152 _flatx ? test_volume->getVoxelSize()[0] :
double(test_volume->getSizeX() - 1) /
double(
dimX - 1) * test_volume->getVoxelSize()[0],
153 _flaty ? test_volume->getVoxelSize()[1] :
double(test_volume->getSizeY() - 1) /
double(
dimY - 1) * test_volume->getVoxelSize()[1],
154 _flatz ? test_volume->getVoxelSize()[2] :
double(test_volume->getSizeZ() - 1) /
double(
dimZ - 1) * test_volume->getSizeZ()
159 template <
typename T>
163 _ctrlPointDelta( dimX, dimY, dimZ ),
164 _dimx( dimX ), _dimy( dimY ), _dimz( dimZ ),
165 _flatx( dimX == 1 ), _flaty( dimY == 1 ), _flatz( dimZ == 1 )
230 template <
typename T>
233 template <
typename T>
244 double spline3(
double x )
const {
return _spline(x); }
247 virtual Point3dd transformDouble(
double x,
double y,
double z )
const;
249 {
return deformation_private(p_mm); };
253 std::vector<int> _mirrorcoefvecx;
254 std::vector<int> _mirrorcoefvecy;
255 std::vector<int> _mirrorcoefvecz;
261 template <
typename T>
270 template <
typename T>
299 template <
typename T>
310 virtual Point3dd transformDouble(
double x,
double y,
double z )
const;
312 {
return deformation_private(p_mm); };
316 template <
typename T>
319 int dimX,
int dimY,
int dimZ,
334 :
public Writer<carto::Volume<Point3df> >
339 inline Writer(
const std::string& filename,
345 const std::string* format = 0 );
356 template <>
inline std::string
357 DataTypeCode<aims::FfdTransformation>::objectType()
359 return "FFDTransformation";
362 template <>
inline std::string
363 DataTypeCode<aims::FfdTransformation>::dataType()
368 template <>
inline std::string
369 DataTypeCode<aims::FfdTransformation>::name()
371 return "FFDTransformation";
const carto::Object options() const
FFD vector field deformation transform.
Point3dd deformation(const Point3dd &p_mm) const
SplineFfd(const carto::rc_ptr< carto::Volume< Point3df > > &other)
virtual void updateDimensions()
SplineFfd(const SplineFfd &other)
SplineFfd & operator=(const SplineFfd &other)
SplineFfd(int dimX=0, int dimY=1, int dimZ=1, float sizeX=1., float sizeY=1., float sizeZ=1.)
double spline3(double x) const
Pre-computed B-Spline values In the "order 0" case, the array is not used (the analytical expression ...
FFD vector field deformation transform.
TrilinearFfd & operator=(const TrilinearFfd &other)
TrilinearFfd(int dimX=0, int dimY=1, int dimZ=1, float sizeX=1., float sizeY=1., float sizeZ=1.)
Point3dd deformation(const Point3dd &p_mm) const
TrilinearFfd(const TrilinearFfd &other)
TrilinearFfd(const carto::rc_ptr< carto::Volume< Point3df > > &other)
std::vector< float > getVoxelSize() const