[Insight-users] Problem with CenteredTransformInitializer
    Lodron, Gerald 
    Gerald.Lodron at joanneum.at
       
    Fri Nov  6 06:09:48 EST 2009
    
    
  
 
Hello
I try to make a rigid 3 d registration of two singed short images, i always get a compiler error when i want to use the CenteredTransformInitializer, here is my code
template <class TPixelSource=signed short,class TPixelTarget=signed short, unsigned int VImageDimension=3>
	typedef itk::Image< TPixelTarget, VImageDimension >			TargetImageType;
	typedef itk::Image< TPixelSource, VImageDimension >			SourceImageType;
	typedef float									InternalPixelType; 
	typedef itk::Image< InternalPixelType, VImageDimension >		InternalImageType;
	typedef itk::MultiResolutionImageRegistrationMethod<InternalImageType, InternalImageType >		RegistrationType;
	typedef typename RegistrationType::TransformType			TransformType;
	typedef itk::CenteredTransformInitializer<TransformType, TargetImageType, SourceImageType >		InitializerType;
		
	RegistrationType*	m_Registration = RegistrationType::New();
		
	TransformType* m_Transformation	= itk::AffineTransform<double, VImageDimension>::New();	
	m_Registration->SetTransform(m_Transformation);
	InitializerType* m_InitTransform = InitializerType::New();
	m_InitTransform->SetTransform(   m_Transformation ); //exception
Would be great if anyone could give me a hint,
Best regards
    
    
More information about the Insight-users
mailing list