// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
-
if (wxContourMainFrame::getInstance()!=NULL)
{
if ( wxContourMainFrame::getInstance()->GetFileLocation().empty()==false )
} // if FileLocation
} // if getInstance
}
-//=====
+
+//=====
// 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 OnSave::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
// bbSetInputIn(0);
-
}
-//=====
+
+//=====
// 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 OnSave::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
-
+// 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 OnSave::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbcreaContours
+
+}// EO namespace bbcreaContours
#include "bbcreaContourswxContourMainFrame_tool.h"
#include "bbcreaContoursPackage.h"
-#include "wxContourMainFrame.h"
-
namespace bbcreaContours
{
//=====
void wxContourMainFrame_tool::Process()
{
- printf("EED wxContourMainFrame_tool::Process start type=%d \n", bbGetInputType() );
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
// And print out the output value
{
wxContourMainFrame::getInstance()->ResetCamera();
} // Type 3
+
+ // OnSave
+ if (bbGetInputType()==4)
+ {
+ if (wxContourMainFrame::getInstance()!=NULL)
+ {
+ if ( wxContourMainFrame::getInstance()->GetFileLocation().empty()==false )
+ {
+ wxContourMainFrame::getInstance()->onSave();
+ } // if FileLocation
+ } // if getInstance
+ } // Type 4
+
+ // OnRead
+ if (bbGetInputType()==5)
+ {
+ // Todo.... implementd in JavaScript
+ } // Type 5
+
+ // GetContours
+ if (bbGetInputType()==6)
+ {
+ // Todo.... implementd in JavaScript
+ } // Type 6
+
+
+
} // if wxContourMainFrame::getInstance()!=NULL
-
- printf("EED wxContourMainFrame_tool::Process end\n" );
}
//=====
// Here we initialize the input 'In' to 0
bbSetInputType(0);
bbSetInputImage(NULL);
+ bbSetInputwxContourMainFrame(NULL);
}
//=====
#include "iostream"
#include "vtkImageData.h"
+#include "wxContourMainFrame.h"
namespace bbcreaContours
{
//=====
// 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( Type , int );
- BBTK_DECLARE_INPUT( Param1, std::vector<double> );
- BBTK_DECLARE_INPUT( Image , vtkImageData* );
- BBTK_DECLARE_OUTPUT( Out , std::vector<std::string> );
+ BBTK_DECLARE_INPUT( Type , int );
+ BBTK_DECLARE_INPUT( Param1 , std::vector<double> );
+ BBTK_DECLARE_INPUT( Param2 , std::vector<std::string> );
+ BBTK_DECLARE_INPUT( Image , vtkImageData* );
+ BBTK_DECLARE_INPUT( wxContourMainFrame, wxContourMainFrame* );
+ BBTK_DECLARE_OUTPUT( Out , std::vector<std::string> );
+ BBTK_DECLARE_OUTPUT( LstIndexs , std::vector<int> );
+ BBTK_DECLARE_OUTPUT( LstControlPointsX, std::vector<double> );
+ BBTK_DECLARE_OUTPUT( LstControlPointsY, std::vector<double> );
+ BBTK_DECLARE_OUTPUT( LstControlPointsZ, std::vector<double> );
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_PROCESS(Process);
BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxContourMainFrame_tool,bbtk::AtomicBlackBox);
BBTK_NAME("wxContourMainFrame_tool");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,JavaScript) (type4 in JavaScript) No Description.");
BBTK_CATEGORY("empty");
- BBTK_INPUT(wxContourMainFrame_tool,Type,"(default 0) Type 0:nothing 1:Isovalue segmentation of Image 2:Isovalue segmentation actual slice, 3:Reset Camera ",int,"");
- BBTK_INPUT(wxContourMainFrame_tool,Param1,"List of parameters Type1:[step,isovalue,sampling,method,x,y,min,max] Replace all old contours Type2:[isovalue,sampling,method,iSlice,x,y] Replace acutal slice ", std::vector<double>,"");
+ BBTK_INPUT(wxContourMainFrame_tool,Type,"(default 0) Type 0:nothing 1:Isovalue segmentation of Image, 2:Isovalue segmentation actual slice, 3:Reset Camera, 4:OnSave, 5:OnRead (JavaScript) 6:GetContours (JavaScript)",int,"");
+ BBTK_INPUT(wxContourMainFrame_tool,Param1,"List of parameters (vector double) Type1:[step,isovalue,sampling,method,x,y,min,max] Replace all old contours Type2:[isovalue,sampling,method,iSlice,x,y] Replace acutal slice ", std::vector<double>,"");
+ BBTK_INPUT(wxContourMainFrame_tool,Param2,"List of parameters (vector string) Type 4:Filename (JavaScript) Type 5:FileName (JavaScript) ", std::vector<std::string>,"");
BBTK_INPUT(wxContourMainFrame_tool,Image,"Image", vtkImageData*,"");
- BBTK_OUTPUT(wxContourMainFrame_tool,Out,"Type 4: Position of viewer ", std::vector<std::string>,"");
+ BBTK_INPUT(wxContourMainFrame_tool, wxContourMainFrame, "wxContourMainFrame (used in JavaScript)", wxContourMainFrame*, "");
+ BBTK_OUTPUT(wxContourMainFrame_tool,Out," ", std::vector<std::string>,"");
+ BBTK_OUTPUT(wxContourMainFrame_tool,LstIndexs," ", std::vector<int>,"");
+ BBTK_OUTPUT(wxContourMainFrame_tool,LstControlPointsX," ", std::vector<double>,"");
+ BBTK_OUTPUT(wxContourMainFrame_tool,LstControlPointsY," ", std::vector<double>,"");
+ BBTK_OUTPUT(wxContourMainFrame_tool,LstControlPointsZ," ", std::vector<double>,"");
BBTK_END_DESCRIBE_BLACK_BOX(wxContourMainFrame_tool);
//=====
// 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)