[Insight-users] applied resample vector filed at a RT image

Luis Ibanez luis.ibanez at kitware.com
Sun Nov 15 11:14:52 EST 2009


Hi Kuo,

Was the original RT dose image already aligned with the original CT image ?

--

Your process of resampling the deformation field using the RT dose image
sounds reasonable (assuming that the RT image was co-registered with
the original CT image).

Are the mis-alignments of the dose image comparable to the pixel size of
the RT image ?

One thing you may want to do is to upload the RT image in Paraview,
along with the resampled deformation field, to verify if things still align
correctly.

You could also do this with VV (the 4D Slicer).
http://www.creatis.insa-lyon.fr/rio/vv


      Please let us know what you find.


           Thanks


                 Luis


---------------------------------------
On Sun, Nov 8, 2009 at 10:10 PM, Hsiang-Chi Kuo <kuoxgx at gmail.com> wrote:
> Hi Luis,
>
> I am trying to warp a RT dose image file with a deformation field obtained
> from Demon registration. The original deformation field has resolution of
> 1mmx1mmx2.5mm. The dose image file has resolution of 2.5mmx2.5mmx2.5mm. I
> applied VectorResampleImageFilter to resample the deformation filed with the
> same resolution, size and origin as those of the dose image. ( I checked the
> old and new deformed image in para view, they look alike.) After I warp the
> dose image with the new deformation file, the new deform dose image look
> good at the z direction, however, the displacement of the dose image at x
> and y direction did not look the same as the displacement in the x and y
> direction of the deformation field (Images attached). Following is my code
> the resample the deformed field and wrap the deformed filed with the
> original dose image. It looks like my code only do a good job in the z
> direction where no resample of the resolution (and position) is needed.
> Anything wrong in my code?
>
> Thanks a lot for any of your input,
>
> Howard.
>
>   typedef itk::VectorResampleImageFilter<deFormImageType,deFormImageType>
> FilterType;
>    FilterType::Pointer nearestResampleFilter = FilterType::New();
>
>   typedef itk::IdentityTransform< double, Dimension >  TransformType;
>
>   TransformType::Pointer transform = TransformType::New();
>   nearestResampleFilter->SetTransform( transform );
>
>   typedef
> itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction<
>                        deFormImageType, double >  InterpolatorType;
>
>   InterpolatorType::Pointer vectorInterpolator = InterpolatorType::New();
>
>   InputImageType::Pointer fixedImage = reader->GetOutput();
>
>   InputImageType::SpacingType spacing;
>   spacing[0] = 2.5; // pixel spacing in millimeters along X
>   spacing[1] = 2.5; // pixel spacing in millimeters along Y
>   spacing[2] = 2.5; // pixel spacing in millimeters along Z
>
>  // typedef InputImageType::SpacingType    SpacingType;
>   typedef InputImageType::PointType      OriginType;
>   typedef InputImageType::RegionType     RegionType;
>   typedef InputImageType::SizeType       SizeType;
>
>  // const SpacingType spacing= fixedImage->GetSpacing();
>    const OriginType origin= fixedImage->GetOrigin();
>   const RegionType region= fixedImage->GetLargestPossibleRegion();
>   const SizeType size= region.GetSize();
>    nearestResampleFilter->SetInterpolator( vectorInterpolator );
>    nearestResampleFilter->SetOutputOrigin( origin );
>    nearestResampleFilter->SetOutputSpacing( spacing );
>    nearestResampleFilter->SetSize( size );
>    nearestResampleFilter->SetInput( deFormReader->GetOutput() );
>
> *********************************
>
>   typedef itk::WarpImageFilter< InputImageType, InputImageType,
> deFormImageType > WarperType;
>   typedef itk::LinearInterpolateImageFunction< InputImageType, double >
> LinearInterpolatorType;
>   WarperType::Pointer warper = WarperType::New();
>   LinearInterpolatorType::Pointer interpolator =
> LinearInterpolatorType::New();
>   warper->SetInput( fixedImage );
>   warper->SetInterpolator( interpolator );
>   warper->SetOutputSpacing( fixedImage->GetSpacing() );
>   warper->SetOutputOrigin( fixedImage->GetOrigin() );
>   warper->SetDeformationField( newDeFormReader->GetOutput() );
>
> ******************************


More information about the Insight-users mailing list