[Insight-users] Where I can find examples or paper about

Luis Ibanez luis.ibanez at kitware.com
Wed May 18 21:37:28 EDT 2005



Hi Javier,



Please be more specific.

Our divinatory skills are quite limited and
tend to fade as we are rapidly aging.





When you say:



          "It does not work"



Do you mean:


1) It doesn't compile  ?
2) It compiles but does not link ?
3) It links but produces segmentation faults at run time ?
4) It throws exceptions at run time ?
5) It runs without crashing but the registration result
    does not aligns the images as expected  ?



We will be more than happy to help you, but we need your
help in providing enough information about your problem.




BTW, note that *ALL* the code shown in the software guide
is available in the directory Insight/Examples

In particular... the image registration examples are available
in


       Insight/Examples/Registration


You could happily go straight for the files:


       ImageRegistration14.cxx
       ImageRegistration15.cxx
       ImageRegistration16.cxx


where that metric is used.




These examples are compiled and executed every night in 55
different platforms ranging from cygwin, to Linux, to IRIX.

http://www.itk.org/Testing/Dashboard/20050517-0500-Nightly/TestDetail/__Examples_Registration_ImageRegistration14Test.html





Regards,



     Luis




---------------------------
javier silva bravo wrote:

> Yes Luis but I don undertand why it does not work.
> 
> In the guide says:
> 
> typedef itk::MutualInformationImageToImageMetric<
> 
> InternalImageType,
> 
> InternalImageType > MetricType;
> 
> MetricType::Pointer metric = MetricType::New();
> registration->SetMetric( metric );
> 
> metric->SetFixedImageStandardDeviation( 0.4 );
> metric->SetMovingImageStandardDeviation( 0.4 );
> metric->SetNumberOfSpatialSamples( 50 );
> 
> typedef itk::NormalizeImageFilter<
> FixedImageType,
> InternalImageType
>  > FixedNormalizeFilterType;
> typedef itk::NormalizeImageFilter<
> MovingImageType,
> InternalImageType
>  > MovingNormalizeFilterType;
> FixedNormalizeFilterType::Pointer fixedNormalizer =
> FixedNormalizeFilterType::New();
> MovingNormalizeFilterType::Pointer movingNormalizer =
> MovingNormalizeFilterType::New();
> 
> fixedNormalizer->SetInput( fixedImageReader->GetOutput() );
> 
> movingNormalizer->SetInput( movingImageReader->GetOutput() );
> 
> Now tell me what am i doing wrong?
> 
> typedef itk::MutualInformationImageToImageMetric<
>                                  FixedImageType,
>          MovingImageType> MetricType;
>   typedef itk::NormalizeImageFilter<
>                                     FixedImageType,
>                                     InternalImageType> 
> FixedNormalizeFilterType;
>  
>   typedef itk::NormalizeImageFilter<
>                                     MovingImageType,
>                                     InternalImageType> 
> MovingNormalizeFilterType;
> 
> FixedNormalizeFilterType::Pointer fixedNormalizer = 
> FixedNormalizeFilterType::New();
>   MovingNormalizeFilterType::Pointer movingNormalizer = 
> MovingNormalizeFilterType::New();
> 
>   MetricType::Pointer         metric        = MetricType::New();
> 
>   fixedNormalizer->SetInput( fixedImage );
>   movingNormalizer->SetInput( movingImageReader->GetOutput() );
> 
>   registration->SetFixedImage(  fixedNormalizer->GetOutput()   );
>   registration->SetMovingImage(   movingNormalizer->GetOutput() );
>   
>   metric->SetFixedImage(   fixedNormalizer->GetOutput()  );
>   metric->SetMovingImage(   movingNormalizer->GetOutput()   );
>   interpolator->SetInputImage(movingImageReader->GetOutput());
> 
>  FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion();
>  
>   registration->SetFixedImageRegion( fixedRegion );
>   metric->SetFixedImageRegion(fixedRegion);
> 
> metric->SetTransformParameters( transform->GetParameters() );
> 
> metric->SetInterpolator( interpolator );
> 
> metric->SetFixedImageStandardDeviation(0.49);
> 
> metric->SetMovingImageStandardDeviation(0.49);
> 
> metric->SetNumberOfSpatialSamples( 50 );
> 
> metric->SetComputeGradient(1);
> 
> 
> 
>  
> 
> 
> 
> 
>  >From: Luis Ibanez <luis.ibanez at kitware.com>
>  >To: javier silva bravo <javier_silva_bravo at hotmail.com>
>  >CC: insight-users at itk.org
>  >Subject: Re: [Insight-users] Where I can find examples or paper about
>  >Date: Wed, 18 May 2005 17:51:51 -0400
>  >
>  >
>  >Hi Javier,
>  >
>  >You will find detailed information about both of your
>  >questions in the ITK Software Guide:
>  >
>  >
>  >      http://www.itk.org/ItkSoftwareGuide.pdf
>  >
>  >
>  >The guide describe examples on how to use the ImageSeries
>  >and how to do multi-modality registration.
>  >
>  >
>  >The code for this examples is avalable in the directory
>  >
>  >
>  >           Insight/Examples
>  >
>  >
>  >
>  >
>  >    Regards,
>  >
>  >
>  >        Luis
>  >
>  >
>  >--------------------------
>  >javier silva bravo wrote:
>  >
>  >>itk::NumericSeriesFileNames
>  >>I need read and write a secuence of Images.
>  >>and where i can find too information about
>  >>MuttualInformationImagetoImageMetric? because I dont know how to
>  >>use them.
>  >>  Thank you.
>  >>
>  >>------------------------------------------------------------------------
>  >>MSN Premium. Protégete, Comunícate y Diviértete Haz clic aquí
>  >><http://g.msn.com/8HMBESMX/2743??PS=47575>
>  >>
>  >>
>  >>------------------------------------------------------------------------
>  >>
>  >>_______________________________________________
>  >>Insight-users mailing list
>  >>Insight-users at itk.org
>  >>http://www.itk.org/mailman/listinfo/insight-users
>  >
>  >
>  >
> 
> ------------------------------------------------------------------------
> T1msn Hotmail Plus. Más espacio, más funcional Haz clic aquí 
> <http://g.msn.com/8HMBESMX/2755??PS=47575>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list