[Insight-users] Inheriting fields from the BSplineDeformableTransform ?
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Sun Feb 21 10:20:29 EST 2010
Le 21 févr. 10 à 15:22, motes motes a écrit :
> Ok it seems that BSplineDeformableTransform is not designed to be
> extended.
>
> 1) Not possible to extend InsideValidRegion() since its private.
> 2) Not possible to access the private fields:
>
> bool m_SplineOrderOdd;
> SizeType m_SupportSize;
>
> no GetMacro.
>
> Currently the best solution as I see it is to extend itkTransform
> instead and copy everything from BSplineDeformableTransform to the
> subclass. Not a very optimal approach though (a lot of already
> existing code is duplicated).
>
> A better alternative would be to change the private visibility of the
> fields in the BSplineDeformableTransform to 'protected'. Any comments
> on this suggestion?
>
>
Hi Motes,
I would suggest to modify BSplineDeformableTransform to fit your needs
in your local copy of ITK, and to provide a patch that can be reviewed.
Regards,
Gaëtan
>
>
>
>
>
>
>
>
>
>
> On Sun, Feb 21, 2010 at 2:35 PM, motes motes <mort.motes at gmail.com>
> wrote:
>> Ah of course thanks! But inside a function in my subclass I need to
>> do:
>>
>> bool inside = this->InsideValidRegion( index );
>>
>> Now the InsideValidRegion function is also declared as private. There
>> is the following macro:
>>
>> /** Return the region of the grid wholly within the support region
>> */
>> itkGetConstReferenceMacro( ValidRegion, RegionType );
>>
>>
>> but that gives me the whole region and not a bool. I assume that I
>> need to copy this function to my subclass to make it work?
>>
> _____________________________________
> 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://www.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-users
--
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.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100221/b6f2a428/attachment.pgp>
More information about the Insight-users
mailing list