[Insight-users] getbuffered region

yasser salman yass71 at yahoo.com
Wed Feb 17 01:51:58 EST 2010


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