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

Matt McCormick matt.mccormick at kitware.com
Thu Oct 16 00:34:11 EDT 2014


Hi Jerome,

Writing out the Transform as the program progresses may work.  Then,
use a separate program to generate the resampled images from the input
images and the transform.

Also, the Transform Visualizer [1] available in the current Slicer
Nightly build [2] (soon to be 4.4.0), is a great tool.

Hope this helps,
Matt

[1] http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/TransformVisualizer

[2] http://download.slicer.org/

On Tue, Oct 14, 2014 at 9:42 PM, Jerome Plumat <j.plumat at auckland.ac.nz> wrote:
> 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 Insight-users mailing list