]> Creatis software - clitk.git/blob - common/clitkOrientation.h
Initial revision
[clitk.git] / common / clitkOrientation.h
1 #ifndef CLITKORIENTATION_H
2 #define CLITKORIENTATION_H
3
4 /**
5  ===================================================================
6  * @file   clitkOrientation.h
7  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
8  * @date   01 Nov 2006 18:00:32
9
10  * @brief  
11
12  ===================================================================*/
13
14 // itk include
15 #include "itkSpatialOrientation.h"
16 #include "itkPoint.h"
17
18 namespace clitk {
19   
20    //====================================================================
21   // From a letter to an SpatialOrientation::CoordinateTerms
22   itk::SpatialOrientation::CoordinateTerms GetOrientation(char c);
23
24   //====================================================================
25   // From three letters to an SpatialOrientation
26   itk::SpatialOrientation::ValidCoordinateOrientationFlags GetOrientation(char a, char b, char c);
27   itk::SpatialOrientation::ValidCoordinateOrientationFlags GetOrientation(const std::string & orient);
28   
29   //====================================================================
30   // Check that the orientations are differents
31   bool CheckOrientation(itk::SpatialOrientation::CoordinateTerms a, itk::SpatialOrientation::CoordinateTerms b);
32    
33   //====================================================================
34   // Get orientation at position i
35   itk::SpatialOrientation::CoordinateTerms GetOrientation(const int i, const itk::SpatialOrientation::ValidCoordinateOrientationFlags orient);
36   
37   //====================================================================
38   // Find where is the dimension Dim in this orientaof orientation
39   int WhereIsDimInThisOrientation(const int dim, const itk::SpatialOrientation::ValidCoordinateOrientationFlags flag);
40   
41   //====================================================================
42   // Flip point coordinate
43   void FlipPoint(const itk::Point<double, 3> in, 
44                                  const itk::SpatialOrientation::ValidCoordinateOrientationFlags inFlag, 
45                                  const itk::SpatialOrientation::ValidCoordinateOrientationFlags outFlag, 
46                                  const itk::Point<double, 3> & imageSize,
47                                  itk::Point<double, 3> & out);
48   
49   //====================================================================
50   // Get the dimension of this term
51   int GetDim(const itk::SpatialOrientation::CoordinateTerms t); 
52
53 } // end namespace
54
55 #endif /* end #define CLITKORIENTATION_H */
56