[Insight-users] getbuffered region

Dan Mueller dan.muel at gmail.com
Wed Feb 17 02:35:49 EST 2010


Hi Yasser,

>  (1)  registration->SetFixedImageRegion( fixedImageRegion );
> (2) const unsigned in tnumberOfPixels = fixedImageRegion.GetNumberOfPixels();
Unfortunately both of those functions are not wrapped by ManagedITK...
If you really need them, you may have to add them yourself to
ManagedITK (not a trivial task).

> (3) optimizer->AddObserver( itk::IterationEvent(), observer );
registration.Iteration += OnRegistrationIterationHandler;

HTH

Cheers, Dan

On 17 February 2010 07:51, yasser salman <yass71 at yahoo.com> wrote:
> Hi Dan,
> Thanks for your support, continuing to the converting "Registration Example"  found in ITK  to MangedITK code  i have so many uncompleted steps :
>
> how can i convert
>
>  (1)  registration->SetFixedImageRegion( fixedImageRegion );
>        to MangedITK
>         i can't find any member (function or objects) to set *fixedimageRegion* in  MangedITK class itkImageRegistrationMethod
> (2) how can i get the number of pixels inside region
> in itk:           constunsignedintnumberOfPixels = fixedImageRegion.GetNumberOfPixels();
>                           but i can't corresponding in      itkImageRegion ;
> (3)
>
> optimizer->AddObserver( itk::IterationEvent(), observer );
>
> Thanks
> Yasser
>
>
>
>
> ----- Original Message ----
> From: Dan Mueller <dan.muel at gmail.com>
> To: yasser salman <yass71 at yahoo.com>
> Cc: khaled abdelaziz <khabaz at hotmail.com>
> Sent: Thu, February 11, 2010 1:00:24 PM
> Subject: Re: getbuffered region
>
> Hi Yasser,
>
> Responses inline below.
>
> On 11 February 2010 11:53, yasser salman <yass71 at yahoo.com> wrote:
>> Hi Dan,
>> I'm using mangedITK for registration,
>> in the registration example in ITK there are :
>>
>> (1) FixedImageType::RegionType fixedImageRegion =    fixedNormalizer->GetOutput()->GetBufferedRegion();
>>
>>        how i convert that to MangedITK
>> i tried that:itkImageRegionSregion = newitkImageRegion();Sregion = normalizeImageSource.GetOutput().?????;
>
> itkImageBase image = itk.itkImage_UC3.New(); // you need to create the
> correct image type here...
> fixedNormalizer.GetOutput(image);
> itkImageRegion region = image.BufferedRegion;
>
>> (2)  typedef RegistrationType::ParametersType ParametersType;
>>   ParametersType initialParameters( transform->GetNumberOfParameters() );
>
> itkArray<double> initialParameters = new itkArray<double>(
> transform.NumberOfParameters );
> initialParameters[0] = 0.0; // Set the initial parameters as desired
> ...
> transform.Parameters = initialParameters;
>
> Hope this helps.
>
> Cheers, Dan
>
>
>
>
>


More information about the Insight-users mailing list