]> Creatis software - clitk.git/blob - common/clitkOrientation.h
added the new headers
[clitk.git] / common / clitkOrientation.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef CLITKORIENTATION_H
19 #define CLITKORIENTATION_H
20 /**
21  ===================================================================
22  * @file   clitkOrientation.h
23  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24  * @date   01 Nov 2006 18:00:32
25
26  * @brief  
27
28  ===================================================================*/
29
30 // itk include
31 #include "itkSpatialOrientation.h"
32 #include "itkPoint.h"
33
34 namespace clitk {
35   
36    //====================================================================
37   // From a letter to an SpatialOrientation::CoordinateTerms
38   itk::SpatialOrientation::CoordinateTerms GetOrientation(char c);
39
40   //====================================================================
41   // From three letters to an SpatialOrientation
42   itk::SpatialOrientation::ValidCoordinateOrientationFlags GetOrientation(char a, char b, char c);
43   itk::SpatialOrientation::ValidCoordinateOrientationFlags GetOrientation(const std::string & orient);
44   
45   //====================================================================
46   // Check that the orientations are differents
47   bool CheckOrientation(itk::SpatialOrientation::CoordinateTerms a, itk::SpatialOrientation::CoordinateTerms b);
48    
49   //====================================================================
50   // Get orientation at position i
51   itk::SpatialOrientation::CoordinateTerms GetOrientation(const int i, const itk::SpatialOrientation::ValidCoordinateOrientationFlags orient);
52   
53   //====================================================================
54   // Find where is the dimension Dim in this orientaof orientation
55   int WhereIsDimInThisOrientation(const int dim, const itk::SpatialOrientation::ValidCoordinateOrientationFlags flag);
56   
57   //====================================================================
58   // Flip point coordinate
59   void FlipPoint(const itk::Point<double, 3> in, 
60                                  const itk::SpatialOrientation::ValidCoordinateOrientationFlags inFlag, 
61                                  const itk::SpatialOrientation::ValidCoordinateOrientationFlags outFlag, 
62                                  const itk::Point<double, 3> & imageSize,
63                                  itk::Point<double, 3> & out);
64   
65   //====================================================================
66   // Get the dimension of this term
67   int GetDim(const itk::SpatialOrientation::CoordinateTerms t); 
68
69 } // end namespace
70
71 #endif /* end #define CLITKORIENTATION_H */
72