[Insight-developers] Transform IO

Blezek, Daniel J (Research) blezek at crd.ge.com
Mon Mar 28 15:48:14 EST 2005


Stephen, Julien, et. al.,

  I finished my overhaul of itkTranformFile{Reader,Writer}.  I replaced the existing Reader/Writer, and implemented the details of the proposal.  While the implementation is working, the revision is _not_ complete, several outstanding things need to be done:

0) In itkTransformFactory, more "default" transform types need to be registered see lines 38-39.  Basically, each transform needs a line like this:

    TransformFactory::RegisterTransform<CenteredRigid2DTransform < float > >();

1) Each Transform must implement Set/GetFixedParameters.  I've done one class, itkMatrixOffsetTransformBase to handle Center.  Any class not overriding Get/SetFixedParameters will throw an exception when written or read.

2) Transforms that do not copy their parameters will not work in this new scheme.  Jim proposed adding a method to BSplineDeformableTransform to have it manage the parameters, rather than externally.

3) Set/GetFixedParameters is a placeholder name.  Suggestions as to a better name are welcome.

4) I no longer keep a copy of the parameters in TransformFileReader.  Related (2) above.

5) To register a new transform, i.e. a user defined transform, use the paradigm in (0).

6) The parser is extremely simple, as is the file format.  Do we care?  Jim suggested adding a name to each transform so it could be fetched by key, rather than by position in the file.

I'm going to run tests on my machines, and check it in.

Comments welcome,
-dan



-----Original Message-----
From: Stephen R. Aylward [mailto:aylward at unc.edu]
Sent: Monday, March 28, 2005 9:50 AM
To: Blezek, Daniel J (Research)
Cc: Julien Jomier; Miller, James V (Research);
insight-developers at itk.org
Subject: Re: [Insight-developers] Transform IO


What about just replacing the old transformreader/writer?

It wasn't part of 2.0, so I don't think it will disrupt many peoples' 
work even if the API changes...aside from us in the CADDLab :)

Stephen

Blezek, Daniel J (Research) wrote:
> Julien,  I bashed a good chunk of this out on Friday.  Where I'll need the most help is going through each transform and adding a Get/SetFixedParameters (will fill in Center, Spacing, etc...).  Also, we'll have to look at the BSpline Transform to get it to manage it's parameters...
> 
> My plan is to have a working reader/writer combination today, with a few supported Transforms.  Then I'll check it in.  I'm using the very clever name TransformFileWriter2 and TransformFileReader2.
> 
> -dan
> 
> -----Original Message-----
> From: insight-developers-bounces at itk.org
> [mailto:insight-developers-bounces at itk.org]On Behalf Of Julien Jomier
> Sent: Saturday, March 26, 2005 3:40 PM
> To: Miller, James V (Research)
> Cc: insight-developers at itk.org
> Subject: Re: [Insight-developers] Transform IO
> 
> 
> Jim,
> 
> I like the idea a lot. This will also allow to handle the order of the 
> spline for the BSpline transform.
> 
> Do you plan to add this functionality anytime soon? I'd be happy to help 
> with this if you want.
> 
> Julien
> 
> Miller, James V (Research) wrote:
> 
>>Dan Blezek and I have been drawing up a strawman on extending ITK's 
>>capabilities for reading and writing transformations.  We put a 
>>propososal on the Wiki.
>> 
>>http://www.itk.org/Wiki/Proposals:TransformIOFactory
>> 
>>The basic idea is to leverage ITK's factory mechanism so that the 
>>TransformFileReader can ask a TransformFactory to create a transform 
>>that matches the type of transformation specified in the file.  This 
>>will remove the need for the large switch statements in 
>>TransformFileReader/Writer.  Most importantly, however, it will allow a 
>>user to add a transformation type to the TransformFactory within their 
>>application without having to modify the TransformFileReader/Writer code.
>> 
>> 
>>
>>*Jim Miller*
>>*/_____________________________________/*
>>/Visualization & Computer Vision//
>>/GE Research/
>>/Bldg. KW, Room C218B/
>>/1 Research Circle, Schenectady NY 12309-1027/
>>
>>//_millerjv at research.ge.com <mailto:millerjv at research.ge.com>_/
>>
>>/_james.miller at research.ge.com_/
>>/(518) 387-4005, Dial Comm: 8*833-4005, /
>>/Cell: (518) 505-7065, Fax: (518) 387-6981/
>>
>> 
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers at itk.org
>>http://www.itk.org/mailman/listinfo/insight-developers
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers

-- 
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab.rad.unc.edu
aylward at unc.edu
(919) 966-9695


More information about the Insight-developers mailing list