]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorreyes <reyes>
Tue, 31 May 2011 15:43:24 +0000 (15:43 +0000)
committerreyes <reyes>
Tue, 31 May 2011 15:43:24 +0000 (15:43 +0000)
packages/vtk/src/bbvtkSimpleMathematics.h [new file with mode: 0644]

diff --git a/packages/vtk/src/bbvtkSimpleMathematics.h b/packages/vtk/src/bbvtkSimpleMathematics.h
new file mode 100644 (file)
index 0000000..63a8eec
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbvtkSimpleMathematics_h_INCLUDED__
+#define __bbvtkSimpleMathematics_h_INCLUDED__
+#include "bbvtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageMathematics.h>
+#include <vtkImageData.h>
+#include <vtkType.h>
+#include <vtkImageData.h>
+
+
+namespace bbvtk
+{
+
+
+class StaticLecture
+{
+public:
+       void setPixelValue(int i, int j, int k, vtkImageData* img, double value);
+       double getPixelValue(int i, int j, int k, vtkImageData* img);
+};
+
+
+class bbvtk_EXPORT SimpleMathematics
+ :
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(SimpleMathematics,bbtk::AtomicBlackBox);
+  BBTK_DECLARE_INPUT(In1,vtkImageData*);
+  BBTK_DECLARE_INPUT(In2,vtkImageData*);
+  BBTK_DECLARE_INPUT(Operation,int);
+  BBTK_DECLARE_INPUT(InConstant,double);
+  BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+  BBTK_PROCESS(Process);
+  void Process();
+
+  void crearPredeterminado();
+  void substractWithMinimum();
+  void MultiplyBy();
+
+  StaticLecture lector;
+
+  vtkImageMathematics* ope;
+  vtkImageData* constante;
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(SimpleMathematics,bbtk::AtomicBlackBox);
+BBTK_NAME("SimpleMathematics");
+BBTK_AUTHOR("_author_");
+BBTK_DESCRIPTION("_description_");
+BBTK_CATEGORY("__CATEGORY__");
+BBTK_INPUT(SimpleMathematics,In1,"",vtkImageData*,"");
+BBTK_INPUT(SimpleMathematics,In2,"",vtkImageData*,"");
+BBTK_INPUT(SimpleMathematics,InConstant,"",double,"");
+BBTK_INPUT(SimpleMathematics,Operation,"0:Add, 1:subtract, 2:multiply, 3:divide, 4:invert, 5:sin, 6:cos, 7:exp, 8:log, 9:abs",int,"");
+BBTK_OUTPUT(SimpleMathematics,Out,"",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(SimpleMathematics);
+}
+// EO namespace bbSimpleProcessing
+
+#endif // __bbvtkSimpleMathematics_h_INCLUDED__
+
+