#----------------------------------------------------------------------------
-# SET THE NAME OF YOUR EXECUTABLE
+# USER! : SET THE NAME OF YOUR EXECUTABLE
SET ( EXE_NAME MyExe )
#----------------------------------------------------------------------------
connect image.Out viewernv.In
connect transferfunc.ColorFunction viewernv.ColorFunction
connect transferfunc.WindowLevel viewernv.WindowLevel
- connect transferfunc.ColorLevel viewernv.ColorLevel
-
+ connect transferfunc.ColorLevel viewernv.ColorLevel
new ShowNPoints showpoints
connect image.Out showpoints.Image
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,CutModule2)
BBTK_BLACK_BOX_IMPLEMENTATION(CutModule2,bbtk::WxBlackBox);
+
void CutModule2::Process()
{
vtkImageData* img = bbGetInputIn();
bbSetOutputOut(_mainpanel->GetResultImage());
}
}
+
void CutModule2::CreateWidget(wxWindow* parent)
{
std::string lastname("bbcreaMaracasVisu.dll"); // JPR
Process();
}
+
void CutModule2::bbUserSetDefaultValues()
{
_mainpanel = NULL;
bbSetInputInteractor(0);
bbSetInputRenderer(0);
}
+
void CutModule2::bbUserFinalizeProcessing()
{
namespace bbcreaMaracasVisu
{
-
//----------------------------------------------------------------------
- WidgetShowNPoints::WidgetShowNPoints(wxWindow *parent, bbcreaMaracasVisu::ShowNPoints *box)
+ WidgetShowNPoints::WidgetShowNPoints(wxWindow *parent, bbcreaMaracasVisu::ShowNPoints *box)
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
{
- mbbShowNPoints = box;
- this->renderer = NULL;
- wxPanel *panel = this;
- wxSizer *sizer = NULL;
-
+ mbbShowNPoints = box;
+ this->renderer = NULL;
+ wxPanel *panel = this;
+ wxSizer *sizer = NULL;
// Widget interface
- textCtrl = new wxTextCtrl(panel, -1);
- wxButton *btnAddPoint = new wxButton( panel, -1, _T("Add Point"));
- wxButton *btnRenamePoint = new wxButton( panel, -1, _T("Rename point"));
- wxButton *btnEraseLastPoint = new wxButton( panel, -1, _T("Erase Last point"));
- wxButton *btnErasePoint = new wxButton( panel, -1, _T("Erase point"));
+ askPointLabel = new wxStaticText(panel, -1, _T("Point label :")); // JPR
+ textCtrl = new wxTextCtrl(panel, -1);
+ wxButton *btnAddPoint = new wxButton( panel, -1, _T("Add Point"));
+ wxButton *btnRenamePoint = new wxButton( panel, -1, _T("Rename point"));
+ wxButton *btnEraseLastPoint = new wxButton( panel, -1, _T("Erase Last point"));
+ wxButton *btnErasePoint = new wxButton( panel, -1, _T("Erase point"));
wxButton *btnDeleteAllPoints = new wxButton( panel, -1, _T("Delete all points"));
- wxButton *btnSavePoints = new wxButton( panel, -1, _T("Save points"));
- wxButton *btnLoadPoints = new wxButton( panel, -1, _T("Load points"));
- txtNrPoints = new wxStaticText(panel,-1, _T(" "));
+ wxButton *btnSavePoints = new wxButton( panel, -1, _T("Save points"));
+ wxButton *btnLoadPoints = new wxButton( panel, -1, _T("Load points"));
+ txtNrPoints = new wxStaticText(panel,-1, _T(" "));
//NTU: Sliders for opacity and radio change
wxFlexGridSizer *sizer1 = new wxFlexGridSizer(1);
// sizer1->Add(new wxStaticText(panel,-1,_T(" ")));
- Connect(btnAddPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnAddPoint);
- Connect(btnRenamePoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnRenamePoint);
- Connect(btnEraseLastPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnEraseLastPoint);
- Connect(btnErasePoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnErasePoint);
- Connect(btnDeleteAllPoints->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnDeleteAllPoints);
- Connect(btnSavePoints->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
- Connect(btnLoadPoints->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
+ Connect(btnAddPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnAddPoint);
+ Connect(btnRenamePoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnRenamePoint);
+ Connect(btnEraseLastPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnEraseLastPoint);
+ Connect(btnErasePoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnErasePoint);
+ Connect(btnDeleteAllPoints->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnDeleteAllPoints);
+ Connect(btnSavePoints->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
+ Connect(btnLoadPoints->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
//NTU: Slider events
- Connect(sdrOpacity->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
- Connect(sdrRadio->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
+ Connect(sdrOpacity->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
+ Connect(sdrRadio->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
+ sizer1->Add(askPointLabel); // JPR
sizer1->Add(textCtrl);
sizer1->Add(btnAddPoint);
sizer1->Add(btnRenamePoint);
sizer1->Add(btnLoadPoints);
sizer = sizer1;
- panel -> SetSizer(sizer);
- panel -> SetAutoLayout(true);
- panel -> Layout();
-
+ panel ->SetSizer(sizer);
+ panel ->SetAutoLayout(true);
+ panel ->Layout();
}
-
//------------------------------------------------------------------------
WidgetShowNPoints::~WidgetShowNPoints()
{
return lstLabels;
}
-
-
-
//------------------------------------------------------------------------
void WidgetShowNPoints::SetPoint(std::vector<int> ppoint)
{
this->renderer = renderer;
}
+//------------------------------------------------------------------------
std::string WidgetShowNPoints::CleanSpaces(std::string ss)
{
lstActorsText.push_back(textActor);
SetOutputBox();
-
}
//------------------------------------------------------------------------
} // renderer
}
-
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::SetOutputBox()
{
renderer->GetRenderWindow()->Render();
mbbShowNPoints->bbSignalOutputModification(std::string("lstLabels"));
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event)
{
-
wxFileDialog* FD = new wxFileDialog( 0,
- _T("Save points .."),
- _T(""),
- _T(""),
- _T("(*.xls)|*.xls"),
- wxSAVE | wxOVERWRITE_PROMPT,
- wxDefaultPosition);
+ _T("Save points .."),
+ _T(""),
+ _T(""),
+ _T("(*.xls)|*.xls"),
+ wxSAVE | wxOVERWRITE_PROMPT,
+ wxDefaultPosition);
//EED
int result_FD = FD->ShowModal();
printf("WidgetShowNPoints::OnSavePoints ...Error... creating file");
} //ff
} // dialog box
-
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
{
wxFileDialog* FD = new wxFileDialog( 0,
- _T("Load points .."),
- _T(""),
- _T(""),
- _T("(*.xls)|*.xls"),
- wxOPEN | wxFILE_MUST_EXIST,
- wxDefaultPosition);
+ _T("Load points .."),
+ _T(""),
+ _T(""),
+ _T("(*.xls)|*.xls"),
+ wxOPEN | wxFILE_MUST_EXIST,
+ wxDefaultPosition);
//EED
int result_FD = FD->ShowModal();
}
+//------------------------------------------------------------------------
+
int WidgetShowNPoints::GetNearestPoint()
{
int id=-1;
}
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::OnRenamePoint(wxCommandEvent& event)
{
int id=GetNearestPoint();
}
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::ErasePoint(int id)
{
if (this->renderer!=NULL){
} // if renderer
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::OnErasePoint(wxCommandEvent& event)
{
ErasePoint( GetNearestPoint() );
}
- //------------------------------------------------------------------------
+//------------------------------------------------------------------------
void WidgetShowNPoints::OnEraseLastPoint(wxCommandEvent& event)
{
ErasePoint(lstActorsSphere.size()-1);
}
-
//------------------------------------------------------------------------
void WidgetShowNPoints::OnDeleteAllPoints(wxCommandEvent& event)
{
{
ErasePoint(id);
}
-
}
//NTU: Method for updating points opacity and Radio
SetOutputBox();
}
-
-
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ShowNPoints)
BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox);
} // mwxwidget
}
-
void ShowNPoints::CreateWidget(wxWindow* parent)
{
- mwxwidget = new WidgetShowNPoints( parent , this);
+ mwxwidget = new WidgetShowNPoints( parent, this);
mwxwidget->SetPoint( bbGetInputIn() );
if (bbGetInputImage()==NULL)
bbSetInputRenderer(NULL);
}
- //-----------------------------------------------------------------
+//-----------------------------------------------------------------
void ShowNPoints::bbUserInitializeProcessing()
{
}
- //-----------------------------------------------------------------
+//-----------------------------------------------------------------
void ShowNPoints::bbUserFinalizeProcessing()
{
}
- //-----------------------------------------------------------------
+//-----------------------------------------------------------------
}
// EO namespace bbcreaMaracasVisu
-
-
std::vector<std::string> GetLstLabels();
private:
-
- void AddPoint(int x, int y, int z, std::string label);
- std::string CleanSpaces(std::string ss);
- int GetNearestPoint();
- void ErasePoint(int id);
- void SetOutputBox();
-
- ShowNPoints *mbbShowNPoints;
- vtkRenderer *renderer;
- std::vector<int> lstPointsX;
- std::vector<int> lstPointsY;
- std::vector<int> lstPointsZ;
- std::vector<std::string> lstLabels;
- std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
- std::vector<vtkTextActor3D*> lstActorsText;
+
+ void AddPoint(int x, int y, int z, std::string label);
+ std::string CleanSpaces(std::string ss);
+ int GetNearestPoint();
+ void ErasePoint(int id);
+ void SetOutputBox();
+
+ ShowNPoints *mbbShowNPoints;
+ vtkRenderer *renderer;
+ std::vector<int> lstPointsX;
+ std::vector<int> lstPointsY;
+ std::vector<int> lstPointsZ;
+ std::vector<std::string> lstLabels;
+ std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
+ std::vector<vtkTextActor3D*> lstActorsText;
//NTU: For updating points
std::vector<vtkSphereSource*> lstSourceSphere;
- std::vector<int> mpoint;
- vtkImageData *mimage;
- std::vector<double> mcolour;
- double mopacity;
- double mradio;
- wxTextCtrl *textCtrl;
- wxStaticText *txtNrPoints;
- wxSlider *sdrOpacity;
- wxSlider *sdrRadio;
+ std::vector<int> mpoint;
+ vtkImageData *mimage;
+ std::vector<double> mcolour;
+ double mopacity;
+ double mradio;
+ wxStaticText *askPointLabel;
+ wxTextCtrl *textCtrl;
+ wxStaticText *txtNrPoints;
+ wxSlider *sdrOpacity;
+ wxSlider *sdrRadio;
};
-
-
class /*BBTK_EXPORT*/ ShowNPoints
:
public bbtk::WxBlackBox
#endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
#endif // _USE_WXWIDGETS_
-
namespace bbcreaMaracasVisu
{
-
BEGIN_EVENT_TABLE( bbwxMaracas_N_ViewersWidget, wxPanel )
EVT_MENU( 12121, bbwxMaracas_N_ViewersWidget::OnRefreshView )
EVT_MENU( 12122, bbwxMaracas_N_ViewersWidget::OnDClickLeft )
//-------------------------------------------------------------
bbwxMaracas_N_ViewersWidget::bbwxMaracas_N_ViewersWidget(ViewerNV* box,
- wxWindow *parent,
- vtkImageData* imagedata,
- std::vector<int> *nTypeView)
+ wxWindow *parent,
+ vtkImageData* imagedata,
+ std::vector<int> *nTypeView)
:wxMaracas_N_ViewersWidget(parent,imagedata,nTypeView)
{
mbbViewerNV=box;
//-------------------------------------------------------------
void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event)
{
- printf("CPR: bbwxMaracas_N_ViewersWidget::OnRefreshView -> actualiza X, Y y Z\n");
+ //printf("CPR: bbwxMaracas_N_ViewersWidget::OnRefreshView -> actualiza X, Y y Z\n");
mbbViewerNV->point.clear();
mbbViewerNV->point.push_back( (int)GetX() );
currenttype = type;
currentimg = img;
-
point.clear();
point.push_back((int)mwxwidget->GetX());
mwxwidget->setColorLevel(bbGetInputColorLevel());
}
}
-
-
}// mwxwidget != NULL
}
//-------------------------------------------------------------
void ViewerNV::bbUserSetDefaultValues()
{
-
mwxwidget = NULL;
bbSetInputIn(NULL);
vecNTypeViwer.push_back(3);
bbSetInputnTypeView(vecNTypeViwer);
-
bbSetOutputwxVtkBaseView1( NULL );
bbSetOutputwxVtkBaseView2( NULL );
bbSetOutputwxVtkBaseView3( NULL );
ret=false;
}
return ret;
-
-
}
void ViewerNV::updateObservers(){
}
// EO namespace bbcreaMaracasVisu
-
#define __bbcreaMaracasVisuViewerNV_h_INCLUDED__
#include "bbtkWxBlackBox.h"
-
#include "vtkImageData.h"
#include "vtkRenderer.h"
namespace bbcreaMaracasVisu
{
-
-
-
class ViewerNV;
class bbwxMaracas_N_ViewersWidget : public wxMaracas_N_ViewersWidget
{
~bbwxMaracas_N_ViewersWidget();
//if the MPR had generated the refresh event
- void OnRefreshView(wxCommandEvent & event);
- void OnDClickLeft(wxCommandEvent & event);
+ void OnRefreshView(wxCommandEvent &event);
+ void OnDClickLeft(wxCommandEvent &event);
private:
ViewerNV *mbbViewerNV;
DECLARE_EVENT_TABLE( );
};
-
//-------------------------------------------------------------------
//-------------------------------------------------------------------
//-------------------------------------------------------------------
-
class /*BBTK_EXPORT*/ ViewerNV
:
public bbtk::WxBlackBox
{
BBTK_BLACK_BOX_INTERFACE(ViewerNV,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(Title,std::string);
- BBTK_DECLARE_INPUT(In, vtkImageData *);
- BBTK_DECLARE_INPUT(nTypeView, std::vector<int> );
- BBTK_DECLARE_INPUT(ColorFunction, vtkColorTransferFunction* );
- BBTK_DECLARE_INPUT(WindowLevel, int );
- BBTK_DECLARE_INPUT(ColorLevel, int );
- BBTK_DECLARE_INPUT(Obs1, vtkInteractorObserver *);
- BBTK_DECLARE_INPUT(Obs2, vtkInteractorObserver *);
- BBTK_DECLARE_INPUT(Obs3, vtkInteractorObserver *);
- BBTK_DECLARE_INPUT(Obs4, vtkInteractorObserver *);
- BBTK_DECLARE_INPUT(Obs5, vtkInteractorObserver *);
- BBTK_DECLARE_OUTPUT(wxVtkBaseView1,wxVtkBaseView*);
- BBTK_DECLARE_OUTPUT(wxVtkBaseView2,wxVtkBaseView*);
- BBTK_DECLARE_OUTPUT(wxVtkBaseView3,wxVtkBaseView*);
- BBTK_DECLARE_OUTPUT(wxVtkBaseView4,wxVtkBaseView*);
- BBTK_DECLARE_OUTPUT(Renderer1,vtkRenderer*);
- BBTK_DECLARE_OUTPUT(Renderer2,vtkRenderer*);
- BBTK_DECLARE_OUTPUT(Renderer3,vtkRenderer*);
- BBTK_DECLARE_OUTPUT(Renderer4,vtkRenderer*);
- BBTK_DECLARE_OUTPUT(Interactor1,vtkRenderWindowInteractor*);
- BBTK_DECLARE_OUTPUT(Point,std::vector<int>);
+ BBTK_DECLARE_INPUT(In, vtkImageData *);
+ BBTK_DECLARE_INPUT(nTypeView, std::vector<int> );
+ BBTK_DECLARE_INPUT(ColorFunction, vtkColorTransferFunction* );
+ BBTK_DECLARE_INPUT(WindowLevel, int );
+ BBTK_DECLARE_INPUT(ColorLevel, int );
+ BBTK_DECLARE_INPUT(Obs1, vtkInteractorObserver *);
+ BBTK_DECLARE_INPUT(Obs2, vtkInteractorObserver *);
+ BBTK_DECLARE_INPUT(Obs3, vtkInteractorObserver *);
+ BBTK_DECLARE_INPUT(Obs4, vtkInteractorObserver *);
+ BBTK_DECLARE_INPUT(Obs5, vtkInteractorObserver *);
+
+ BBTK_DECLARE_OUTPUT(wxVtkBaseView1,wxVtkBaseView*);
+ BBTK_DECLARE_OUTPUT(wxVtkBaseView2,wxVtkBaseView*);
+ BBTK_DECLARE_OUTPUT(wxVtkBaseView3,wxVtkBaseView*);
+ BBTK_DECLARE_OUTPUT(wxVtkBaseView4,wxVtkBaseView*);
+ BBTK_DECLARE_OUTPUT(Renderer1,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT(Renderer2,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT(Renderer3,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT(Renderer4,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT(Interactor1,vtkRenderWindowInteractor*);
+ BBTK_DECLARE_OUTPUT(Point,std::vector<int>);
+
BBTK_PROCESS(Process);
void Process();
BBTK_CREATE_WIDGET(CreateWidget);
std::vector<int> point;
private:
bool enter;
-
+
vtkImageData* currentimg;
std::vector<int> currenttype;
wxMaracas_N_ViewersWidget *mwxwidget;
BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D");
BBTK_CATEGORY("viewer");
BBTK_INPUT(ViewerNV,Title,"Title prepended to the text",std::string,"");
- BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,"");
- BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane 7=3D_empty",std::vector<int>,"");
- BBTK_INPUT(ViewerNV,ColorFunction,"Optional: set a different color for the viewers 2D",vtkColorTransferFunction*,"");
- BBTK_INPUT(ViewerNV,WindowLevel,"Optional: set a different Window level by using an other widget",int,"");
- BBTK_INPUT(ViewerNV,ColorLevel,"Optional: set a different Color level by using an other widget",int,"");
- BBTK_INPUT(ViewerNV,Obs1,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
- BBTK_INPUT(ViewerNV,Obs2,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
- BBTK_INPUT(ViewerNV,Obs3,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
- BBTK_INPUT(ViewerNV,Obs4,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
- BBTK_INPUT(ViewerNV,Obs5,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
- BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView *,"");
- BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView *,"");
- BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView *,"");
- BBTK_OUTPUT(ViewerNV,wxVtkBaseView4,"wxVtkBaseView 4",wxVtkBaseView *,"");
- BBTK_OUTPUT(ViewerNV,Renderer1,"Renderer 1",vtkRenderer *,"");
- BBTK_OUTPUT(ViewerNV,Renderer2,"Renderer 2",vtkRenderer *,"");
- BBTK_OUTPUT(ViewerNV,Renderer3,"Renderer 3",vtkRenderer *,"");
- BBTK_OUTPUT(ViewerNV,Renderer4,"Renderer 4",vtkRenderer *,"");
- BBTK_OUTPUT(ViewerNV,Interactor1,"Interactor1",vtkRenderWindowInteractor *,"");
- BBTK_OUTPUT(ViewerNV,Point,"Axis point",std::vector<int>,"");
+ BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane 7=3D_empty",std::vector<int>,"");
+ BBTK_INPUT(ViewerNV,ColorFunction,"Optional: set a different color for the viewers 2D",vtkColorTransferFunction*,"");
+ BBTK_INPUT(ViewerNV,WindowLevel,"Optional: set a different Window level by using an other widget",int,"");
+ BBTK_INPUT(ViewerNV,ColorLevel,"Optional: set a different Color level by using an other widget",int,"");
+ BBTK_INPUT(ViewerNV,Obs1,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
+ BBTK_INPUT(ViewerNV,Obs2,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
+ BBTK_INPUT(ViewerNV,Obs3,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
+ BBTK_INPUT(ViewerNV,Obs4,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
+ BBTK_INPUT(ViewerNV,Obs5,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,"");
+
+ BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView *,"");
+ BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView *,"");
+ BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView *,"");
+ BBTK_OUTPUT(ViewerNV,wxVtkBaseView4,"wxVtkBaseView 4",wxVtkBaseView *,"");
+ BBTK_OUTPUT(ViewerNV,Renderer1,"Renderer 1",vtkRenderer *,"");
+ BBTK_OUTPUT(ViewerNV,Renderer2,"Renderer 2",vtkRenderer *,"");
+ BBTK_OUTPUT(ViewerNV,Renderer3,"Renderer 3",vtkRenderer *,"");
+ BBTK_OUTPUT(ViewerNV,Renderer4,"Renderer 4",vtkRenderer *,"");
+ BBTK_OUTPUT(ViewerNV,Interactor1,"Interactor1",vtkRenderWindowInteractor *,"");
+ BBTK_OUTPUT(ViewerNV,Point,"Axis point",std::vector<int>,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(ViewerNV);
}
// EO namespace bbcreaMaracasVisu
#endif // __bbcreaMaracasVisuViewerNV_h_INCLUDED__
#endif // _USE_WXWIDGETS_
-
</div>
-
-
-
<!-- ******************************************************************************* -->
<!-- End HTML Code -->
<!-- ******************************************************************************* -->
#----------------------------------------------------------------------------
-# SET THE NAME OF YOUR LIBRARY
-
-
+# USER ! SET THE NAME OF YOUR LIBRARY
SET ( LIBRARY_NAME creaMaracasVisu )
#EED 5/Mars/2010
src/CutModule/interface
src/CutModule/kernel
../../../
-
+
)
#message(jhcl\n\n ${crea_LIBRARIES})
#INCLUDE(include/Modules/MARACAS_Find_LIBIDO.cmake)
# EITHER LIST ALL .h IN CURRENT DIR USING NEXT LINE:
#FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h")
# OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_WXWIN "src/interface/wxWindows/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_WXWIN src/interface/wxWindows/*.cxx src/interface/wxWindows/*.cpp src/interface/wxWindows/*.cc)
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_CONTOUR "src/interface/wxWindows/Contour/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_CONTOUR src/interface/wxWindows/Contour/*.cxx src/interface/wxWindows/Contour/*.cpp src/interface/wxWindows/Contour/*.cc)
FILE(GLOB ${LIBRARY_NAME}_HEADERS_ThresholdImageView "src/interface/wxWindows/widgets/ThresholdImageView/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_ThresholdImageView src/interface/wxWindows/widgets/ThresholdImageView/*.cxx src/interface/wxWindows/widgets/ThresholdImageView/*.cpp src/interface/wxWindows/widgets/ThresholdImageView/*.cc)
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_WIDGETS "src/interface/wxWindows/widgets/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_WIDGETS src/interface/wxWindows/widgets/*.cxx src/interface/wxWindows/widgets/*.cpp src/interface/wxWindows/widgets/*.cc)
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_PPLOTTER "src/interface/wxWindows/widgets/pPlotter/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_PPLOTTER src/interface/wxWindows/widgets/pPlotter/*.cxx src/interface/wxWindows/widgets/pPlotter/*.cpp src/interface/wxWindows/widgets/pPlotter/*.cc)
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_MANUAL_CONTOUR "src/interface/wxWindows/widgets/manualContour/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR src/interface/wxWindows/widgets/manualContour/*.cpp )
-
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
-
-
+
+
SET ( ${LIBRARY_NAME}_HEADERS
- ${${LIBRARY_NAME}_HEADERS_WXWIN}
+ ${${LIBRARY_NAME}_HEADERS_WXWIN}
${${LIBRARY_NAME}_HEADERS_CONTOUR}
${${LIBRARY_NAME}_HEADERS_ThresholdImageView}
- ${${LIBRARY_NAME}_HEADERS_WIDGETS}
+ ${${LIBRARY_NAME}_HEADERS_WIDGETS}
${${LIBRARY_NAME}_HEADERS_PPLOTTER}
- ${${LIBRARY_NAME}_HEADERS_MANUAL_CONTOUR}
+ ${${LIBRARY_NAME}_HEADERS_MANUAL_CONTOUR}
include/matrix.h
${${LIBRARY_NAME}_HEADERS_KERNEL}
)
# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
#FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
-
+
SET ( ${LIBRARY_NAME}_SOURCES
- ${${LIBRARY_NAME}_SOURCES_WXWIN}
+ ${${LIBRARY_NAME}_SOURCES_WXWIN}
${${LIBRARY_NAME}_SOURCES_CONTOUR}
${${LIBRARY_NAME}_SOURCES_ThresholdImageView}
${${LIBRARY_NAME}_SOURCES_WIDGETS}
${${LIBRARY_NAME}_SOURCES_PPLOTTER}
- ${${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR}
+ ${${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR}
${${LIBRARY_NAME}_SOURCES_KERNEL}
)
#----------------------------------------------------------------------------
#jhcl-Start===========================================================================
#message(jhcl4${LIBIDO_LIBRARIES})
#jhcl-End===========================================================================
-
+
#----------------------------------------------------------------------------
# LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
ENDIF(CREA_VERBOSE_CMAKE)
-
- # CREATE THE TARGET
+
+ # CREATE THE TARGET
ADD_LIBRARY (${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
# LINK
# Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME})
-
+
# FILE(RELATIVE_PATH
# ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
# ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
INSTALL(
FILES ${${LIBRARY_NAME}_HEADERS}
DESTINATION ${${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS}
- )
-IF(WIN32)
+ )
+IF(WIN32)
INSTALL(
TARGETS ${LIBRARY_NAME}
DESTINATION bin)
if(posA<posB)
{
posA = posB+1;
- if(posB = _controlpointsX.size()-1) // ?!? // JPRx // ?!? EED
+ if( ( posB = _controlpointsX.size()-1) ) // ?!? // JPRx // ?!? EED
{
posA = 0;
}
_textActor->SetPosition(px+GetRange()+1,py);
}
-
}
}
nps_t = nps-1;
}
-
for( i = 0; i < nps_t; i++ )
{
_pts->GetPoint(i%nps, ppA);
i=nps;
}
}
-
return result;
}
if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){
this->vtkInteractorStyleImage::OnRightButtonDown();
}
-
}
//---------------------------------------------------------------------------
this->vtkInteractorStyleImage::OnLeftButtonUp();
}
}
-
virtual void OnRightButtonDown();
virtual void OnRightButtonUp();
-
protected:
private:
manualInteractorWindowLevel *_manualinteractorwindowlevel;
vtkInteractorScrollZ *_vtkInteractorScrollZ;
-
};
manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
-
+
vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
_vtkInfoTextImageInteractorPlane2D->SetModelVtkInfoTextImage(_vtkInfoTextImage);
_vtkInfoTextImage->Configure();
((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkInfoTextImageInteractorPlane2D);
-
-
}
//-------------------------------------------------------------------
X = out[0] + GetVtkmprbasedata()->GetX() ;
Y = out[1] + GetVtkmprbasedata()->GetY() ;
Z = out[2] + GetVtkmprbasedata()->GetZ() ;
-
}
Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2010/04/15 17:54:04 $
- Version: $Revision: 1.25 $
+ Date: $Date: 2010/04/20 14:42:41 $
+ Version: $Revision: 1.26 $
Copyright: (c) 2002, 2003
License:
// Other includes
//------------------------------------------------------------------------------------------------------------
-
//------------------------------------------------------------------------------------------------------------
// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
{
wxPanel *panel = this;
- wxWindow *wxwindow = NULL, *window3D = 0;
+ wxWindow *wxwindow = NULL, *window3D = 0;
wxSplitterWindow *panelClipping3D= 0;
// wxPanel *panelControl = 0;
// wxFlexGridSizer *sizerCtrol = 0;
wxBoxSizer *sizer = 0;
mType = type;
-
+
if (vtkmprbasedata==NULL)
{
minternalVtkmprbasedata = true;
window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
-//--
+//--
wxNotebook *notebook = new wxNotebook(panelClipping3D, -1);
// First tab
panelClipping3D->SplitHorizontally( notebook , window3D , 10 );
//panelClipping3D->SetMinimumPaneSize( 15 );
- panelClipping3D->SetMinimumPaneSize( 35 ); // JPR
+ panelClipping3D->SetMinimumPaneSize( 70 ); // JPR
/* EED 04 / Febrary / 2010
panelControl = new wxPanel(panelClipping3D,-1);
wxPanel *controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelControl, false);
wxFlexGridSizer *sizerCtrol = new wxFlexGridSizer(1);
- sizerCtrol->Add(controlPanelMPR3D , 1, wxALL|wxEXPAND, 2);
+ sizerCtrol->Add(controlPanelMPR3D, 1, wxALL|wxEXPAND, 2);
panelControl->SetAutoLayout(true);
panelControl->SetSizer(sizerCtrol);
panelControl->SetSize(400,350);
panelControl->Layout();
- //panelClipping3D -> SetMinimumPaneSize( 5 );
- panelClipping3D->SetMinimumPaneSize( 35 ); // JPR
+ //panelClipping3D->SetMinimumPaneSize( 5 );
+ panelClipping3D->SetMinimumPaneSize( 100 ); // JPR
+
panelClipping3D->SplitHorizontally( panelControl , window3D , 10 );
wxwindow=panelClipping3D;
-
vtkmpr3Ddataviewer->SetVtkMPRBaseData(mvtkmprbasedata);
//vtkmpr3Ddataviewer->Configure();
// mbbtkViewerMaracas= NULL;
}
//-------------------------------------------------------------------------
-
+
wxMaracas_ViewerWidget::~wxMaracas_ViewerWidget()
{
if (minternalVtkmprbasedata==true)
{
if (mvtkmprbasedata) { delete mvtkmprbasedata;}
}
-
+
if (mvtk2Dbaseview) { delete mvtk2Dbaseview; }
if (mvtkmpr2Dview_X) { delete mvtkmpr2Dview_X;}
if (mvtkmpr2Dview_Y) { delete mvtkmpr2Dview_Y;}
//------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------
-
+
void wxMaracas_ViewerWidget::ConfigureVTK()
{
int x=0,y=0,z=0;
+ /*
int ext[6];
ext[0]=0;
ext[1]=0;
ext[3]=0;
ext[4]=0;
ext[5]=0;
- double org[3],spc[3];
+ */
+ int ext[] = {0, 0, 0, 0, 0, 0}; //JPR
+
+ /*double org[3],spc[3];
org[0]=0;
org[1]=0;
org[2]=0;
spc[0]=0;
spc[1]=0;
spc[2]=0;
-
+ */
+ double org[]={0.0, 0.0, 0.0}; //JPR
+ double spc[]={0.0, 0.0, 0.0}; //JPR
if (mvtkmprbasedata!=NULL)
{
mvtkmprbasedata->Configure();
/*
- x = mvtkmprbasedata -> GetMaxPositionX()/2;
- y = mvtkmprbasedata -> GetMaxPositionY()/2;
- z = mvtkmprbasedata -> GetMaxPositionZ()/2;
+ x = mvtkmprbasedata->GetMaxPositionX()/2;
+ y = mvtkmprbasedata->GetMaxPositionY()/2;
+ z = mvtkmprbasedata->GetMaxPositionZ()/2;
*/
-
+
if(mvtkmprbasedata->GetImageData() != NULL)
{
mvtkmprbasedata->GetImageData()->GetExtent(ext);
}
}
- if ( mvtk2Dbaseview !=NULL ) { mvtk2Dbaseview->Configure(); }
- if ( mvtkmpr2Dview_X !=NULL ) { mvtkmpr2Dview_X->Configure(); }
- if ( mvtkmpr2Dview_Y !=NULL ) { mvtkmpr2Dview_Y->Configure(); }
- if ( mvtkmpr2Dview_Z !=NULL ) { mvtkmpr2Dview_Z->Configure(); }
- if ( mvtkplane2Dview !=NULL ) { mvtkplane2Dview->Configure(); }
- if ( mwidgetMesure !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
- if ( mwidgetMesure !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
- if ( mwidgetMesure !=NULL ) { mwidgetMesure->SetActiveLink(true); }
- if ( mwidgetMesure !=NULL ) { mwidgetMesure->SetMesureScale( 1 ); }
- if ( mwxsphereview !=NULL ) { mwxsphereview->Configure(); }
+ if ( mvtk2Dbaseview !=NULL ) { mvtk2Dbaseview->Configure(); }
+ if ( mvtkmpr2Dview_X !=NULL ) { mvtkmpr2Dview_X->Configure(); }
+ if ( mvtkmpr2Dview_Y !=NULL ) { mvtkmpr2Dview_Y->Configure(); }
+ if ( mvtkmpr2Dview_Z !=NULL ) { mvtkmpr2Dview_Z->Configure(); }
+ if ( mvtkplane2Dview !=NULL ) { mvtkplane2Dview->Configure(); }
+ if ( mwidgetMesure !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
+ if ( mwidgetMesure !=NULL ) { mwidgetMesure->ConfigureA(mvtkplane2Dview); }
+ if ( mwidgetMesure !=NULL ) { mwidgetMesure->SetActiveLink(true); }
+ if ( mwidgetMesure !=NULL ) { mwidgetMesure->SetMesureScale( 1 ); }
+ if ( mwxsphereview !=NULL ) { mwxsphereview->Configure(); }
if (mwxvtk3Dbaseview_Clipping3D !=NULL) {
mwxvtk3Dbaseview_Clipping3D->Configure();
}
-
+
if (vtkmpr3Ddataviewer !=NULL) {
vtkmpr3Ddataviewer->Configure();
mwxvtkmpr3Dview->Configure();
mwxvtkmpr3Dview->ResetCamera(ext,org,spc);
-
-
+
}
if (mwxvtkclipping3Dview !=NULL) { mwxvtkclipping3Dview->Configure(); }
//if (mwxvtkmpr3Dview !=NULL) {
// mwxvtkmpr3Dview->ResetCamera();
//}
-
}
//-------------------------------------------------------------------------
if (mwxvtkmpr3Dview !=NULL ){ mwxvtkmpr3Dview->RefreshView(); }
if (mwxvtkclipping3Dview !=NULL ){ mwxvtkclipping3Dview->Refresh(); }
if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D->Refresh();}
-
}
//-------------------------------------------------------------------------
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
_imageViewer2XYZ->GetVtkImageViewer2()->Render();
-
+
//////////////
//RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
//
manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
-
+
vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
_imageViewer2XYZ = new vtkImageViewer2_XYZ();
wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
-
+
//////////////
//RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
//
manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
-
+
vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
// RaC
//////////////
-
}
if (okimage==true){
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
-
-
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
_imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2);
double range[2];
- imageData->GetScalarRange(range);
- if (range[1]<20000){
+ imageData->GetScalarRange(range);
+ if (range[1]<20000){
_imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 );
_imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 );
- } else {
+ } else {
_imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 );
_imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 );
- }
+ }
// EED 31 Janvier 2007
//vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor ();
//vtkimageactor->InterpolateOff ();
} // okimage
} // imageData
-
}
//-------------------------------------------------------------------
return _interactorStyle;
}
-
//---------------------------------------------------------------------------
void wxVtkBaseView::SetInteractorStyleBaseView( vtkInteractorStyleImage* interactorStyle)
spc[2]=1;
}
-
-
//-------------------------------------------------------------------
//-------------------------------------------------------------------
//-------------------------------------------------------------------
#include "vtkInteractorStyleImage.h"
-
-
-
class creaMaracasVisu_EXPORT wxVtkBaseView{
public:
wxVtkBaseView( );
};
-
-
//------------------------------------------------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
-
-
-
#endif // __WX_VTK__BASE__VIEW__H
-
-
-
Program: wxMaracas
Module: $RCSfile: curve.cxx,v $
Language: C++
- Date: $Date: 2009/05/14 13:55:07 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2010/04/20 14:42:45 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
marVector tg( _dimension ), n( _dimension );
double t;
int i;
-
+
calculeSplineArguments( s, i, t );
derivative1( ( double* )tg, i, t );
derivative2( ( double* )n, i, t );
-
+
memcpy( b,
- ( double* )( tg.cross( n ).normalize( ) ),
- _dimension * sizeof( double ) );
+ ( double* )( tg.cross( n ).normalize( ) ),
+ _dimension * sizeof( double ) );
}
// -------------------------------------------------------------------------
memcpy( tmp, cp, _dimension * sizeof( double ) );
_controlPoints.push_back( tmp );
if( sp != NULL && _stateDim > 0 ) {
-
+
double *tmp1 = new double[ _stateDim ];
memcpy( tmp1, sp, _stateDim * sizeof( double ) );
_controlState.push_back( tmp1 );
-
+
} else
_controlState.push_back( NULL );
-
+
if( _controlPoints.size( ) == 1 ) {
_controlT.push_back( 0.0 );
_controlL.push_back( 0.0 );
-
+
} else {
// Here we maintain some extra info about the control points.
_controlT.push_back( 0.0 );
for( int i = 0; i < _controlT.size( ); i++ )
_controlT[ i ] = _controlL[ i ] / len;
-
}// fi
}
int it;
for( it = i; it < _controlT.size( ); it++ ) {
-
v1 = _controlPoints[ it ];
v0 = _controlPoints[ it - 1 ];
len = ( v1 - v0 ).norm2( ) + _controlL[ it - 1 ];
_controlL[ i ] = len;
-
} // rof
for( it = 0; it < _controlT.size( ); it++ )
_controlT[ it ] = _controlL[ it ] / len;
-
}// fi
}
Program: wxMaracas
Module: $RCSfile: marParameters.cpp,v $
Language: C++
- Date: $Date: 2009/05/14 13:54:43 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2010/04/20 14:42:44 $
+ Version: $Revision: 1.3 $
Copyright: (c) 2002, 2003
License:
#include <math.h>
#include <wx/log.h>
-static char* BoolParamNames[] = {
+static const char* BoolParamNames[] = {
// PS -> "e_debug_window_visible" ,
// PS -> "e_debug_console_visible" ,
// PS -> "e_calculate_mip_default" ,
// PS -> "e_show_cell" ,
// PS -> "e_show_int_cell"
};
-static char* DoubleParamNames[] = {
+
+static const char* DoubleParamNames[] = {
"e_gravity_distance" ,
"e_axis_discret_step" ,
"e_distance_to_maximum_intensity" ,
"e_RescaleIntercept" ,
"e_RescaleSlope" ,
};
-static char* IntParamNames[] = {
+
+static const char* IntParamNames[] = {
"e_roi_dimension" ,
"e_step" ,
"e_step_coeficient" ,
"e_voxel_type" ,
// PS -> "e_coef_cell_max_int"
};
-static char* StringParamNames[] = {
+
+static const char* StringParamNames[] = {
"e_installation_directory" ,
"e_dicom_images_directory"
};
_doubleValues[ e_voxel_y_dimension ] = 1.0;
_doubleValues[ e_voxel_z_dimension ] = 1.0;
_doubleValues[ e_scale ] = 4.0;
- // PS -> _doubleValues[ e_sampling ] = 4.0;
+ // PS -> _doubleValues[ e_sampling ] = 4.0;
_doubleValues[ e_threshold_isocontour ] = 40.0;
_doubleValues[ e_threshold_snake_isocontour ] = 40.0;
_doubleValues[ e_sigma ] = 0.1;
Program: wxMaracas
Module: $RCSfile: marTypes.h,v $
Language: C++
- Date: $Date: 2009/05/14 13:54:43 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2010/04/20 14:42:44 $
+ Version: $Revision: 1.8 $
Copyright: (c) 2002, 2003
License:
* this fairy tale :-).
*/
-
//JHCL - Start
//If we're using windows
/*
*
* This file is included by all project files.
*/
+
+#include <creaSystem.h>
+
+// This redefinitions shoul be useless using uint8_t, etc // JPR
+
typedef unsigned char uchar; /*!< unsigned char redefintion. */
typedef unsigned int uint; /*!< unsigned int redefintion. */
typedef unsigned long ulong; /*!< unsigned long redefintion. */
typedef unsigned short ushort; /*!< unsigned short redefintion. */
-// Is this compilation using LibIDO?
-
-//#define KGFO_USE_IDO // JPRx : Do NOT use LibIDO
-
// Is this compilation using VTK?
#define KGFO_USE_VTK
Program: wxMaracas
Module: $RCSfile: volume.cxx,v $
Language: C++
- Date: $Date: 2010/03/15 14:12:30 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2010/04/20 14:42:44 $
+ Version: $Revision: 1.7 $
Copyright: (c) 2002, 2003
License:
#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-
-// -------------------------------------------------------------------------
-//const int kVolume::IDOTypes[] = { VOL_CHAR, VOL_FLOAT, VOL_DOUBLE, VOL_LONG,
-// VOL_SHORT, VOL_UCHAR, VOL_ULONG,
-// VOL_USHORT };
-
-//#endif // KGFO_USE_IDO
-
// -------------------------------------------------------------------------
const void* kVolume::BLANK = ( void* ) 0;
const void* kVolume::NOALLOC = ( void* )-1;
switch( _type ) {
- case CHAR: p = ( double )( ( char*** )_images )[ z ][ y ][ x ]; break;
- case FLOAT: p = ( double )( ( float*** )_images )[ z ][ y ][ x ]; break;
+ case CHAR: p = ( double )( ( char*** )_images )[ z ][ y ][ x ]; break;
+ case FLOAT: p = ( double )( ( float*** )_images )[ z ][ y ][ x ]; break;
case DOUBLE: p = ( double )( ( double*** )_images )[ z ][ y ][ x ]; break;
- case INT: p = ( double )( ( int*** )_images )[ z ][ y ][ x ]; break;
- case SHORT: p = ( double )( ( short*** )_images )[ z ][ y ][ x ]; break;
- case UCHAR: p = ( double )( ( uchar*** )_images )[ z ][ y ][ x ]; break;
- case UINT: p = ( double )( ( uint*** )_images )[ z ][ y ][ x ]; break;
+ case INT: p = ( double )( ( int*** )_images )[ z ][ y ][ x ]; break;
+ case SHORT: p = ( double )( ( short*** )_images )[ z ][ y ][ x ]; break;
+ case UCHAR: p = ( double )( ( uchar*** )_images )[ z ][ y ][ x ]; break;
+ case UINT: p = ( double )( ( uint*** )_images )[ z ][ y ][ x ]; break;
case USHORT: p = ( double )( ( ushort*** )_images )[ z ][ y ][ x ]; break;
default: p = 0.0; break;