]> Creatis software - creaRigidRegistration.git/blob - lib/Substraction.h
85a3991528688ca9fd308eb21b52e7a53c1a284b
[creaRigidRegistration.git] / lib / Substraction.h
1 #include "vtkImageData.h"
2
3 #include <string>
4 #include <vector>
5
6 class Substraction 
7 {
8
9         //----------------------------------------------------------------------------------------
10         // Methods definition
11         //----------------------------------------------------------------------------------------
12         public:
13         //--------------------------
14         //Constructor & Destructor
15         //--------------------------            
16                 Substraction(vtkImageData* imageData1, vtkImageData* imageData2, int uZLevel,int lZLevel, std::vector<double> uColor, std::vector<double> lColor, std::vector<double> mColor);
17                 ~Substraction();
18         //--------------------------
19         //Methods
20         //--------------------------
21                 /*
22                 getting ready the points
23                 */
24                 void initialize(int dimensions[],double spacing[]);
25                 /*
26                 Calculate the new image and save it in the attribute imageResult
27                 it is used if the user had given the imageData
28                 */
29                 void substractImage(vtkImageData* imageData1, vtkImageData* imageData2);
30                 
31                 /*
32                 Returns the ImageResult
33                 */
34                 vtkImageData* getSubstractedImage();
35                 
36                 /*
37                  Get Image Size
38                 */
39                 int getImageSize();
40                 
41                 /*
42                 constructing image substract
43                 */
44                 void substract(vtkImageData* imageData1, vtkImageData* imageData2);
45                 
46
47
48         //----------------------------------------------------------------------------------------
49         // Attributes declaration
50         //----------------------------------------------------------------------------------------
51         private: 
52                 /*
53                  Substracted Image
54                 */
55                 vtkImageData* imageResult;
56                 /*
57                  image size dimx*dimy*dimz
58                 */
59                 int sizeImage;
60                 /*
61                 upper zero level for doing the Substraction
62                 */
63                 int uZeroLevel;
64                 /*
65                 lower zero level for doing the Substraction
66                 */
67                 int lZeroLevel;
68                 /*
69                 Color for the upper threshold
70                 */
71                 int upperColor[3];
72                 /*
73                 Color for the lower threshold
74                 */
75                 int lowerColor[3];
76                 /*
77                 Color for the medium threshold
78                 */
79                 int mediumColor[3];
80                 /*
81                 Image type
82                 */
83                 int imageType;
84 };
85