]> Creatis software - creaRigidRegistration.git/blob - lib/Transparency.h
f75c4dfbf6e11baabe4cf55e5fccc6f32537f652
[creaRigidRegistration.git] / lib / Transparency.h
1 #include "vtkImageData.h"
2 #include "vtkImageResample.h"
3 #include <iostream>
4 #include <fstream>
5 #include <string>
6 #include <vector>
7
8 class Transparency
9 {
10         public: 
11                 Transparency();
12                 ~Transparency();
13
14                 //Calculate the new image and save it in the attribute image
15                 void calculateImage();
16                 
17                 //Gets the result
18                 vtkImageData* getImage();
19                 
20                 void setImage1(vtkImageData *image);
21
22                 void setImage2(vtkImageData *image);
23
24                 void setPercent(int percent);
25
26                 //Initialize newImage points
27                 void initialize(int dimensions[], double spacing[]);
28
29                 //Constructs new transparent image
30                 void createImage(vtkImageData *img1, vtkImageData *img2, int sizeX, int sizeY);
31
32         // --- Atributes --- //
33         private: 
34
35                 bool _processed;
36
37                 int _type;
38
39                 vtkImageData *_image1;
40
41                 vtkImageData *_image2;
42
43                 //Resulting image
44                 vtkImageData *_newImage;
45
46                 //Percent of transparency for the second image
47                 double _percent;
48
49                 // Image 1 extent (iniX, finX, iniY, finY, iniZ, finZ)
50                 int extImg1[6];
51                 // Dimensionality image 1
52                 int dimImg1[3];
53                 // Image 1 spacing
54                 double spcImg1[3];
55
56                 // Image 2 extent (iniX, finX, iniY, finY, iniZ, finZ)
57                 int extImg2[6];
58                 // Dimensionality image 2
59                 int dimImg2[3];
60                 // Image 2 spacing
61                 double spcImg2[3];
62
63 };
64