[Insight-developers] accessing metrics

Brian B Avants avants@grasp.cis.upenn.edu
Thu, 31 Jan 2002 19:18:56 -0500 (EST)


Lydia ,

Thank you for your input.  You have accurately classified my request.  I
think you are right about Luis's idea too.  But he is also noting that it
may sometimes be useful to explore the transformation parameter space
using only the supplied region, instead of the whole image.  This has
obvious computational advantages.  Having a general filter to visualize
metric parameter spaces, or projections of it, would also be interesting
and useful as Luis has shown in his 2d curve extractor.

I have included overloaded GetValue and GetDerivative functions in my
personal itk copy that do something like what you suggested.  If we decide
exactly what changes should be made, I would propagate them to all the
metrics (save MI, of course.)  The actual function I have been using does
this :

GetValue( const ParametersType & parameters, SizeType sz, IndexType ind )
{
  TargetConstPointer target = Superclass::GetTarget();
  TTarget::SizeType targetSize = sz;
  TTarget::IndexType targetIndex = ind;
  TTarget::RegionType targetRegion;
  targetRegion.SetSize( targetSize );
  targetRegion.SetIndex( targetIndex );
...
}

but supplying the region directly is probably better.


Thanks for your help.

Brian