X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuDrawAxe3D.cxx;h=f7be326c61962da3983b7cab719e1fe130671dd1;hb=542063db4a06b1a74587bcab7d5c450ebdd53272;hp=6a369f3aa6c6e7404127f4ff9db4bd35231315cf;hpb=bb69ea7be3f8baa4122fb51d04b4ec6ce906c809;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx index 6a369f3..f7be326 100644 --- a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx +++ b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx @@ -40,12 +40,10 @@ 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(); -printf("EED DrawAxe3D::Process size vector %d %d %d\n",vectx.size(),vecty.size(),vectz.size() ); // vtkImageData* img = bbGetInputImage(); unsigned int i; @@ -57,50 +55,40 @@ printf("EED DrawAxe3D::Process size vector %d %d %d\n",vectx.size(),vecty.size() if(!vectx.empty()&&!vecty.empty()&&!vectz.empty()) { -printf("EED DrawAxe3D::Process 1\n"); vtkPoints* allPoints = vtkPoints::New( ); vtkCellArray* allTopology = vtkCellArray::New( ); allTopology->InsertNextCell( vectx.size() ); -printf("EED DrawAxe3D::Process 2\n"); for( i = 0; i < vectx.size( ); i++) { //multiplicar ver parametros spacing, en maracas cuando se toca la imagen y se ve dycom //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 ); -printf("EED DrawAxe3D::Process 3\n"); } // rof mallData->SetPoints( allPoints ); mallData->SetLines( allTopology ); -printf("EED DrawAxe3D::Process 4\n"); allPoints->Delete(); allTopology->Delete(); -printf("EED DrawAxe3D::Process 5\n"); } mvtkactor->GetProperty()->SetColor( bbGetInputColour()[0], bbGetInputColour()[1], bbGetInputColour()[2] ); -printf("EED DrawAxe3D::Process 6\n"); //EC Axe Opacity property added ///Default Values double opacity=bbGetInputOpacity(); mvtkactor->GetProperty()->SetOpacity( opacity ); -printf("EED DrawAxe3D::Process 7\n"); if ( bbGetInputTransform()!=NULL ) { -printf("EED DrawAxe3D::Process 8\n"); mvtkactor->SetUserTransform( bbGetInputTransform() ); } // Interface Update if ((firsttime==true) && (bbGetInputRenderer()!=NULL )) { -printf("EED DrawAxe3D::Process 9\n"); firsttime=false; bbGetInputRenderer()->AddActor( mvtkactor ); } -printf("EED DrawAxe3D::Process End\n"); } @@ -132,7 +120,13 @@ void DrawAxe3D::bbUserSetDefaultValues() polydatamapper = vtkPolyDataMapper::New(); mvtkactor = vtkActor::New(); +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 polydatamapper->SetInput(mallData); +#else + polydatamapper->SetInputData(mallData); +#endif + mvtkactor->SetMapper(polydatamapper); bbSetOutputOut(mvtkactor); }