From: Eduardo DAVILA Date: Wed, 31 Aug 2022 15:23:37 +0000 (+0200) Subject: MeshManager X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=be32fd3f21cae7088663d1fcb50c32a62ec078b9;p=creaVtk.git MeshManager --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx index 2d52f39..84e89e6 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx @@ -48,19 +48,16 @@ void Actor::Process() double b = bbGetInputColor()[2]; vtkactor->GetProperty()->SetColor( r,g,b ); } - if ( bbGetInputTransform()!=NULL ) { vtkprop3D->SetUserTransform( bbGetInputTransform() ); } - // bbSetOutputOut( vtkactor ); - - // Interface Update + // bbSetOutputOut( vtkactor ); + // Interface Update if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() )) { - if (bbGetInputActive()==true ) { bbGetInputRenderer()->AddActor( vtkprop3D ); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.cxx index 4c444dd..7b9cf25 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.cxx @@ -36,11 +36,6 @@ void CreateMeshFromPoints::Process() std::vector lstZ = bbGetInputLstZ(); std::vector lstIndexs = bbGetInputLstIndexs(); - printf("CreateMeshFromPoints::Process: sizeX %d \n", lstX.size() ); - printf("CreateMeshFromPoints::Process: sizeY %d \n", lstY.size() ); - printf("CreateMeshFromPoints::Process: sizeZ %d \n", lstZ.size() ); - printf("CreateMeshFromPoints::Process: lstIndexs %d \n", lstIndexs.size() ); - if ( (lstIndexs.size()<=1) || (lstX.size()==0) || (lstX.size()!=lstY.size()) || (lstY.size()!=lstZ.size()) ) { printf("Warnning! CreateMeshFromPoints::Process: List of points X Y Z and LstIndexes is not correct\n"); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx index 826d759..742a700 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx @@ -33,7 +33,7 @@ void Cutter::Process() // See example in: // https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/Cutter/ - printf("EED Cutter::Process start this=%p ImFu=%p \n ", this, bbGetInputImplicitFunction() ); + printf("EED Cutter::Process start this=%p ImFu=%p In=%p\n", this, bbGetInputImplicitFunction() , bbGetInputIn() ); if ( (bbGetInputActive()==true) && (bbGetInputIn()!=NULL) ) { vtkCutter *cutter; @@ -45,9 +45,8 @@ void Cutter::Process() } else { bbSetOutputOut( NULL ); } - - printf("EED Cutter::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) //===== diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx index bda31e1..b175bd4 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx @@ -26,7 +26,9 @@ void MeshManager_tool::Process() // (the one provided in the attribute 'type' of the tag 'input') // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <GetPoints(); +// if (points!=NULL) +// { + bbGetInputMeshManagerModel()->SetMeshMemoryMode( bbGetInputMesh() ); +// } // if points!=NULL +// } // Mesh!=NULL + } // if Tool 35 Set memory mode + + if (bbGetInputTool()==40) // Reset { printf("EED Warning! MeshManager_tool Reset Not implemented.\n"); } // if Tool 40 Reset + + + } else { printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n"); }// if MeshManagerModel != NULL diff --git a/lib/creaVtk/MeshManagerModel.cpp b/lib/creaVtk/MeshManagerModel.cpp index 01f3398..f87f714 100644 --- a/lib/creaVtk/MeshManagerModel.cpp +++ b/lib/creaVtk/MeshManagerModel.cpp @@ -52,6 +52,12 @@ void MeshManagerModel::SetMeshBase(vtkPolyData* mesh) } // if mesh } +void MeshManagerModel::SetMeshMemoryMode(vtkPolyData* mesh) +{ + _meshBase = mesh; + RefreshOutputs(); +} + vtkPolyData* MeshManagerModel::GetMeshBase() { return _meshBase; diff --git a/lib/creaVtk/MeshManagerModel.h b/lib/creaVtk/MeshManagerModel.h index 7677cc7..4373ff1 100644 --- a/lib/creaVtk/MeshManagerModel.h +++ b/lib/creaVtk/MeshManagerModel.h @@ -46,6 +46,7 @@ public : ~MeshManagerModel(); void SetMeshBase(vtkPolyData* mesh); + void SetMeshMemoryMode(vtkPolyData* mesh); vtkPolyData* GetMeshBase(); vtkPolyData* GetMeshTemp(); virtual void RefreshOutputs();