#include "vtkMetaImageReader.h"
#include <map>
-#include "vtkImageData.h"mb_
+#include "vtkImageData.h"
#include "wx/artprov.h"
#include <wx/filedlg.h>
+
+
+
+ # Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
+ SET(LIBRARY_NAME creaContours)
+ SET(LIBRARY_NAME_BASE ${LIBRARY_NAME} )
+
+ SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
+
+#EED 01Avril2009
+# SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME} )
+ SET(${LIBRARY_NAME}_LIBRARIES Interface_ManagerContour_NDimensions_lib Interface_Icons_NDimensions_lib kernel_ManagerContour_NDimensions_lib )
+
+# FILE(RELATIVE_PATH
+# ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
+# ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
+# )
+
+SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
+ lib/Interface_ManagerContour_NDimensions
+ lib/Interface_Icons_NDimensions
+ lib/kernel_ManagerContour_NDimensions
+)
+
+
+ IF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
+ SET(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".")
+ ELSE ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
+ FILE(RELATIVE_PATH
+ CILFC_EXECUTABLE_OUTPUT_REL_PATH
+ ${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH})
+ ENDIF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
+
+ IF(UNIX)
+ SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
+ ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
+ ELSE(UNIX)
+ SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
+ ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin)
+ ENDIF(UNIX)
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME})
+
+# SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE TRUE)
+#SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE
+# ${PROJECT_SOURCE_DIR}/src/AdditionalcreaImageIOConfig.cmake.in)
+#SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE
+# ${PROJECT_SOURCE_DIR}/src/AdditionalUsecreaImageIO.cmake.in)
+
+ # Invoke the advanced macro
+ CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
+
+
SUBDIRS(Interface_ManagerContour_NDimensions)
SUBDIRS(Interface_Icons_NDimensions)
-SUBDIRS(kernel_ManagerContour_NDimensions)
\ No newline at end of file
+SUBDIRS(kernel_ManagerContour_NDimensions)
+
+
\ No newline at end of file
# LINK
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES})
+
+ #---------------------------------------------------------------------------
+
+ # INSTALLS LIBRARY
+ INSTALL(
+ FILES ${${LIBRARY_NAME}_HEADERS}
+ DESTINATION ${${LIBRARY_NAME_BASE}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS}
+ )
+ IF(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION bin)
+ ELSE(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION lib)
+ ENDIF(WIN32)
+
+
+
#---------------------------------------------------------------------------
ENDIF ( BUILD_${LIBRARY_NAME} )
+#ifndef __interfMainPanel_h_INCLUDED_H__
+#define __interfMainPanel_h_INCLUDED_H__
+
#pragma once
#include <wx/wx.h>
** Gets the instance of the class
**/
static interfMainPanel* getInstance();
-
+ /**
+ ** Ressts the instance of the class
+ **/
+ static void resetInstance();
/**
** Adds a new checkbox to the scrolledwindow using the checkboxsizer
vtkImageData* getImageData();
+ void getImageRange(double[2]);
+
void onSegmentationOneSlice(int isovalue,int sampling,int method);
void onSegmentationOneSliceITK(wxString distance, wxString sigma, wxString alfa, wxString beta, wxString propagation, wxString iterations, wxString inflation);
void onMirror();
+ void onMirrorChangeWidth(int width);
+
+ void onThreshold(int minVal, int maxVal);
+
+ void onThresholdPressed();
+
void setLabelSegmentationPanelVTK(wxString tmpString);
void onSegmentationPressed();
wxPanel* configPanel;
wxPanel* spreadPanel;
interfSpreadPanel* panelSpread;
- wxPanel* mirrorPanel;
- interfMirrorPanel* panelMirror;
wxWindow* infoWin;
wxPanel* informationPanel;
+
+ wxPanel* mirrorPanel;
+ interfMirrorPanel* panelMirror;
+ wxPanel* thresholdPanel;
+ interfThresholdPanel* panelThreshold;
bool axisshown;
bool refLineShown;
+ bool thresholdShown;
//This attribute contains the panel in charge of adding and removing the corresponding checkboxes in
//list of contours
};
+
+#endif
\ No newline at end of file
nom.push_back("Find shapes using border snake interaction");
funct.push_back((wxObjectEventFunction) &interfSegmentationMenu:: onSnakePressed);
+ path.push_back(datadir + "/Mirror.png");
+ nom.push_back("Create an Axis and select a contour to mirror it accordingly");
+ funct.push_back((wxObjectEventFunction) &interfSegmentationMenu:: onMirrorPressed);
+
+ path.push_back(datadir + "/Threshold.png");
+ nom.push_back("Superpose a 'Red Image' to the selected Image Threshold");
+ funct.push_back((wxObjectEventFunction)&interfSegmentationMenu::onThreshold);
+
this->addButtons(path, nom);
this->setVectorFunction(funct);
}
+void interfSegmentationMenu::onMirrorPressed(wxCommandEvent& event){
+
+ interfMainPanel::getInstance()->onMirrorPressed();
+
+}
+
+void interfSegmentationMenu::onThreshold(wxCommandEvent& event){
+
+ interfMainPanel::getInstance()->onThresholdPressed();
+
+}
+
//------------------------------------------------------------------------------------------------------------
void onSnakePressed(wxCommandEvent& event);
+ void onMirrorPressed(wxCommandEvent& event);
+
+ void onThreshold(wxCommandEvent& event);
+
private:
//wxContourEventHandler* contourevent;
interfMainPanel::getInstance()->onSegmentationAllSlice(minZ, maxZ, isovalue, sampling, method);*/
}
+
//------------------------------------------------------------------------------------------------------------
+
+/**
+** Begin of the mirror panel
+**/
+
+interfMirrorPanel::interfMirrorPanel(wxWindow* parent)
+: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
+{
+ wxButton *mirrorGoBtn = new wxButton(this,-1,_T("Go"), wxDefaultPosition, wxSize(200,35) );
+ _thickness = new wxSlider(this, -1, 4, 1, 10, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+
+ Connect( mirrorGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfMirrorPanel::onMirrorGo );
+
+ wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
+ sizer -> Add( new wxStaticText(this,-1,_T("Thickness")) , 1, wxGROW );
+ sizer -> Add( _thickness, 1, wxGROW );
+ sizer -> Add( mirrorGoBtn, 1, wxGROW );
+
+ this->SetSizer( sizer );
+ this->SetAutoLayout( true );
+ this->Layout();
+}
+
+interfMirrorPanel::~interfMirrorPanel(){
+}
+
+void interfMirrorPanel::onMirrorGo(wxCommandEvent& event)
+{
+ interfMainPanel::getInstance()->onMirror();
+}
+
+void interfMirrorPanel::onChangeWidth(wxScrollEvent& event)
+{
+ int width = _thickness->GetValue();
+ interfMainPanel::getInstance()->onMirrorChangeWidth(width);
+}
+
+
+
+/**
+** Begin of the threshold panel
+**/
+interfThresholdPanel::interfThresholdPanel(wxWindow* parent)
+: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
+{
+ wxButton *thresholdGoBtn = new wxButton(this,-1,_T("Threshold Go"), wxDefaultPosition, wxSize(200,30) );
+
+ _thresholdGo = false;
+
+ double range[2];
+ interfMainPanel::getInstance()->getImageRange(range);
+
+ _mBarThreshold = new mBarRange(this,70,65);
+ _mBarThreshold->SetMin(0);
+ _mBarThreshold->SetStart(0);
+ _mBarThreshold-> SetOrientation( true );
+ _mBarThreshold-> setActiveStateTo(true);
+ _mBarThreshold-> setVisibleLabels( true );
+ _mBarThreshold-> setDeviceEndMargin(10);
+ _mBarThreshold-> setRepresentedValues( range[0] , range[1] );
+ _mBarThreshold-> setDeviceBlitStart(10,10);
+ _mBarThreshold-> setIfWithActualDrawed( false );
+ _mBarThreshold-> SetStart( range[0] );
+ _mBarThreshold-> SetEnd( range[1] );
+
+ Connect( thresholdGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfThresholdPanel::onThresholdGo );
+
+ wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
+ sizer -> Add( _mBarThreshold, 1, wxGROW );
+ sizer -> Add( thresholdGoBtn, 1, wxGROW );
+ sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW );
+ sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW );
+ //sizer -> Add( new wxStaticText(this,-1,_T("Select the image's range to superpose a Fake Color")) , 1, wxGROW );
+
+
+ this->SetSizer( sizer );
+ this->SetAutoLayout( true );
+ this->Layout();
+}
+
+interfThresholdPanel::~interfThresholdPanel(){
+}
+
+
+
+void interfThresholdPanel::onThresholdChange(wxCommandEvent& event)
+{
+ if (_thresholdGo)
+ {
+ int minVal = _mBarThreshold->GetStart();
+ int maxVal = _mBarThreshold->GetEnd();
+
+ interfMainPanel::getInstance()->onThreshold(minVal, maxVal);
+
+ std::cout<< "Valor Min: " << minVal << " & Valor Max: " << maxVal << std::endl;
+ }
+}
+
+void interfThresholdPanel::onThresholdGo(wxCommandEvent& event)
+{
+ if (!_thresholdGo)
+ {
+ int minVal = _mBarThreshold->GetStart();
+ int maxVal = _mBarThreshold->GetEnd();
+
+ interfMainPanel::getInstance()->onThreshold(minVal, maxVal);
+ _thresholdGo=true;
+ }
+}
+
+void interfThresholdPanel::onThresholdStop()
+{
+ _thresholdGo=false;
+}
+
+
+BEGIN_EVENT_TABLE(interfMirrorPanel, wxPanel)
+ EVT_SCROLL(interfMirrorPanel :: onChangeWidth)
+END_EVENT_TABLE()
+
+BEGIN_EVENT_TABLE(interfThresholdPanel, wxPanel)
+ EVT_COMMAND(wxID_ANY, wxEVT_TSBAR_START, interfThresholdPanel :: onThresholdChange)
+ EVT_COMMAND(wxID_ANY, wxEVT_TSBAR_END, interfThresholdPanel :: onThresholdChange)
+ EVT_COMMAND(wxID_ANY, wxEVT_TSBAR_MOVED, interfThresholdPanel :: onThresholdChange)
+END_EVENT_TABLE()
+
+
wxTextCtrl * _infStrength;
};
+
+class interfMirrorPanel
+ : public wxPanel
+{
+public:
+ interfMirrorPanel(wxWindow * parent);
+ ~interfMirrorPanel();
+
+private:
+
+ wxSlider* _thickness;
+
+ void onMirrorGo(wxCommandEvent& event);
+
+ void onChangeWidth(wxScrollEvent& event);
+
+ DECLARE_EVENT_TABLE()
+};
+
+
+class interfThresholdPanel
+ : public wxPanel
+{
+public:
+ interfThresholdPanel(wxWindow * parent);
+ ~interfThresholdPanel();
+
+ void onThresholdStop();
+
+private:
+
+ mBarRange* _mBarThreshold;
+ bool _thresholdGo;
+
+ void onThresholdChange(wxCommandEvent& event);
+
+ void onThresholdGo(wxCommandEvent& event);
+
+ DECLARE_EVENT_TABLE()
+};
+
+
#endif
nom.push_back("Show help page with information about the tools");
funct.push_back((wxObjectEventFunction) &interfToolsMenu:: onHelpPressed);
- path.push_back(datadir + "/Mirror.png");
- nom.push_back("Create an Axis and select a contour to mirror it accordingly");
- funct.push_back((wxObjectEventFunction) &interfToolsMenu:: onMirrorPressed);
-
this->addButtons(path, nom);
this->setVectorFunction(funct);
}
-void interfToolsMenu::onMirrorPressed(wxCommandEvent& event){
-
- interfMainPanel::getInstance()->onMirrorPressed();
-
-}
-
void onHelpPressed(wxCommandEvent& event);
- void onMirrorPressed(wxCommandEvent& event);
-
private:
//wxContourEventHandler* contourevent;
wxString interfInformationPanel::getCellValue(int j,int i){
return _grid->GetCellValue( j , i );
-}
-
-
-
-/**
-** Begin of the mirror panel
-**/
-
-interfMirrorPanel::interfMirrorPanel(wxWindow* parent)
-: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
-{
- wxButton *mirrorGoBtn = new wxButton(this,-1,_T("Go"), wxDefaultPosition, wxSize(200,35) );
- _thickness = new wxSlider(this, -1, 0 , 0, 10, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
-
- Connect( mirrorGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfMirrorPanel::onMirrorGo );
-
- wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
- sizer -> Add( new wxStaticText(this,-1,_T("Thickness")) , 1, wxGROW );
- sizer -> Add( _thickness, 1, wxGROW );
- sizer -> Add( mirrorGoBtn, 1, wxGROW );
-
- this->SetSizer( sizer );
- this->SetAutoLayout( true );
- this->Layout();
-}
-
-interfMirrorPanel::~interfMirrorPanel(){
-}
-
-void interfMirrorPanel::onMirrorGo(wxCommandEvent& event)
-{
- //wxString thick=_thickness->GetValue();
- interfMainPanel::getInstance()->onMirror();
-}
+}
\ No newline at end of file
-};
-
-class interfMirrorPanel
- : public wxPanel
-{
-public:
- interfMirrorPanel(wxWindow * parent);
- ~interfMirrorPanel();
-
-private:
-
- wxSlider* _thickness;
-
- void onMirrorGo(wxCommandEvent& event);
};
#endif
# LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
kernel_ManagerContour_NDimensions_lib
- Interface_Icons_NDimensions_lib
- ${crea_LIBRARIES}
+ Interface_Icons_NDimensions_lib
+ ${crea_LIBRARIES}
${WXWIDGETS_LIBRARIES}
${VTK_LIBRARIES}
# ${ITK_LIBRARIES}
# LINK
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES})
-#MESSAGE(FATAL_ERROR "${LIBRARY_NAME}_LINK_LIBRARIES = ${${LIBRARY_NAME}_LINK_LIBRARIES}")
+
#---------------------------------------------------------------------------
+
+
+ # INSTALLS LIBRARY
+ INSTALL(
+ FILES ${${LIBRARY_NAME}_HEADERS}
+ DESTINATION ${${LIBRARY_NAME_BASE}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS}
+ )
+ IF(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION bin)
+ ELSE(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION lib)
+ ENDIF(WIN32)
+
+
+
+ #---------------------------------------------------------------------------
+
ENDIF ( BUILD_${LIBRARY_NAME} )
_datadir = datadir;
- inredo = 0;
- inundo = 0;
+ inredo = 0;
+ inundo = 0;
- interfMainPanel* pannew = interfMainPanel::getInstance(parent,datadir+"/data/Icons");//, eventHandler);
- _performingOperation = new PerformingOperation();
+ _pannew = interfMainPanel::getInstance(this,datadir+"/data/Icons");//, eventHandler);
+ _performingOperation = new PerformingOperation();
-
-
- if(images.size() > 0){
- this->setVectImages(images);
- }
+ if(images.size() > 0)
+ {
+ this->setVectImages(images);
+ }
}
return instance;
}
- std::vector<vtkImageData*> wxContourMainFrame ::getVectImages(){
+ std::vector<vtkImageData*> wxContourMainFrame ::getVectImages()
+ {
return kernelManager->getVectImages();
}
- wxContourMainFrame* wxContourMainFrame :: getInstance(){
- return instance;
-
+
+ wxContourMainFrame* wxContourMainFrame :: getInstance()
+ {
+ return instance;
+ }
+
+ void wxContourMainFrame :: resetInstance()
+ {
+ delete instance;
+ instance = NULL;
}
wxContourMainFrame :: ~wxContourMainFrame()
{
- m_mgr.UnInit();
- //El problema al cerrar la aplicacion puede estar asociado
- //a que wxAUINotebook esta en la aplicacion
- //principal (wxContourGUIExample)tambien
-//EED???? delete _theViewPanel;
-//EED???? delete _instantPanel;
-//EED???? delete _buttonsBar;
-//EED???? delete _actualInstant;
-//EED???? delete _sceneManager;
+
+ _pannew->Close();
+ interfMainPanel::resetInstance();
+ //_pannew->Destroy();
+ //delete _pannew;
+
+ m_mgr.UnInit();
+ //delete m_mgr;
+
+ //El problema al cerrar la aplicacion puede estar asociado
+ //a que wxAUINotebook esta en la aplicacion
+ //principal (wxContourGUIExample)tambien
+ //EED???? delete _theViewPanel;
+ //EED???? delete _instantPanel;
+ //EED???? delete _buttonsBar;
+ //EED???? delete _actualInstant;
+ //EED???? delete _sceneManager;
}
return _instantPanel->getIfConceptCheckedAt( name, pos );
}
-void wxContourMainFrame::changeInstant(){
+void wxContourMainFrame::changeInstant()
+{
std::vector<int> instantVect;
_instantPanel->getInstant( instantVect );
// Instant * theInstant = new Instant ( &instantVect );
_theViewPanel->setImageSlice(z);
}
}
+
void wxContourMainFrame::updateInstantAxes(){
}
} // if addedModel
} // if sizeCtrPt
}
-
int wxContourMainFrame::GetImageDataSizeZ(){
return _theViewPanel->GetImageDataSizeZ();
}
}
}
+void wxContourMainFrame::refLineChangeWidth(int width)
+{
+ _refLineView->SetWidthLine(width);
+ _refLineView->RefreshContour();
+
+ RefreshInterface();
+}
+
+
void wxContourMainFrame::onMirror()
{
//AD:02-09
//_refName = "";
}
-void wxContourMainFrame::showAxis(bool show){
+void wxContourMainFrame::onThreshold(int minVal, int maxVal)
+{
+
+ vtkImageData * img = _theViewPanel->getImageData();
+
+ double range[2];
+ img->GetScalarRange(range);
+
+ //vtkImageData * fakeImage = new vtkImageData();
+
+ //Lookup Table
+ vtkLookupTable *lookup = vtkLookupTable::New();
+ lookup->SetNumberOfTableValues(range[1]);
+ lookup->SetTableRange(range);
+ lookup->SetAlphaRange(0, 1);
+ lookup->SetValueRange(0, 1);
+ lookup->SetSaturationRange(0, 0);
+ lookup->SetRampToLinear( );
+
+
+ //Assign a fake color for the upper image, and set the white as transparent
+ for(int i = range[0]; i < range[1]; i++)
+ {
+ if( i >= minVal && i <= maxVal )
+ {
+ lookup->SetTableValue(i, 1.0, 0.0, 0.0, 1);
+ }
+ else if( i >= range[0] && i < minVal )
+ {
+ lookup->SetTableValue(i, 0.0, 0.0, 0.0, 0); //transparent
+ }
+ else if( i > maxVal && i < range[1] )
+ {
+ lookup->SetTableValue(i, 0.0, 0.0, 0.0, 0); //transparent
+ }
+ }
+
+ lookup->Build( );
+
+ vtkImageMapToColors *mapperImage = vtkImageMapToColors::New( );
+ mapperImage->SetInput( img );
+ mapperImage->SetLookupTable( lookup );
+
+ vtkImageActor * upperImageActor = vtkImageActor::New( );
+ upperImageActor->SetInput( mapperImage->GetOutput() );
+ upperImageActor->SetOpacity( 1 );
+
+ //viewer->SetInput( myImage ); viewer->GetRenderer()->AddActor( myActor );ACTOR!!!
+
+ //baseImageActor = vtkImageActor::New( );
+ //baseImageActor->SetInput( mBox->bbGetInputImage1() );
+
+ RefreshInterface();
+}
+
+void wxContourMainFrame::showAxis(bool show)
+{
_theViewPanel->SetVisibleAxis(show);
_theViewPanel->Refresh();
}
#include "vtkMetaImageWriter.h"
#include "vtkImageData.h"
#include "vtkTransform.h"
+
+#include "vtkCamera.h"
+#include "vtkImageActor.h"
+#include <vtkImageMapToColors.h>
+#include <vtkLookupTable.h>
+#include <vtkCommand.h>
+
//#include "vtkMetaImageReader.h"
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
// Class definition
//------------------------------------------------------------------------------------------------------------
-
+class interfMainPanel;
class wxContourMainFrame : public wxPanel {
public:
void setInstantChooserPanel( wxInstantChooserPanel * theInstantChooserPanel );
+
+
// void setButtonsBar( wxContour_ButtonsBar * theButtonsBar );
// void setGrid( wxContour_Grid * theGridPanel );
// void setDrawToolsPanel( wxContour_DrawToolsPanel * theDrawToolsPanel );
//------------------------------------------------------------------------------------------------------------
static wxContourMainFrame* getInstance(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/");
static wxContourMainFrame* getInstance();
+ static void resetInstance();
//------------------------------------------------------------------------------------------------------------
// Other functional methods
//------------------------------------------------------------------------------------------------------------
void referenceLine();
void refLineHide();
void refLineShow();
+ void refLineChangeWidth(int width);
//AD
void onMirror();
+ void onThreshold(int minVal, int maxVal);
+
void showAxis(bool show);
void onRigidPressed();
//------------------------------------------------------------------------------------------------------------
// Attributtes
//------------------------------------------------------------------------------------------------------------
+
static wxContourMainFrame* instance;
KernelManagerContour* kernelManager;
+ interfMainPanel* _pannew;
+
+ PerformingOperation* _performingOperation;
+
std::string _datadir;
wxContourViewPanel* _theViewPanel;
int inundo;
std::string stundoredo;
-
-
- //wxContourViewPanel* _viewPan;
- PerformingOperation* _performingOperation;
static char COPY;
# LINK
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES})
+ #---------------------------------------------------------------------------
+
+
+ # INSTALLS LIBRARY
+ INSTALL(
+ FILES ${${LIBRARY_NAME}_HEADERS}
+ DESTINATION ${${LIBRARY_NAME_BASE}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS}
+ )
+ IF(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION bin)
+ ELSE(WIN32)
+ INSTALL(
+ TARGETS ${LIBRARY_NAME}
+ DESTINATION lib)
+ ENDIF(WIN32)
+
+
#---------------------------------------------------------------------------
ENDIF ( BUILD_${LIBRARY_NAME} )
\ No newline at end of file
**/
}
-KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std::string datadir,std::string tmpdir){
+KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std::string datadir,std::string tmpdir)
+{
/**THIS ALL SHOULD BE IN AN OTHER LIB CALLED PERSISTANCE