X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkAffineRegistrationGenericFilter.cxx;h=1e912d2dd12632f985b34c3250d5ed7ad4f59487;hb=9181935185e263a306c1aabb5bbcfb6160d14f6f;hp=d9bfd2892618e2e8fcb9a0a16baa741a42fb9e7f;hpb=c18059db4f507fd31b5898667f57eced7d48c5f7;p=clitk.git diff --git a/registration/clitkAffineRegistrationGenericFilter.cxx b/registration/clitkAffineRegistrationGenericFilter.cxx index d9bfd28..1e912d2 100644 --- a/registration/clitkAffineRegistrationGenericFilter.cxx +++ b/registration/clitkAffineRegistrationGenericFilter.cxx @@ -24,74 +24,6 @@ namespace clitk { -//==================================================================== -// Constructor -AffineRegistrationGenericFilter::AffineRegistrationGenericFilter() -{ - m_Verbose=false; -} - -//==================================================================== -// Update -void AffineRegistrationGenericFilter::Update() -{ - //Read the PixelType and dimension of the reference image - int Dimension; - std::string PixelType; - clitk::ReadImageDimensionAndPixelType(m_ArgsInfo.reference_arg, Dimension, PixelType); - if (Dimension == 2) UpdateWithDim<2>(PixelType); - else if (Dimension == 3) UpdateWithDim<3>(PixelType); - else { - itkExceptionMacro(<< "Reference Image dimension is " << Dimension - << " but I can only work on 2D and 3D images."); - } -} - -//void AffineRegistrationGenericFilter::SetTransfo( itk::MultiResolutionImageRegistrationMethod,itk::Image >::Pointer & registration ) -//{ -// typedef itk::Euler2DTransform < double > Transform2DType; -// Transform2DType::Pointer t2 =Transform2DType::New(); -// -// //Initializing the transform -// Transform2DType::OutputVectorType translation; -// translation[0] = m_ArgsInfo.transX_arg; -// translation[1] = m_ArgsInfo.transY_arg; -// t2->SetTranslation(translation); -// t2->SetRotation(m_ArgsInfo.rotX_arg); -// -// //For simplicity we set the center to the top left corner -// Transform2DType::InputPointType center; -// center[0] = 0.; -// center[1] = 0.; -// t2->SetCenter(center); -// registration->SetTransform(t2); -// registration->SetInitialTransformParameters(t2->GetParameters()); -//} - -//void clitk::AffineRegistrationGenericFilter::SetTransfo( itk::MultiResolutionImageRegistrationMethod,itk::Image >::Pointer & registration ) -//{ -// typedef itk::Euler3DTransform < double > Transform3DType; -// Transform3DType::Pointer t3 = Transform3DType::New(); -// -// t3->SetComputeZYX(true); -// //Initializing the transform -// Transform3DType::OutputVectorType translation; -// translation[0] = m_ArgsInfo.transX_arg; -// translation[1] = m_ArgsInfo.transY_arg; -// translation[2] = m_ArgsInfo.transZ_arg; -// t3->SetTranslation(translation); -// t3->SetRotation(m_ArgsInfo.rotX_arg, m_ArgsInfo.rotY_arg, m_ArgsInfo.rotZ_arg); -// -// //For simplicity we set the center to the top left corner -// Transform3DType::InputPointType center; -// center[0] = 0.; -// center[1] = 0.; -// center[2] = 0.; -// t3->SetCenter(center); -// registration->SetTransform(t3); -// registration->SetInitialTransformParameters( t3->GetParameters()); -//} - } //====================================================================