[Insight-users] ImageRegistrationHistogramPlotter MattesMutualInformation

Luis Ibanez luis.ibanez at kitware.com
Mon Sep 3 09:15:21 EDT 2007


Hi Lars,

The MattesMutualInformation metric does not derive from the
HistogramImageToImageMetric class, but still uses an internal
Joint Histogram.


This Joint histogram is stored in the member variable

                   m_JointPDF

of type:

   typedef float PDFValueType;
   typedef Image<PDFValueType,2> JointPDFType;


This member variable is currently not exposed, so you may
have to enjoy the pleasure of Open Source and modify this
class and add a GetMacro to the header file.  Something
like:


   itkGetConstObjectMacro( JointPDF, JointPDFType );


after which you can use

  typedef  MetricType::JointPDFType::Pointer HistogramType;
  HistogramType::ConstPointer histogram = metric->GetJointPDF()

  itk::ImageFileWriter< HistogramType > WriterType;
  WriterType::Pointer writer = WriterType::New();
  writer->SetInput( jointHistogram );
  writer->SetFileName( histogramForIterationXFilename );
  writer->Update();


Note that you could just add also to the Metric itself
the capability for saving the joint histogram at every
invocation of GetValue() or GetValueAndDerivative().




    Regards,


        Luis


---------------------
Lars Nygard wrote:
> Hi all,
> 
> Im was trying to write out histograms after every iteration. Im using
> MattesMutualInformation and I tried to use the example 
> ImageRegistrationHistogramPlotter. However MattesMutualInformation
> is not derived from HistogramImageToImageMetric. Is it possible to write
> out histograms when using MattesMutualInformation??
> thanks,
> Lars Nygard
> 
> 
> 
> 
>       
> _________________________________________________________
> Alt i én. Få Yahoo! Mail med adressekartotek, kalender og
> notisblokk. http://no.mail.yahoo.com
> _______________________________________________
> 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