[Insight-users] Inheriting fields from the BSplineDeformableTransform ?

Bill Lorensen bill.lorensen at gmail.com
Sun Feb 21 07:56:55 EST 2010


You can access most of them via Get methods.

On Sun, Feb 21, 2010 at 7:28 AM, motes motes <mort.motes at gmail.com> wrote:
> 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?
> _____________________________________
> 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
>


More information about the Insight-users mailing list