[Insight-users] Re:Registration

CSPL affable at hd2 . dot . net . in
Sat, 15 Nov 2003 12:53:05 +0530


 Dear Mr.Luis,

     I am initializing  CenteredAffineTransform using the
CenterdTransformInitializer.
 typedef

itk::CenteredTransformInitializer<TransformType,FixedImageType,MovingIm
>
 ageType >  TransformInitializerType;
TransformInitializerType::Pointer initializer =

TransformInitializerType::New();
initializer->SetTransform(   transform );
initializer->SetFixedImage(  FixedImage );
initializer->SetMovingImage( MovingImage );
initializer->MomentsOn();
 initializer->InitializeTransform();

I am defining the array of optimizerscales.

 NoofParams = transform->GetNumberOfParameters();

OptimizerType::Pointer optimizer = OptimizerType::New();
 typedef OptimizerType::ScalesType    OptimizerScalesType;
OptimizerScalesType optimizerScales( NoofParams );


const double translationScale = 1.0 / 100000;
optimizerScales.Fill( 1.0 );
 for( int i = 0; i <= 11; i++ )
 {
  optimizerScales[ i ] =  1.0 ;
 }
 optimizerScales[ 9 ]  =  translationScale;
 optimizerScales[ 10 ] =  translationScale;
 optimizerScales[ 11 ] =  translationScale;
 optimizerScales[ 12 ] =  translationScale;
 optimizerScales[ 13 ] =  translationScale;
 optimizerScales[ 14 ] =  translationScale;

 optimizer->SetScales( optimizerScales );


 Please check the code snippet and can you tell me where i am going wrong.


 Thanking you
 Regards,
 Srivalli.
 ----- Original Message -----
> From: "Luis Ibanez" <luis . ibanez at kitware . com>
> To: "CSPL" <affable at hd2 . dot . net . in>
> Cc: <insight-users at itk . org>
> Sent: Friday, November 14, 2003 11:24 AM
> Subject: Re: [Insight-users] Re:Registration
>
>
> > Hi Srivalli,
> >
> > Since you are using the CenteredAffineTransform, please
> > make sure that you initialize it by using the class:
> >
> >    CenteredTransformInitializer
> >
> > You will find examples on how to do this in the softwareguide
> >
> >     http://www . itk . org/ItkSoftwareGuide . pdf
> >
> >
> > and the source code in
> >
> >     Insight/Examples/Registration
> >
> > Also, make sure that you define the array of optimizerScales.
> > It is fundamental to scale the translation paramters with
> > respect to the rotation (matrix components) parameters.
> > You will also find examples about this in the SoftwareGuide.
> >
> >
> > Regards,
> >
> >
> >    Luis
> >
> >
> > --------------
> > CSPL wrote:
> > > Dear Mr.Luis,
> > >
> > >  ThankYou for your reply. I am enclosing the details about
registration
> > > components.
> > >
> > > Transform : CenteredAffineTransform
> > > Optimizer : RegularStepGradientDescentOptimizer
> > > Metric :MattesMutualInformationImageToImageMetric
> > > Interpolation :LinearInterpolateImageFunction
> > > Registration Method : MultiResolutionImageRegistrationMethod
> > > Pyramid : RecursiveMultiResolutionPyramidImageFilter
> > >
> > >
> > > Regards,
> > > SriValli.
> > > Your reply:
> > > Hi Srivalli,
> > >
> > > Here are some of the points to check
> > >
> > >
> > > 0) Make sure that the pixel spacing
> > >     and origin of your image are correctly
> > >     set in millimeters.
> > >
> > >
> > > 1) What registration components are you
> > >     using  ?
> > >
> > >     - optimizer ?
> > >     - metric    ?
> > >     - transform ?
> > >
> > >
> > > 2) Connect an Observer to the optimizer
> > >     and print out the metric value and
> > >     the transform parameters as the registration
> > >     progresses.
> > >
> > > 3) Plot the Metric values versus the number
> > >     of iterations and evaluate how noisy the
> > >     metric is, and how much it is increasing.
> > >
> > >
> > > The plots of Metric and transform parameters
> > > versus number of iterations are the best
> > > guidance for determining how to tune the
> > > parameters of a registration method.
> > >
> > > Please provide more details about the components
> > > you are combining.
> > >
> > >
> > > Thanks
> > >
> > >
> > >     Luis
> > >
> > > My question:
> > > Dear Mr.Luis,
> > >
> > >  I am working on medical image registration. I could get the single
> > > modality image registration well.
> > > But,Facing problems in MultiModalityRegistration.
> > > In my application I have to register MR and SPECT volumes, MR as FIXED
> > > and SPECT as MOVING.
> > > Both MR and SPECT are PreProcessed.
> > > MR is of size 256X256X120.
> > > Brain is extracted from skull in MR volume and the extracted brain is
> > > used as FIXED.
> > > ITK Neighbourhoodconnected filter is used to extract object based on
the
> > > given seed point and threshold range.
> > >
> > > SPECT is processed to make cubic voxels.
> > > Procesed to find the minimum dimension of SPECT  and creates a new
> > > volume with all  dimensions equal to minimum dimension.
> > >  Inititally SPECT is of size 128X128X49.After processing it will
become
> > > 128X128X96.Voxel Width, Voxel Height and Voxel Depth will be same.
> > >
> > > After preprocessing extracted brain and spect will be given as inputs
> > > for registration.
> > >
> > > To view the output of registration, I am merging SPECT with original
MR
> > > volume(includes both brain and skull) so that spect exactly fits in
the
> > > brain part.
> > > But, when I see the output spect is not positioning correctly.
> > > Sometimes I see that  middle slices are ok but,failing at last slices.
> > > I tried in many ways by chaning the parameters.
> > > I feel that registration depends on fixed and moving images. Parameter
> > > tuning can be succes only if input images are correct.
> > > Can you please tell us what could be the reason to fail?
> > > I am doubt whether I am  wrong in giving input images or in tuning
> > > parameters.
> >
> >
> >
> >
>