]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageImageSubstraction.h
Added Switch and Convolution Visualizations
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageImageSubstraction.h
index f2a18e9a2d918b16c59adefc36178536bffc664c..00822e2e58e3309f0fd1e208a11ce4d95ab864f7 100644 (file)
@@ -8,86 +8,11 @@
 #include <string>
 #include <vector>
 
+#include "Substraction.h"
 
-namespace bbPackRecalage
-{
 
-       class MyImageSubstraction 
+namespace bbPackRecalage
 {
-
-       //----------------------------------------------------------------------------------------
-       // Methods definition
-       //----------------------------------------------------------------------------------------
-       public:
-       //--------------------------
-       //Constructor & Destructor
-       //--------------------------            
-               MyImageSubstraction(vtkImageData* imageData1, vtkImageData* imageData2, int uZLevel,int lZLevel, std::vector<double> uColor, std::vector<double> lColor, std::vector<double> mColor);
-               ~MyImageSubstraction();
-       //--------------------------
-       //Methods
-       //--------------------------
-               /*
-               getting ready the points
-               */
-               void initialize(int dimensions[],double spacing[]);
-               /*
-               Calculate the new image and save it in the attribute imageResult
-               it is used if the user had given the imageData
-               */
-               void substractImage(vtkImageData* imageData1, vtkImageData* imageData2);
-               
-               /*
-               Returns the ImageResult
-               */
-               vtkImageData* getSubstractedImage();
-               
-               /*
-                Get Image Size
-               */
-               int getImageSize();
-               
-               /*
-               constructing image substract
-               */
-               void substract(vtkImageData* imageData1, vtkImageData* imageData2);
-               
-
-
-       //----------------------------------------------------------------------------------------
-       // Attributes declaration
-       //----------------------------------------------------------------------------------------
-       private: 
-               /*
-                Substracted Image
-               */
-               vtkImageData* imageResult;
-               /*
-                image size dimx*dimy*dimz
-               */
-               int sizeImage;
-               /*
-               upper zero level for doing the Substraction
-               */
-               int uZeroLevel;
-               /*
-               lower zero level for doing the Substraction
-               */
-               int lZeroLevel;
-               /*
-               Color for the upper threshold
-               */
-               int upperColor[3];
-               /*
-               Color for the lower threshold
-               */
-               int lowerColor[3];
-               /*
-               Color for the medium threshold
-               */
-               int mediumColor[3];
-};
-
 class bbPackRecalage_EXPORT ImageSubstraction
  : 
    public bbtk::AtomicBlackBox
@@ -103,6 +28,9 @@ class bbPackRecalage_EXPORT ImageSubstraction
   BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
   BBTK_PROCESS(Process);
   void Process();
+
+  private:
+               Substraction* subImage;
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageSubstraction,bbtk::AtomicBlackBox);