]> Creatis software - creaContours.git/commitdiff
3384 SetViewerWindowColorLevel box
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 21 Jan 2022 17:42:44 +0000 (18:42 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 21 Jan 2022 17:42:44 +0000 (18:42 +0100)
bbtk/src/bbcreaContoursSetViewerWindowColorLevel.cxx [new file with mode: 0644]
bbtk/src/bbcreaContoursSetViewerWindowColorLevel.h [new file with mode: 0644]

diff --git a/bbtk/src/bbcreaContoursSetViewerWindowColorLevel.cxx b/bbtk/src/bbcreaContoursSetViewerWindowColorLevel.cxx
new file mode 100644 (file)
index 0000000..d158ca7
--- /dev/null
@@ -0,0 +1,74 @@
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+#include "bbcreaContoursSetViewerWindowColorLevel.h"
+#include "bbcreaContoursPackage.h"
+namespace bbcreaContours
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,SetViewerWindowColorLevel)
+BBTK_BLACK_BOX_IMPLEMENTATION(SetViewerWindowColorLevel,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void SetViewerWindowColorLevel::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
+
+    if ( (bbGetInputWindowColorLevel().size()==2 ) && (bbGetInputwxContourMainFrame()!=NULL ))
+    {
+        double w=bbGetInputWindowColorLevel()[0];
+        double c=bbGetInputWindowColorLevel()[1];
+        bbGetInputwxContourMainFrame()->onBrigthnessColorWindowLevel(w,c);
+    } // if WindowColorLevel size    &&   wxContourMainFrame
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void SetViewerWindowColorLevel::bbUserSetDefaultValues()
+{
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+   std::vector<double> vecWindowColorLevel;
+   vecWindowColorLevel.push_back(1000);
+   vecWindowColorLevel.push_back(500);
+   bbSetInputWindowColorLevel(vecWindowColorLevel);
+   bbSetInputwxContourMainFrame(NULL);
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void SetViewerWindowColorLevel::bbUserInitializeProcessing()
+{
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void SetViewerWindowColorLevel::bbUserFinalizeProcessing()
+{
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+}
+
+} // EO namespace bbcreaContours
+
+
diff --git a/bbtk/src/bbcreaContoursSetViewerWindowColorLevel.h b/bbtk/src/bbcreaContoursSetViewerWindowColorLevel.h
new file mode 100644 (file)
index 0000000..995e0fd
--- /dev/null
@@ -0,0 +1,50 @@
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+#ifndef __bbcreaContoursSetViewerWindowColorLevel_h_INCLUDED__
+#define __bbcreaContoursSetViewerWindowColorLevel_h_INCLUDED__
+
+#include "bbcreaContours_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "wxContourMainFrame.h"
+
+namespace bbcreaContours
+{
+
+class bbcreaContours_EXPORT SetViewerWindowColorLevel
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(SetViewerWindowColorLevel,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+    BBTK_DECLARE_INPUT(wxContourMainFrame,wxContourMainFrame*);
+    BBTK_DECLARE_INPUT(WindowColorLevel,std::vector<double>);
+//  BBTK_DECLARE_OUTPUT(Out,double);
+    BBTK_PROCESS(Process);
+    void Process();
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(SetViewerWindowColorLevel,bbtk::AtomicBlackBox);
+    BBTK_NAME("SetViewerWindowColorLevel");
+    BBTK_AUTHOR("Info-Dev");
+    BBTK_DESCRIPTION("No Description.");
+    BBTK_CATEGORY("empty");
+    BBTK_INPUT(SetViewerWindowColorLevel,wxContourMainFrame,"wxContourMainFrame",wxContourMainFrame*,"");
+    BBTK_INPUT(SetViewerWindowColorLevel,WindowColorLevel,"(default [1000 500])    [window level,color level]",std::vector<double>,"");
+//    BBTK_OUTPUT(SetViewerWindowColorLevel,Out,"First output",double,"");
+BBTK_END_DESCRIBE_BLACK_BOX(SetViewerWindowColorLevel);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+}
+// EO namespace bbcreaContours
+
+#endif // __bbcreaContoursSetViewerWindowColorLevel_h_INCLUDED__
+