X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuDrawAxe3D.cxx;h=cd9997b4087ced046f0f9161465b126adfc456f2;hb=2ea436781de525e1ffa633997c9df9b938f170ff;hp=14db3707048d91771fe441748d9161dcca544684;hpb=738e5bef4c52a1f25013e598a008a81f20fc6f63;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx index 14db370..cd9997b 100644 --- a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx +++ b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx @@ -1,24 +1,22 @@ #include "bbmaracasvisuDrawAxe3D.h" #include "bbcreaMaracasVisuPackage.h" - #include "vtkImageData.h" #include "vtkActor.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkProperty.h" - #include "vtkLinearTransform.h" namespace bbcreaMaracasVisu { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,DrawAxe3D) BBTK_BLACK_BOX_IMPLEMENTATION(DrawAxe3D,bbtk::AtomicBlackBox); void DrawAxe3D::Process() { - + printf("EED DrawAxe3D::Process start \n"); + std::vector< double > vectx = bbGetInputlstPointX(); std::vector< double > vecty = bbGetInputlstPointY(); std::vector< double > vectz = bbGetInputlstPointZ(); @@ -38,7 +36,7 @@ void DrawAxe3D::Process() for( i = 0; i < vectx.size( ); i++) { //multiplicar ver parametros spacing, en maracas cuando se toca la imagen y se ve dycom - //hay par·metro dycom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata + //hay parametro dicom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata allPoints->InsertNextPoint( vectx[i]*spc[0], vecty[i]*spc[1], vectz[i]*spc[2] ); allTopology->InsertCellPoint( i ); } // rof @@ -49,8 +47,8 @@ void DrawAxe3D::Process() } mvtkactor->GetProperty()->SetColor( bbGetInputColour()[0], - bbGetInputColour()[1], - bbGetInputColour()[2] ); + bbGetInputColour()[1], + bbGetInputColour()[2] ); if ( bbGetInputTransform()!=NULL ) { @@ -63,16 +61,18 @@ void DrawAxe3D::Process() firsttime=false; bbGetInputRenderer()->AddActor( mvtkactor ); } + + printf("EED DrawAxe3D::Process end \n"); } void DrawAxe3D::bbUserSetDefaultValues() { - firsttime = true; - mallData = NULL; - polydatamapper = NULL; - mvtkactor = NULL; - + firsttime = true; + mallData = NULL; + polydatamapper = NULL; + mvtkactor = NULL; + std::vector colour; colour.push_back(1.0); colour.push_back(0.0); @@ -81,19 +81,19 @@ void DrawAxe3D::bbUserSetDefaultValues() } - + //----------------------------------------------------------------- void DrawAxe3D::bbUserInitializeProcessing() { - mallData = vtkPolyData::New( ); - polydatamapper = vtkPolyDataMapper::New(); - mvtkactor = vtkActor::New(); + mallData = vtkPolyData::New( ); + polydatamapper = vtkPolyDataMapper::New(); + mvtkactor = vtkActor::New(); polydatamapper->SetInput(mallData); mvtkactor->SetMapper(polydatamapper); bbSetOutputOut(mvtkactor); } - + //----------------------------------------------------------------- void DrawAxe3D::bbUserFinalizeProcessing() { @@ -101,27 +101,22 @@ void DrawAxe3D::bbUserSetDefaultValues() { mallData->Delete(); mallData=NULL; - } + } if (polydatamapper!=NULL) { polydatamapper->Delete(); polydatamapper=NULL; - } + } if (mvtkactor!=NULL) { mvtkactor->Delete(); mvtkactor=NULL; - } - + } } - - //----------------------------------------------------------------- - - - + //----------------------------------------------------------------- } // EO namespace bbcreaMaracasVisu