// * 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<std::string> * > tlst;
int i;
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");
}
BBTK_BLACK_BOX_IMPLEMENTATION(AxeVolume,bbtk::AtomicBlackBox);
void AxeVolume::Process()
{
+
+ printf("EED AxeVolume::Process start \n");
+
if ( mimage!=NULL )
{
mimage->Delete();
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<py2 ; j++ )
{
+ ry = j - py;
+ ry = ry*ry;
for ( k=pz1 ; k<pz2 ; k++ )
{
if ( (i>=0) && (i<sizeX) && (j>=0) && (j<sizeY) &&(k>=0) && (k<sizeZ) ){
- rx = i - px;
- ry = j - py;
- rz = k - pz;
- rr = rx*rx + ry*ry + rz*rz;
- if ( rx*rx + ry*ry + rz*rz <= r*r )
+ p = (unsigned short*)mimage->GetScalarPointer (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");
+
}
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 );
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;
void DrawAxisTree3D::Process()
{
+ printf("EED DrawAxisTree3D::Process start \n");
+
int iActor,sizeActors = vecVtkActors.size();
for (iActor=0 ; iActor<sizeActors; iActor++)
{
DrawOneAxis(iGeneral,numPoints,iAxis);
iGeneral = iGeneral+numPoints;
- if ((iAxis % 1)==0)
- {
- printf("EED DrawAxisTree3D::Process %d/%d\n", iAxis,sizeLstAxis );
- }
+// if ((iAxis % 1)==0)
+// {
+// printf("EED DrawAxisTree3D::Process %d/%d\n", iAxis,sizeLstAxis );
+// }
+
}
bbSetOutputOutAxis( vecVtkActors[ bbGetInputiAxis() ] );
+ printf("EED DrawAxisTree3D::Process end \n");
}