[Insight-users] Inheriting fields from the BSplineDeformableTransform ?

motes motes mort.motes at gmail.com
Sun Feb 21 07:28:45 EST 2010


I have made a transform that extends the itkBSplineDeformableTransform:

namespace itk
{

template <
    class TScalarType = double,          // Data type for scalars
    unsigned int NDimensions = 3,        // Number of dimensions
    unsigned int VSplineOrder = 3 >      // Spline order

class ITK_EXPORT  MyTransform : public BSplineDeformableTransform<
TScalarType, NDimensions, VSplineOrder >
{
public:


  /** Standard class typedefs. */
  typedef MyTransform                         Self;

  //  typedef Transform< TScalarType, NDimensions, NDimensions > Superclass;
  typedef BSplineDeformableTransform< TScalarType, NDimensions,
VSplineOrder > Superclass;

  typedef SmartPointer<Self>                                 Pointer;
  typedef SmartPointer<const Self>                           ConstPointer;






But as I understand I cannot use the following private fields declared
in the BSplineDeformableTransform in my subclass:


private:
  MyTransform(const Self&); //purposely not implemented
  void operator=(const Self&); //purposely not implemented

  /** The bulk transform. */
  BulkTransformPointer  m_BulkTransform;

  /** Variables defining the coefficient grid extend. */
  RegionType    m_GridRegion;
  SpacingType   m_GridSpacing;
  DirectionType m_GridDirection;
  OriginType    m_GridOrigin;

  DirectionType m_PointToIndex;
  DirectionType m_IndexToPoint;

  RegionType    m_ValidRegion;

  /** Variables defining the interpolation support region. */
  unsigned long m_Offset;
  bool          m_SplineOrderOdd;
  SizeType      m_SupportSize;
  IndexType     m_ValidRegionLast;
  IndexType     m_ValidRegionFirst;
...
...




I therefore manually need to copy all those fields to my subclass
MyTransform. Would it not make sense to declare those fields as
'protected' instead of 'private' in the orignal
BSplineDeformableTransform.h file  or am I missing the big picture
here?


More information about the Insight-users mailing list