1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
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.
13 It is distributed under dual licence
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
21 ===================================================================
22 * @file clitkOrientation.h
23 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24 * @date 01 Nov 2006 18:00:32
28 ===================================================================*/
31 #include "itkSpatialOrientation.h"
36 //====================================================================
37 // From a letter to an SpatialOrientation::CoordinateTerms
38 itk::SpatialOrientation::CoordinateTerms GetOrientation(char c);
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);
45 //====================================================================
46 // Check that the orientations are differents
47 bool CheckOrientation(itk::SpatialOrientation::CoordinateTerms a, itk::SpatialOrientation::CoordinateTerms b);
49 //====================================================================
50 // Get orientation at position i
51 itk::SpatialOrientation::CoordinateTerms GetOrientation(const int i, const itk::SpatialOrientation::ValidCoordinateOrientationFlags orient);
53 //====================================================================
54 // Find where is the dimension Dim in this orientaof orientation
55 int WhereIsDimInThisOrientation(const int dim, const itk::SpatialOrientation::ValidCoordinateOrientationFlags flag);
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);
65 //====================================================================
66 // Get the dimension of this term
67 int GetDim(const itk::SpatialOrientation::CoordinateTerms t);
71 #endif /* end #define CLITKORIENTATION_H */