[ITK] [ITK-users] how to visualise deformed volume along registration process

Jerome Plumat j.plumat at auckland.ac.nz
Tue Oct 14 21:42:19 EDT 2014


Hello everyone,
I'm facing to a problem and I hope some may have ideas to help me.

I'm using Multi Resolution Symmetric Log-Domain Diffeomorphic Demons 
Algorithm (http://www.insight-journal.org/browse/publication/644) to 
register volumes. The current results are not very good and I would like 
to observe them along the registration process.

My current solution uses object to display metrics and information along 
pyramid levels:

template <typename TRegistration>
class ShowProgressObject
{
public:
   ShowProgressLevelObject(TRegistration* o)
   {
     m_Process = o;
   }

   void ShowProgress()
   {
       std::cout << "Level: " << m_Process->GetCurrentLevel() << " ";
       std::cout << "Progress: " << m_Process->GetProgress() << "  ";
       std::cout << "Starting Metric: "   << 
m_Process->GetRegistrationFilter()->GetMetric()   << " ";
       std::cout << std::endl;

   }

   typename TRegistration::Pointer m_Process;
};

....

  typedef ShowProgressObject<RegistrationType> ProgressType;
   ProgressType  progressWatch(registrator);

   itk::SimpleMemberCommand<ProgressType>::Pointer command;
   command = itk::SimpleMemberCommand<ProgressType>::New();
   command->SetCallbackFunction(&progressWatch, 
&ProgressType::ShowProgress);


I would like to use this object to display the current deformed image at 
each level of the pyramid. My current (not so good) idea is to use fixed 
and moving images and current deformation field. I'm using warper to 
deform the moving image in the ShowProgressObject::ShowProgress function:
   warper->SetInput( m_originalMoving );
   warper->SetInterpolator( interpolator );
   warper->SetOutputSpacing( m_fixed->GetSpacing() );
   warper->SetOutputOrigin( m_fixed->GetOrigin() );
   warper->SetOutputDirection( m_fixed->GetDirection() );
   warper->SetDisplacementField( 
m_Process->GetRegistrationFilter()->GetDeformationField() );
   warper->Update();

Then the result would be display with QuickView.

But ... it appears that using fixed and moving images in this process 
makes them unavailable for the registration. I can make copies of them 
but this seems very inefficient.

Any recommendations or advices to achieve to display deformed image 
along process?

Thanks a lot.

-- 

Jerome
-------

School of Medical Sciences
University of Auckland

If I am not for myself, who will be for me? And if I am only for myself, then what an I? And if not now when? – Hillel HaZaken

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list