[Insight-users] warper filter too slow
Peymon Gazi
peymon.gazi at yahoo.com
Wed Dec 12 11:49:27 EST 2012
Hi Bao,
I basically used the example provided in the itk package for GPU Demons: itkGPUDemonsRegistrationFilterTest.cxx
Here are some important parts of my code:
const unsigned int Dimension = 3;
typedef float PixelType;
typedef float InternalPixelType;
typedef itk::Vector< float, Dimension > VectorPixelType;
typedef itk::GPUImage< VectorPixelType, Dimension > DeformationFieldType;
typedef itk::GPUDemonsRegistrationFilter< InternalImageType, InternalImageType, DeformationFieldType> RegistrationFilterType;
RegistrationFilterType::Pointer filter = RegistrationFilterType::New();
typedef itk::WarpImageFilter< MovingImageType, MovingImageType, DeformationFieldType > WarperType;
typedef itk::LinearInterpolateImageFunction< MovingImageType, double > InterpolatorType;
WarperType::Pointer warper = WarperType::New();
InterpolatorType::Pointer interpolator = InterpolatorType::New();
warper->SetInput( movingImage );
warper->SetInterpolator( interpolator );
warper->SetOutputSpacing( fixedImage->GetSpacing() );
warper->SetOutputOrigin( fixedImage->GetOrigin() );
warper->SetOutputDirection( fixedImage->GetDirection() );
warper->SetOutputSize(fixedImage->GetLargestPossibleRegion().GetSize());
warper->SetEdgePaddingValue(0);
warper->SetDisplacementField( filter->GetOutput() );
warper->Update();
fixedImage and movingImage are both matrices with the size of 64x64x64 (float).
Peymon
________________________________
From: Baohua Wu <baowu99 at gmail.com>
To: Peymon Gazi <peymon.gazi at yahoo.com>; insight-users at itk.org
Sent: Tuesday, December 11, 2012 5:04 PM
Subject: Re: [Insight-users] warper filter too slow
Hi Peyman,
Coud you tell us which image warping filter you
use? It would be nice to show some code here. Thank you!
Bao
----- Original Message -----
>From: Peymon Gazi
>To: insight-users at itk.org
>Sent: Tuesday, December 11, 2012 7:00 PM
>Subject: [Insight-users] warper filter too slow
>
>
>Hi all,
>I'm using a multi-resolution Demons registration framework to
register two data sets. I use the filter implemented on GPU. It works fine;
however the it takes a long time to warp the moving image using the
displacement filter. My datasets are 2 64x64x64 (float) matrices, the whole
demons registration process takes less than a minute, but the warping step
takes about 10 minutes.
>Any ideas?
>Peymon
>
>________________________________
> _____________________________________
>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://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121212/c0d20c5b/attachment.htm>
More information about the Insight-users
mailing list