2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
27 #include "vtkImageData.h"
35 //----------------------------------------------------------------------------------------
37 //----------------------------------------------------------------------------------------
39 //--------------------------
40 //Constructor & Destructor
41 //--------------------------
42 Substraction(vtkImageData* imageData1, vtkImageData* imageData2, int uZLevel,int lZLevel, std::vector<double> uColor, std::vector<double> lColor, std::vector<double> mColor);
44 //--------------------------
46 //--------------------------
48 getting ready the points
50 void initialize(int dimensions[],double spacing[]);
52 Calculate the new image and save it in the attribute imageResult
53 it is used if the user had given the imageData
55 void substractImage(vtkImageData* imageData1, vtkImageData* imageData2);
58 Returns the ImageResult
60 vtkImageData* getSubstractedImage();
68 constructing image substract
70 void substract(vtkImageData* imageData1, vtkImageData* imageData2);
73 Template method of substract for different image types
75 template <class T> void substractByType(T* dataImagePointer1, T* dataImagePointer2, T* dataImageResultPointer, vtkImageData *imageData1, vtkImageData *imageData2);
79 //----------------------------------------------------------------------------------------
80 // Attributes declaration
81 //----------------------------------------------------------------------------------------
86 vtkImageData* imageResult;
88 image size dimx*dimy*dimz
92 upper zero level for doing the Substraction
96 lower zero level for doing the Substraction
100 Color for the upper threshold
104 Color for the lower threshold
108 Color for the medium threshold