]> Creatis software - FrontAlgorithms.git/blob - appli/TempAirwaysAppli/AirwaysLib/airwaysTreeTypeDefinition.h
On my way... it does not work yet, but I think I'm on the good track.
[FrontAlgorithms.git] / appli / TempAirwaysAppli / AirwaysLib / airwaysTreeTypeDefinition.h
1 /*
2  * airwaysTreeTypeDefinition.h
3  *
4  *  Created on: May 19, 2014
5  *      Author: caceres
6  */
7
8 #ifndef AIRWAYSTREETYPEDEFINITION_H_
9 #define AIRWAYSTREETYPEDEFINITION_H_
10
11 //std
12 #include <vector>
13 #include <queue>
14 #include <cstddef>
15 #include <utility>
16 //boost
17 #include <boost/graph/adjacency_list.hpp>
18 //itk
19 #include "itkImage.h"
20 #include "itkConnectedComponentImageFilter.h"
21 #include "itkConstNeighborhoodIterator.h"
22 #include "itkImageDuplicator.h"
23 #include "itkSphereSpatialFunction.h"
24 #include "itkConnectedThresholdImageFilter.h"
25 #include "itkSubtractImageFilter.h"
26 #include "itkCastImageFilter.h"
27 //airways
28 #include "../MathLib/vec3.h"
29 #include "airwaysNode.h"
30 #include "airwaysEdge.h"
31
32 namespace airways
33 {
34         typedef std::pair<Vec3, double> pair_posVox_rad;
35         typedef std::vector<pair_posVox_rad> vec_pair_posVox_rad;
36
37         /**
38          * Pair of id nodes
39          */
40
41
42         /**
43          * Pair of a pair of nodes and a score
44          */
45         //typedef std::pair<pair_node_node,double> Pair_PairNodes_Score;
46
47         //----------------------------------------------------------------------------
48         /*
49          * Typedef declaration
50          */
51         /**
52          * @typedef Defines a graph using the Boost DiGraph library
53          */
54         typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS,
55                         pair_posVox_rad> DiGraph;
56         //end typedef Graph
57         //--------------------------------------------------------------------------
58         /**
59          * @typedef Defines boost::vertex_descriptor of DiGraph
60          */
61         typedef boost::graph_traits<DiGraph>::vertex_descriptor DiGraph_VertexDescriptor;
62         //--------------------------------------------------------------------------
63         ///DiGraph edge_descriptor
64         typedef boost::graph_traits<DiGraph>::edge_descriptor DiGraph_EdgeDescriptor;
65         //--------------------------------------------------------------------------
66         ///DiGraph edge pair
67         typedef std::pair<DiGraph_EdgeDescriptor, bool> DiGraph_EdgePair;
68         //--------------------------------------------------------------------------
69         ///DiGraph Vertex IndexMap
70         typedef boost::property_map<DiGraph, boost::vertex_index_t>::type DiGraph_VertexIndexMap;
71         //--------------------------------------------------------------------------
72         ///DiGraph VertexIterator
73         typedef boost::graph_traits<DiGraph>::vertex_iterator DiGraph_VertexIterator;
74         //--------------------------------------------------------------------------
75         ///DiGraph Vertex iterator pair
76         typedef std::pair<DiGraph_VertexIterator, DiGraph_VertexIterator> DiGraph_VertexIteratorPair;
77         //--------------------------------------------------------------------------
78         ///DiGraph Edge iterator
79         typedef boost::graph_traits<DiGraph>::edge_iterator DiGraph_EdgeIterator;
80         //--------------------------------------------------------------------------
81         ///DiGraph In Edge iterator
82         typedef boost::graph_traits<DiGraph>::in_edge_iterator DiGraph_InEdgeIterator;
83         //--------------------------------------------------------------------------
84         ///DiGraph Out Edge iterator
85         typedef boost::graph_traits<DiGraph>::out_edge_iterator DiGraph_OutEdgeIterator;
86         //--------------------------------------------------------------------------
87         ///DiGraph Adjacency iterator
88         typedef boost::graph_traits<DiGraph>::adjacency_iterator DiGraph_AdjacencyIterator;
89         //--------------------------------------------------------------------------
90         ///DiGraph Vertex descriptor vector
91         typedef std::vector<DiGraph_VertexDescriptor> DiGraph_VertexVector;
92         //--------------------------------------------------------------------------
93         ///DiGraph Vertex descriptor queue
94         typedef std::queue<DiGraph_VertexDescriptor> DiGraph_VertexQueue;
95         //--------------------------------------------------------------------------
96         ///DiGraph Edge descriptor vector
97         typedef std::vector<DiGraph_EdgeDescriptor> DiGraph_EdgeVector;
98         //----------------------------------------------------------------------------
99         const unsigned int Dim = 3;
100         typedef double TPixel;
101         typedef unsigned char TPixel2;
102         typedef itk::Image<TPixel, Dim> TInputImage;
103         typedef itk::Image<TPixel2, Dim> TInputImage2;
104         typedef itk::Image<unsigned short, Dim> TInputImage3;
105         //----------------------------------------------------------------------------
106         typedef itk::ImageDuplicator<TInputImage> DuplicatorType;
107         //--------------------------------------------------------------------------
108         typedef itk::ConstNeighborhoodIterator<TInputImage> ConstNeighborhoodIterator;
109         typedef itk::ImageRegionIterator<TInputImage> RegionIterator;
110         //----------------------------------------------------------------------------
111         typedef itk::SphereSpatialFunction<> SphereType;
112         //----------------------------------------------------------------------------
113         typedef itk::ConnectedThresholdImageFilter<TInputImage, TInputImage> ConnectedFilterType;
114         //----------------------------------------------------------------------------
115         typedef itk::SubtractImageFilter<TInputImage, TInputImage> SubtractImageFilterType;
116         //----------------------------------------------------------------------------
117         typedef itk::CastImageFilter<TInputImage, TInputImage2> CastFilterType;
118         typedef itk::ConnectedComponentImageFilter<TInputImage2, TInputImage3> ConnectedComponentImageFilterType;
119         //----------------------------------------------------------------------------
120
121         //----------------------------------------------------------------------------
122         typedef std::vector<Edge*> EdgeVector;
123         //----------------------------------------------------------------------------
124         typedef std::queue<Vec3> Vec3Queue;
125         typedef std::vector<Vec3> Vec3List;
126 //
127 /*
128  * End of typedef declaration
129  */
130 }
131
132 #endif /* AIRWAYSTREETYPEDEFINITION_H_ */