[Insight-developers] Number of parameters in itk::IdentityTransform is not 0
Bill Lorensen
bill.lorensen at gmail.com
Thu Apr 29 11:28:18 EDT 2010
A failing test with your chan es means there could be a backward
compatibility issue.
On Thu, Apr 29, 2010 at 10:28 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Looking at the source of itk::IdentityTransform, I see that it is
> initialized so that the m_Parameters member variable has size 1. Thus,
> the result from GetNumberOfParameters() is 1. Similarly, the
> m_Jacobian member variable is initialized to have size (image
> dimensions, 1).
>
> It seems to me that the IdentityTransform should have 0 parameters.
> The SetParameters() method does nothing, after all.
>
> I've tested changing the constructor in IdentityTransform to declare 0
> parameters and the Jacobian to have dimensions (image dimensions, 0)
> and run 'make tests'. Every test passes except for
> itkIdentityTransformTest, which segfaults when trying to access
> elements in the now-empty Jacobian matrix retrieved from an
> IdentityTransform. Unfortunately, there is no way to get the
> dimensions of an itk::Array2D, so I've had to remove the Jacobian test
> to make it pass instead of modifying it to check for the proper
> Jacobian dimensions.
>
> Am I right in thinking that the IdentityTransform should have 0
> parameters, or is there some subtlety in the registration framework
> that requires this? I understand that it probably hasn't been tested
> because who would try to optimize an IdentityTransform? For the
> record, I'm adapting the registration framework to fit image intensity
> models as well as spatial transforms, so getting an accurate number of
> parameters from the chosen transform is essential.
>
> If there is no good reason to report the number of parameters as 1,
> I'll report a bug in Mantis and follow the procedure for committing
> the fix.
>
> Thanks,
> Cory
>
> --
> Cory Quammen
> Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)
> Department of Computer Science
> University of North Carolina at Chapel Hill
> http://www.cs.unc.edu/~cquammen
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list