From 4aa1dc840aa9d3b26a4880227e4ce82a6046b2c5 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Fri, 22 Apr 2011 11:11:05 +0000 Subject: [PATCH 1/1] no message --- bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx | 5 +++- bbtk/src/bbmaracasvisuAxeVolume.cxx | 30 ++++++++++++++------ bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx | 17 +++++------ 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx b/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx index 317c922..058093d 100644 --- a/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx +++ b/bbtk/src/bbcreaMaracasVisuReadAxisTree3D.cxx @@ -32,7 +32,8 @@ void ReadAxisTree3D::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - + printf("EED ReadAxisTree3D::Process start \n"); + std::vector< std::vector * > tlst; int i; @@ -71,6 +72,8 @@ void ReadAxisTree3D::Process() i=7; if (i<=bbGetInputDimension()) { bbSetOutputlstData7( *(tlst[i-1]) ); } i=8; if (i<=bbGetInputDimension()) { bbSetOutputlstData8( *(tlst[i-1]) ); } i=9; if (i<=bbGetInputDimension()) { bbSetOutputlstData9( *(tlst[i-1]) ); } + + printf("EED ReadAxisTree3D::Process end \n"); } diff --git a/bbtk/src/bbmaracasvisuAxeVolume.cxx b/bbtk/src/bbmaracasvisuAxeVolume.cxx index db203c7..de06d97 100644 --- a/bbtk/src/bbmaracasvisuAxeVolume.cxx +++ b/bbtk/src/bbmaracasvisuAxeVolume.cxx @@ -7,6 +7,9 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,AxeVolume) BBTK_BLACK_BOX_IMPLEMENTATION(AxeVolume,bbtk::AtomicBlackBox); void AxeVolume::Process() { + + printf("EED AxeVolume::Process start \n"); + if ( mimage!=NULL ) { mimage->Delete(); @@ -60,36 +63,45 @@ void AxeVolume::Process() px = bbGetInputlstPointX()[iAxe]; py = bbGetInputlstPointY()[iAxe]; pz = bbGetInputlstPointZ()[iAxe]; - printf("AxeVolume::Process %d -> %f, %f, %f\n",iAxe, px,py,pz); +// printf("AxeVolume::Process %d -> %f, %f, %f\n",iAxe, px,py,pz); px1 = px - r; py1 = py - r; pz1 = pz - r; px2 = px + r; py2 = py + r; pz2 = pz + r; + rr=r*r; for ( i=px1 ; i<=px2 ; i++ ) { + rx = i - px; + rx = rx*rx; for ( j=py1 ; j=0) && (i=0) && (j=0) && (kGetScalarPointer (i, j, k); + if (*p==0) { - p = (unsigned short*)mimage->GetScalarPointer (i, j, k); - *p=255; - } + rz = k - pz; + rz = rz*rz; + if ( rx + ry + rz <= rr ) + { + *p=255; + } + } // *p==0 } // inside point } //for k } //for j } //for i } // for iAxe bbSetOutputOut( mimage ); + + printf("EED AxeVolume::Process end \n"); + } diff --git a/bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx b/bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx index 79e2568..faf8132 100644 --- a/bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx +++ b/bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx @@ -44,7 +44,7 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis) allPoints->InsertNextPoint( bbGetInputlstPointX()[i]*spc[0], bbGetInputlstPointY()[i]*spc[1], bbGetInputlstPointZ()[i]*spc[2] ); - printf("DrawAxisTree3D::DrawOneAxis point %d -> %f, %f, %f \n", i, bbGetInputlstPointX()[i], bbGetInputlstPointY()[i], bbGetInputlstPointZ()[i] ); +// printf("DrawAxisTree3D::DrawOneAxis point %d -> %f, %f, %f \n", i, bbGetInputlstPointX()[i], bbGetInputlstPointY()[i], bbGetInputlstPointZ()[i] ); allTopology->InsertCellPoint( i-iGeneral ); } // rof polydata->SetPoints( allPoints ); @@ -62,9 +62,6 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis) g = bbGetInputColour()[1+iAxis*3]; b = bbGetInputColour()[2+iAxis*3]; } else { -// r = bbGetInputColour()[0]; -// g = bbGetInputColour()[1]; -// b = bbGetInputColour()[2]; r = (rand() % 100) / 100.0; g = (rand() % 100) / 100.0; b = (rand() % 100) / 100.0; @@ -88,6 +85,8 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis) void DrawAxisTree3D::Process() { + printf("EED DrawAxisTree3D::Process start \n"); + int iActor,sizeActors = vecVtkActors.size(); for (iActor=0 ; iActor