From 05d99fb3593b5ce88f1d95a1ec5202009922238f Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Mon, 4 Nov 2024 13:21:33 +0100 Subject: [PATCH] Clean code --- bbtk/src/bbcreaContoursSetViewerPosition.cxx | 12 +++++++----- bbtk/src/bbcreaContourswxContourMainFrame_tool.h | 11 ++++++----- .../wxContourMainFrame.h | 10 +++------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/bbtk/src/bbcreaContoursSetViewerPosition.cxx b/bbtk/src/bbcreaContoursSetViewerPosition.cxx index ac9b9b9..88b7058 100644 --- a/bbtk/src/bbcreaContoursSetViewerPosition.cxx +++ b/bbtk/src/bbcreaContoursSetViewerPosition.cxx @@ -29,12 +29,13 @@ void SetViewerPosition::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <setConceptValue( "Axe Depth", slice ); bbGetInputwxContourMainFrame()->SetXY(x,dimY-z-1); + printf("EED SetViewerPosition::Process flag2 %d %d %d\n",x,y,z); } // if Direction1 if (bbGetInputDirection()==2) @@ -69,9 +71,9 @@ void SetViewerPosition::Process() bbGetInputwxContourMainFrame()->showAxis(true); bbGetInputwxContourMainFrame()->changeInstant(); bbGetInputwxContourMainFrame()->RefreshInterface(); - backX=x; - backY=y; - backZ=z; + backX = x; + backY = y; + backZ = z; } // if bbGetInputPosition } // if bbGetInputwxContourMainFrame } // if backX backY backZ diff --git a/bbtk/src/bbcreaContourswxContourMainFrame_tool.h b/bbtk/src/bbcreaContourswxContourMainFrame_tool.h index edb6748..ceb5410 100644 --- a/bbtk/src/bbcreaContourswxContourMainFrame_tool.h +++ b/bbtk/src/bbcreaContourswxContourMainFrame_tool.h @@ -21,9 +21,10 @@ class bbcreaContours_EXPORT 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) //===== - BBTK_DECLARE_INPUT( Type , int ); - BBTK_DECLARE_INPUT( Param1, std::vector ); - BBTK_DECLARE_INPUT( Image , vtkImageData* ); + BBTK_DECLARE_INPUT( Type , int ); + BBTK_DECLARE_INPUT( Param1, std::vector ); + BBTK_DECLARE_INPUT( Image , vtkImageData* ); + BBTK_DECLARE_OUTPUT( Out , std::vector ); // BBTK_DECLARE_OUTPUT(Out,double); BBTK_PROCESS(Process); @@ -38,10 +39,10 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxContourMainFrame_tool,bbtk::AtomicBlackBox); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("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",int,""); + 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,""); BBTK_INPUT(wxContourMainFrame_tool,Image,"Image", vtkImageData*,""); -// BBTK_OUTPUT(wxContourMainFrame_tool,Out,"First output",double,""); + BBTK_OUTPUT(wxContourMainFrame_tool,Out,"Type 4: Position of viewer ", std::vector,""); 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) diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 7d6bc02..56414a1 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -105,8 +105,6 @@ #include #include -//#include "vtkMetaImageReader.h" - //------------------------------------------------------------------------------------------------------------ // Events declaration //------------------------------------------------------------------------------------------------------------ @@ -329,11 +327,9 @@ class wxContourMainFrame : public wxPanel { std::string GetStringTypeImage( vtkImageData* image); //------------------------------------------------------------------------------------------------------------ - void SetXY(int x,int y); - - //------------------------------------------------------------------------------------------------------------ - void ResetCamera(); - + // Use by BBTK boxes + void SetXY(int x,int y); + void ResetCamera(); private: //------------------------------------------------------------------------------------------------------------ -- 2.47.1