From 1b87b45c8f62aa58d47bb7151977962b665eeb23 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Wed, 18 Sep 2024 17:04:31 +0200 Subject: [PATCH] Clean code --- .../src/bbmaracasvisuImageChangeInformation.h | 2 +- bbtk/src/bbmaracasvisuViewerNV.h | 2 +- .../src/CutModule/kernel/CutModelData.cxx | 19 ++++---- .../src/CutModule/kernel/CutModelData.h | 45 ++++++++----------- 4 files changed, 28 insertions(+), 40 deletions(-) diff --git a/bbtk/src/bbmaracasvisuImageChangeInformation.h b/bbtk/src/bbmaracasvisuImageChangeInformation.h index ec7b9b1..cde04df 100644 --- a/bbtk/src/bbmaracasvisuImageChangeInformation.h +++ b/bbtk/src/bbmaracasvisuImageChangeInformation.h @@ -55,7 +55,7 @@ private: BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageChangeInformation,bbtk::AtomicBlackBox); BBTK_NAME("ImageChangeInformation"); BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr"); -BBTK_DESCRIPTION("vtkImageData change information. Translate extern to 0,0,0"); +BBTK_DESCRIPTION("(C++,JavaScript) vtkImageData change information. Translate extern to 0,0,0"); BBTK_CATEGORY("filter"); BBTK_INPUT(ImageChangeInformation,In,"Input image",vtkImageData*,""); BBTK_INPUT(ImageChangeInformation,NewSpacing,"New spacing of the image. 3 elements (default: the same spacing of the original image)", std::vector ,""); diff --git a/bbtk/src/bbmaracasvisuViewerNV.h b/bbtk/src/bbmaracasvisuViewerNV.h index 09db75a..8324879 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.h +++ b/bbtk/src/bbmaracasvisuViewerNV.h @@ -117,7 +117,7 @@ private: BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerNV,bbtk::WxBlackBox); BBTK_NAME("ViewerNV"); BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr"); -BBTK_DESCRIPTION("(C++,Python) Viewer : N view configuration 2D and 3D"); +BBTK_DESCRIPTION("(C++,Python,JavaScript) 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*,""); diff --git a/lib/maracasVisuLib/src/CutModule/kernel/CutModelData.cxx b/lib/maracasVisuLib/src/CutModule/kernel/CutModelData.cxx index 8d27a5c..2851a1d 100644 --- a/lib/maracasVisuLib/src/CutModule/kernel/CutModelData.cxx +++ b/lib/maracasVisuLib/src/CutModule/kernel/CutModelData.cxx @@ -130,9 +130,9 @@ void CutModelData::setTransform(vtkImageData* img) } } -void CutModelData::createActor(){ - - _Mapper = vtkPolyDataMapper::New(); +void CutModelData::createActor() +{ + _Mapper = vtkPolyDataMapper::New(); _Actor = vtkActor::New(); _Actor->SetMapper(_Mapper); _Actor->GetProperty()->SetColor(1, 0, 0); @@ -154,9 +154,9 @@ void CutModelData::udapteActorDirection() void CutModelData::createShapes() { - _cubefigure = new CutModelFigureCube(); + _cubefigure = new CutModelFigureCube(); _cylinderfigure = new CutModelFigureCylinder(); - _spherefigure = new CutModelFigureSphere(); + _spherefigure = new CutModelFigureSphere(); } // EED 2022-08-04 throw @@ -317,21 +317,18 @@ void CutModelData::ExecuteCut( double* range, bool isinside, vtkImageData* copyi copyimage->GetExtent(ext); for (xx=ext[0];xx<=ext[1]; xx++) { - for (yy=ext[2];yy<=ext[3]; yy++) + for (yy=ext[2];yy<=ext[3]; yy++) { - for (zz=ext[4];zz<=ext[5];zz++) + for (zz=ext[4];zz<=ext[5];zz++) { inside=actualCuttingModel->IfPointInside(xx,yy,zz); if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) ) { pOrg=(unsigned short*)copyimage->GetScalarPointer (xx,yy,zz); - //std::cout<<"xx,yy,zz "<