KWStyle - itkOrientationAdapter.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkOrientationAdapter.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:43 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12   Portions of this code are covered under the VTK copyright.
13   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14
15      This software is distributed WITHOUT ANY WARRANTY; without even 
16      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
17 IND *****PURPOSE.  See the above copyright notices for more information.
18
19 =========================================================================*/
20
21
22 #ifndef __itkOrientationAdapter_h
23 #define __itkOrientationAdapter_h
24 #include "itkImageBase.h"
25
26 namespace itk
27 {
28 /** \class OrientationAdapterBase
29 LEN  *  \brief base class that converts Orientation representations to direction cosines.
30  *
31  * OrientationAdapterBase is a pure virtual base class that defines the
32  * member function signatures for any subclass that concretely defines the
33  * conversion relation between a method of representing orientation, and the
34  * direction cosines managed in itk::ImageBase.
35  */
36 template<class OrientationType, unsigned int Dimension = 3>
37 class OrientationAdapterBase
38 {
39 public:
40   /** typedef for matching ImageBase*/
41   typedef ImageBase<Dimension> ImageType;
42   
43   /** typedef for matching Direction Cosines type */
44   typedef typename ImageType::DirectionType DirectionType;
45
46   /** Convert direction cosines to the Orientation type */
47   virtual OrientationType FromDirectionCosines(const DirectionType &Dir) = 0;
48   /** Convert Orientation type direction cosines */
49   virtual DirectionType ToDirectionCosines(const OrientationType &Orient) = 0;
50 protected:
51 LEN   /** destructor, to silence "virtual class has non-virtual destructor()" warnings */
52   virtual ~OrientationAdapterBase() {}
53 };
54
55 // namespace itk
56 #endif // __itkOrientationAdapter_h
57

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:37PM
© Kitware Inc.