BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,nDimensions)
BBTK_BLACK_BOX_IMPLEMENTATION(nDimensions,bbtk::WxBlackBox);
+
void nDimensions::Process()
{
double **vectx = 0, **vecty = 0, **vectz = 0;
-
std::vector< void * > vectortemp;
std::vector<int> size;
vtkImageData **mask = 0, **value = 0;
-
vtkImageData* img = bbGetInputIn();
-
std::vector<vtkImageData*> selectedimages;
if(img!=NULL && currentimg!=img)
{
BBTK_DECLARE_OUTPUT(SizeContour,std::vector <int>);
BBTK_DECLARE_OUTPUT(wxContourMainFrame,wxContourMainFrame*);
-
private:
//wxContourMainFrame* frame;
vtkImageData* currentimg;
--- /dev/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)
+//=====
+#include "bbcreaContoursSetFileLocation.h"
+#include "bbcreaContoursPackage.h"
+
+#include "wxContourMainFrame.h"
+
+
+namespace bbcreaContours
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,SetFileLocation)
+BBTK_BLACK_BOX_IMPLEMENTATION(SetFileLocation,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 SetFileLocation::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')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+printf("EED SetFileLocation::Process Start %s \n", bbGetInputFileLocation().c_str() );
+
+ if (wxContourMainFrame::getInstance()->GetFileLocation().empty()==true)
+ {
+ wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() );
+ }else {
+ wxContourMainFrame::getInstance()->onSave();
+ wxContourMainFrame::getInstance()->deleteAllContours();
+ wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() );
+ } // if FileLocaton
+
+ wxContourMainFrame::getInstance()->onLoad();
+ wxContourMainFrame::getInstance()->RefreshInterface();
+
+printf("EED SetFileLocation::Process End\n");
+
+}
+//=====
+// 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 SetFileLocation::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputFileLocation("");
+
+}
+//=====
+// 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 SetFileLocation::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 SetFileLocation::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaContours
+
+
--- /dev/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)
+//=====
+#ifndef __bbcreaContoursSetFileLocation_h_INCLUDED__
+#define __bbcreaContoursSetFileLocation_h_INCLUDED__
+
+#include "bbcreaContours_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbcreaContours
+{
+
+class bbcreaContours_EXPORT SetFileLocation
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(SetFileLocation,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(FileLocation, std::string);
+// 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(SetFileLocation,bbtk::AtomicBlackBox);
+ BBTK_NAME("SetFileLocation");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(SetFileLocation,FileLocation,"File Location",std::string,"");
+
+// BBTK_OUTPUT(SetFileLocation,Out,"First output",double,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(SetFileLocation);
+//=====
+// 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 // __bbcreaContoursSetFileLocation_h_INCLUDED__
+
void interfImageToolsMenu::onInformationPressed(wxCommandEvent& event)
{
-printf("EED interfImageToolsMenu::onInformationPressed start\n");
interfMainPanel::getInstance()->onInformationPressed();
-printf("EED interfImageToolsMenu::onInformationPressed end\n");
}
void interfImageToolsMenu::onConfigurationPressed(wxCommandEvent& event)
mp->SetPointX( vecOut[0] );
mp->SetPointY( vecOut[1] );
mp->SetPointZ( vecOut[2] );
- }
+ } // for i
_theViewPanel->getSceneManager()->createCopyContourOf( anExistingKName, cloneName, manualModel , append );
}
}
-void wxContourMainFrame::saveFileWithContoursAutomatique(){
+void wxContourMainFrame::saveFileWithContoursAutomatique()
+{
+printf("EED wxContourMainFrame::saveFileWithContoursAutomatique \n");
std::string filename = kernelManager->getCurrentFileName();
if(filename.compare("")!=0){
saveFileWithContours(filename);
onSave();
}
}
-void wxContourMainFrame::ShowToolsPanel(bool show){
+void wxContourMainFrame::ShowToolsPanel(bool show)
+{
_pannew->Show(show);
}
{
_fileLocation = newFileLocation;
std::cout<<"GETFILELOCATION:"<<_fileLocation<<std::endl;
+
+//EED 2019-12-17
+ kernelManager->setCurrentFileName(_fileLocation);
}
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
class interfMainPanel;
class wxContourMainFrame : public wxPanel {
-
public:
-
//------------------------------------------------------------------------------------------------------------
// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
-
-
wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER);
wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,std::string datadir="C:/Creatis/creaContoursBin/RelWithDebInfo/");
-
~wxContourMainFrame();
-
//------------------------------------------------------------------------------------------------------------
// Creational and initialization methods
//------------------------------------------------------------------------------------------------------------
-
void setVectImages(std::vector<vtkImageData*> imgs);
-
bool configurePanels( );
-
bool addNewPanel(wxPanel* panel);
-
wxAuiNotebook * createNotebook();
-
void createInstantChooserPanel(wxAuiNotebook * parent);
-
void createViewPanel(wxAuiNotebook * parent);
-
void createInstantChooserPanel(wxWindow * parent);
-
void createViewPanel(wxWindow * parent);
-
void setInstantChooserPanel( wxInstantChooserPanel * theInstantChooserPanel );
-
void getMaskValue(vtkImageData ** mask,vtkImageData ** value,int typeContourGroup, int selection, int minZ, int maxZ);
-
void SaveImageResult(std::string directory,std::string namefile, vtkImageData* mask,vtkImageData* value);
-
void ShowToolsPanel(bool show);
-
-
////------------------------------------------------------------------------------------------------------------
//// Methods for capturing events
////------------------------------------------------------------------------------------------------------------
-
////------------------------------------------------------------------------------------------------------------
//// Model management methods
////------------------------------------------------------------------------------------------------------------
-
//------------------------------------------------------------------------------------------------------------
// Attributes getters and setters
//------------------------------------------------------------------------------------------------------------