[Insight-developers] GetInverse is unusable -- patch attached

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 16 07:55:23 EDT 2008


Hi Pavel,

Thanks a lot for sharing your code with the ITK community.

Please note that the mechanism for contributing code to ITK involves
posting a paper (technical report) to the Insight Journal. The paper
should include the source code, tests for the code, as well as the
data and parameters needed to run the tests.

You will find details about the procedure in the following Wiki page:
http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_New_Classes_and_Algorithms

You may find useful to look at other papers in the Insight Journal,
[http://www.insight-journal.org] to get an idea of the typical content.


The paper style of the Insight Journal is closer to a technical report,
where you describe your classes and how to use them. You will find that
many papers are two or three pages long.


Please read the Wiki page about the procedure for contributing code
to ITK and let us know if you have any questions.



    Regards,


       Luis


-----------------------

Pavel Koshevoy wrote:
> Hi,
> 
> I've talked to my supervisors at the UofU and they agreed that I can contribute
> some of our code to ITK.
> 
> I've attached all the transforms I've mentioned earlier, except the triangle
> mesh transform -- that one will need some cleaning up and untangling from my
> helper classes.  I also have an ImageMosaicVarianceMetric for use when
> registering several images simultaneously -- there is no fixed image, all images
> are warped.  I'd be happy to contribute that as well, but right now it has
> external code dependencies which I don't want to drag along.
> 
> What is the right way to get this code contributed to ITK?  Can someone help me?
> 
> 	Pavel.
> 
> 
> Rupert Brooks wrote:
> 
>>Hi Pavel,
>>
>>I really like the idea of having a GetInverse method at the Transform
>>Base class level.  It would also be nice to have a Compose() method
>>for similar reasons.   Its also clever to make the
>>InverseTransformType different from the current transform type
>>(obvious in retrospect... but i hadnt thought of it).
>>
>>Its of course not up to me whether this gets implemented in the main
>>trunk.  Just a quick tip though - I have similar problems with my
>>code, but rather than patching ITK which as you point out is quite
>>painful for your users, i used a Facade class.  I tucked generic
>>Compose and Inverse methods (and misc other things) in there.  Much
>>less elegant though, it ends up amounting to a bunch of switch
>>statements.  Still, it might get you around your code distribution
>>issue in the short term.
>>
>>http://en.wikipedia.org/wiki/Facade_pattern
>>
>>In my case, my facade class takes a transform in its constructor, and
>>then supplies GetInverse(), and Compose methods(), and so forth for
>>that transform.
>>
>>That being said, the transforms you have created sound extremely
>>useful - I for one would be very interested in seeing an Insight
>>journal submission or other release.  I had been considering writing
>>something similar to your NewtonMethodInverse but never found the
>>time.
>>
>>Cheers,
>>Rupert B.
>>
>>
>>On Fri, Oct 10, 2008 at 10:55 AM, Pavel Koshevoy <koshevoy at sci.utah.edu> wrote:
>>
>>>Hi,
>>>
>>>I've been patching ITK since version 1.8.1 to provide a usable GetInverse
>>>API for transforms which don't have an analytic inverse, or have an
>>>approximate inverse transform of a different type.
>>>
>>>Requiring a patched ITK is a hurdle in the path of developers trying to
>>>build my image registration apps.  I really, really hope you merge this
>>>patch into the trunk.
>>>It's a very small change.  Basically, I define an InverseTransformPointer
>>>type and add virtual InverseTransformPointer GetInverse() const method.  The
>>>patch implements this API for itk::Transform, itk::IdentityTransform,
>>>itk::MatrixOffsetTransformBase, itk::ScaleTransform,
>>>itk::TranslationTransform.
>>>These are useful changes that make the ITK Transform classes far more
>>>useful. In my image registration apps I implement this API in my Legender
>>>Polynomial Transform, a Radial Basis Function Transform, Triangle Mesh
>>>Transform, Radial Distortion Transform, Cascaded Transform, and a generic
>>>Newtons Method Numeric Inverse Transform.
>>>
>>>I really hope someone takes a look at this short patch and adds it to the
>>>main ITK trunk.
>>>
>>>Thank you,
>>>  Pavel.
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 


More information about the Insight-developers mailing list