[Insight-developers] itkResampleImageFilter.h & itkWarpImageFilter.h and Software Archeology

kent williams norman-k-williams at uiowa.edu
Wed Mar 25 14:25:12 EDT 2009


That's what I did to the WarpImageFilter. It's doesn't just add flexibility
to the filter, it satisfies the principle of Least Specialization -- if you
only use methods of the parent class, don't make a parameter a pointer to a
derived class.

Actually I just made up the 'Principle of Least Specialization' but if you
think about it, it makes good sense.  It's a close relative of information
hiding -- information rationing. I.e. any  operation should only have access
to the information it actually needs to do its job.


On 3/25/09 1:16 PM, "Tom Vercauteren" <tom.vercauteren at gmail.com> wrote:

> Hi all,
> 
> If a modification is done to use a raw pointer, it might also be
> interesting to change it to a raw pointer to an ImageBase. Indeed the
> actual pixel type and pixel data of the reference image should not add
> any useful information.
> 
> This is what is done in the TransformToDeformationFieldSource in Rewiew.
> 
> My two cents,
> Tom
> 
> On Wed, Mar 25, 2009 at 18:59, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> The SetOutputParametersFromImage had the side effect of setting other
>> ivars, UseReferenceImageOn and the ReferenceImage. This is not good
>> practice in general to secretly change member data (at least in my
>> opinion).
>> 
>> Bill
>> 
>> 2009/3/25 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>> 
>>> 
>>> Hi Luis,
>>> 
>>> Nothing much to say about all of that, but
>>> 
>>> Le 25 mars 09 à 18:43, Luis Ibanez a écrit :
>>> 
>>>> If Backward-Compatibility wasn't a factor, I will suggest
>>>> 
>>>>   - Remove the SetOutputParametersFromConstImage() method.
>>>>     There was no reason for adding such method, when the
>>>>     same effect can be achieved by simply using a const raw
>>>>     pointer in the SetOutputParametersFromImage() method.
>>>> 
>>>>   - Make the SetOutputParametersFromImage() take a const
>>>>     raw pointer (not a smart pointer).
>>>> 
>>>>   - Solve the ambiguity and duplication of functionality
>>>>     between the SetReference() image and the
>>>>     SetOutputParametersFromImage() methods.
>>>> 
>>>> 
>>>>  I'm not sure that we can clean up this in a way that
>>>>  is consistent at this point...
>>>> 
>>>>  We could deprecate the ConstImage() method, but since deprecation
>>>>  doesn't imply removal, we have to maintain it anyways...
>>> 
>>> It would be nice to put that in the desirable non backward compatible
>>> changes, in the ITK 4.0 page on the wiki.
>>> 
>>>> 
>>>> 
>>>> 
>>>> ------
>>>> 
>>>> 
>>>> 
>>>>  Being positive and looking to the Future:
>>>>  ==========================================
>>>> 
>>>> 
>>>>  It looks like we *MUST* implement some sort of
>>>>  *systematic* code-review practice.
>>> 
>>> Yes, it would be great, but we may have a similar problem than with IJ
>>> contributions...
>>> 
>>> Regards,
>>> 
>>> Gaëtan
>>> 
>>> --
>>> Gaëtan Lehmann
>>> Biologie du Développement et de la Reproduction
>>> INRA de Jouy-en-Josas (France)
>>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>>> http://voxel.jouy.inra.fr  http://www.mandriva.org
>>> http://www.itk.org  http://www.clavier-dvorak.org
>>> 
>>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.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
>> 



Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.



More information about the Insight-developers mailing list