From: jean-pierre roux Date: Wed, 14 Oct 2009 15:36:43 +0000 (+0000) Subject: remove deprecated X-Git-Tag: CREATOOLS.2-0-3~52 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6477aa1fdd1437cf40cf621a5c91980442b3b0d1;p=creaRigidRegistration.git remove deprecated --- diff --git a/lib/sourceTransformer.cxx b/lib/sourceTransformer.cxx deleted file mode 100644 index 3c234bc..0000000 --- a/lib/sourceTransformer.cxx +++ /dev/null @@ -1,101 +0,0 @@ - -#include "sourceTransformer.h" -#include "vtkMatrix4x4.h" - -/* - CONSTRUCTOR: Initializes the two points with empty vectors, the angle in 0. -*/ -Transformer::Transformer() -{ - std::vector empty (3,0); - _angle= 0; - _centerPoint=empty; - _scaleX=1; - _scaleY=1; - //If the transform already exists, we delete it before we create a new transform - //and set the matrix with the identity matrix - _transform= vtkTransform::New(); - vtkMatrix4x4 *_matrix = vtkMatrix4x4::New(); - _matrix->Identity(); - _transform->SetMatrix(_matrix); - -} - -/* - DESTRUCTOR -*/ -Transformer::~Transformer() -{ - //We delete the existing transform - if (_transform != NULL ) { _transform->Delete(); } -} - -/* - SETS A NEW TRANSFORM -*/ -void Transformer::SetTransform(vtkTransform *transform) -{ - _transform=transform; -} - -/* - SETS CENTER POINT -*/ -void Transformer::SetCenterPoint(std::vector point) -{ - _centerPoint=point; -} - -/* - SETS THE ANGLE -*/ -void Transformer::SetAngle(double angle) -{ - _angle=angle; -} - -/* - SETS THE X SCALE -*/ -void Transformer::SetScaleX(double scaleX) -{ - _scaleX=scaleX/100.0; -} - -/* - SETS THE Y SCALE -*/ -void Transformer::SetScaleY(double scaleY) -{ - _scaleY=scaleY/100.0; -} - -/* - SETS THE Y SCALE - */ -void Transformer::SetScaleZ(double scaleZ) -{ - _scaleZ=scaleZ/100.0; -} - - - -/* - GETS THE RESULTANT TRANSFORM -*/ -vtkTransform *Transformer::GetResult() -{ - return _transform; -} - -/* - MAKES THE TRANSFORMATIONS -*/ -void Transformer::Run() -{ - _transform->Identity(); - _transform->Translate(_centerPoint[0], _centerPoint[1], _centerPoint[2]); - _transform->Scale(_scaleX, _scaleY,_scaleZ); - _transform->RotateWXYZ(_angle, 0, 0, 1); - _transform->Update(); -} diff --git a/lib/sourceTransformer.h b/lib/sourceTransformer.h deleted file mode 100644 index 7af6494..0000000 --- a/lib/sourceTransformer.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef _$PROJECT_NAME$SOURCE01_H_ -#define _$PROJECT_NAME$SOURCE01_H_ - -#include "vtkTransform.h" -#include - -class Transformer{ -public: - Transformer(); - ~Transformer(); - void SetTransform(vtkTransform *transform); - void SetCenterPoint(std::vector point); - void SetAngle(double angle); - void SetScaleX(double scaleX); - void SetScaleY(double scaleY); - void SetScaleZ(double scaleZ); - void Run(); - vtkTransform *GetResult(); -private: - std::vector _centerPoint; - double _angle; - double _scaleX; - double _scaleY; - double _scaleZ; - //vtkImageData *_image; - vtkTransform *_transform; -}; - -#endif