Hi Vahid,

the current class interface of the mitk::ImageRegistrationMethod cannot provide 
a method for returning an itk::Image. The only Output methods of the 
RegistrationMethod class come through inheritance from the mitk::ImageSource 
base class and are of return type mitk::Image::Pointer.  The template-free 
interface of the filter classes, is one of the main design principles in MITK. 
A direct access to the itk::Image, however, would require the usage of 
templates.

To still give access to an ITK image, MITK provides several adaptor classes for 
casting between mitk::Image and itk::Image<TPixel>. They mainly just 
reinterpret the raw image data as in itk::Image.

There is more about the adaptors in the online documentation 
http://docs.mitk.org/2014.03/group__Adaptor.html#MitkToItk

In your case, you will need something like:

// your registration code snippet
// [...]

typedef itk::Image< TPixel, VImageDimension > ItkImageType;
typename ItkImageType::Pointer itk_image = ItkImageType::New();

mitk::CastToItkImage( registration->GetOutput(), itk_image );


Best,
Jan




From: vahid kadivarkadivar [mailto:vahidkadiva...@gmail.com]
Sent: Dienstag, 1. September 2015 07:59
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] itk::image in mitk::ImageRegistrationMethod

Hi,
I try to find a GetOutPut Method or some thing like that in  
mitk::ImageRegistrationMethod class for  get out put from this registration 
class as  itk::Image
How can get a itk::image after   mitk::ImageRegistrationMethod pipeline 
operation is there this state


   registration->SetObserver(m_Observer);

    registration->SetInterpolator(m_Controls.m_InterpolatorBox->currentIndex());

    registration->SetReferenceImage(fimage);

    registration->SetInput(mimage);

...

..

get an itk::image ???

Thanks
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to