[Insight-users] Inheriting fields from the BSplineDeformableTransform ?

motes motes mort.motes at gmail.com
Sun Feb 21 09:22:19 EST 2010


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?












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?
>


More information about the Insight-users mailing list