[ITK] Deformation Field Perturbations

Matt McCormick matt.mccormick at kitware.com
Wed Jan 21 15:30:57 EST 2015


Hi James,

To modify the vector pixel components, use the Get() and Set() methods
of ImageRegionIterator[1]. More information on using Image Iterators
can be found in the ITK Software Guide [2].

HTH,
Matt

[1] http://www.itk.org/Doxygen/html/classitk_1_1ImageRegionIterator.html

[2] http://itk.org/ItkSoftwareGuide.pdf

On Wed, Jan 21, 2015 at 1:13 PM, Armstrong, Hirotatsu
<HIROTATSU.ARMSTRONG at ucdenver.edu> wrote:
> Hello,
>
>
>
> I would like to add small perturbations to the deformation field computed to
> ITK.  I create a registration filter through,
>
>
>
>                 typedef itk::Vector< float, Dimension >
> VectorPixelType;
>
>                 typedef itk::Image<  VectorPixelType, Dimension >
> DisplacementFieldType;
>
>                 typedef itk::SymmetricForcesDemonsRegistrationFilter<
>
>
> InternalImageType,
>
>
> InternalImageType,
>
>
> DisplacementFieldType> RegistrationFilterType;
>
>                 RegistrationFilterType::Pointer filter =
> RegistrationFilterType::New();
>
>
>
>                 CommandIterationUpdate::Pointer observer =
> CommandIterationUpdate::New();
>
>                 filter->AddObserver( itk::IterationEvent(), observer );
>
>                 filter->SetFixedImage( fixedImageCaster->GetOutput() );
>
>                 filter->SetMovingImage( matcher->GetOutput() );
>
>                 filter->SetNumberOfIterations( iterations );
>
>                 filter->SetStandardDeviations( sd );
>
>                 filter->SetNumberOfThreads(nprocs);
>
>                 filter->Update();
>
>
>
>
>
> Now, I believe I want to get a pointer to the DVF and an iterator by
> defining,
>
>
>
> DisplacementFieldType* DVF = filter->GetDisplacementField();
>
> ImageIterator it( DVF, DVF->GetRequestedRegion() );
>
>
>
>
>
> With this iterator, I am not quite sure how to access the x/y/z components
> of the DVF so that I can update them.  Any help would be appreciated.
> Thanks
>
>
>
>
>
> James Armstrong, Ph.D.
>
> PostDoctoral Fellow, Physics
>
> Department of Radiation Oncology
>
> University of Colorado School of Medicine
>
> 1665 Aurora Ct, MS F706
>
> Aurora, CO 80045
>
> 720-848-0257
>
>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list