12#ifndef AIMS_REGISTRATION_FFD_H
13#define AIMS_REGISTRATION_FFD_H
15#include <cartodata/volume/volume.h>
101 { std::vector<float> v( 3 ); v[0] =
_vsx; v[1] =
_vsy; v[2] =
_vsz;
110 default:
return false;
126 void write(
const std::string & filename )
const;
154 template <
typename T>
165 _flatx ? test_volume->getVoxelSize()[0] :
double(test_volume->getSizeX() - 1) /
double(
dimX - 1) * test_volume->getVoxelSize()[0],
166 _flaty ? test_volume->getVoxelSize()[1] :
double(test_volume->getSizeY() - 1) /
double(
dimY - 1) * test_volume->getVoxelSize()[1],
167 _flatz ? test_volume->getVoxelSize()[2] :
double(test_volume->getSizeZ() - 1) /
double(
dimZ - 1) * test_volume->getSizeZ()
172 template <
typename T>
243 template <
typename T>
246 template <
typename T>
257 double spline3(
double x )
const {
return _spline(x); }
266 virtual Point3dd transformDouble(
double x,
double y,
double z )
const;
268 {
return deformation_private(p_mm); };
272 std::vector<int> _mirrorcoefvecx;
273 std::vector<int> _mirrorcoefvecy;
274 std::vector<int> _mirrorcoefvecz;
280 template <
typename T>
289 template <
typename T>
318 template <
typename T>
336 virtual Point3dd transformDouble(
double x,
double y,
double z )
const;
338 {
return deformation_private(p_mm); };
342 template <
typename T>
360 :
public Writer<carto::Volume<Point3df> >
365 inline Writer(
const std::string& filename,
371 const std::string* format = 0 );
382 template <>
inline std::string
383 DataTypeCode<aims::FfdTransformation>::objectType()
385 return "FFDTransformation";
388 template <>
inline std::string
389 DataTypeCode<aims::FfdTransformation>::dataType()
394 template <>
inline std::string
395 DataTypeCode<aims::FfdTransformation>::name()
397 return "FFDTransformation";
const carto::Object options() const
Point3dd deformation(const Point3dd &p_mm) const
SplineFfd & operator=(const SplineFfd &other)
virtual carto::rc_ptr< soma::Transformation3d > leftComposed(const carto::rc_ptr< soma::Transformation3d > &other) const
SplineFfd(const carto::rc_ptr< carto::Volume< Point3df > > &other)
virtual void updateDimensions()
SplineFfd(const SplineFfd &other)
SplineFfd(int dimX=0, int dimY=1, int dimZ=1, float sizeX=1., float sizeY=1., float sizeZ=1.)
virtual carto::rc_ptr< soma::Transformation3d > composed(const carto::rc_ptr< soma::Transformation3d > &other) const
double spline3(double x) const
Pre-computed B-Spline values In the "order 0" case, the array is not used (the analytical expression ...
TrilinearFfd(int dimX=0, int dimY=1, int dimZ=1, float sizeX=1., float sizeY=1., float sizeZ=1.)
virtual carto::rc_ptr< soma::Transformation3d > composed(const carto::rc_ptr< soma::Transformation3d > &other) const
TrilinearFfd & operator=(const TrilinearFfd &other)
Point3dd deformation(const Point3dd &p_mm) const
TrilinearFfd(const TrilinearFfd &other)
virtual carto::rc_ptr< soma::Transformation3d > leftComposed(const carto::rc_ptr< soma::Transformation3d > &other) const
TrilinearFfd(const carto::rc_ptr< carto::Volume< Point3df > > &other)
std::vector< float > getVoxelSize() const
AimsVector< float, 3 > Point3df
AimsVector< int16_t, 3 > Point3d
AimsVector< double, 3 > Point3dd