#include "bbmaracasvisuDrawAxisTree3D.h"
#include "bbcreaMaracasVisuPackage.h"
+#include "vtkLinearTransform.h"
+
namespace bbcreaMaracasVisu
{
for (i=iGeneral;i<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 par·metro dycom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata
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] );
allTopology->InsertCellPoint( i-iGeneral );
} // rof
polydata->SetPoints( allPoints );
// color
double r,g,b;
- if ( (iAxis*3+1) < bbGetInputColour().size() ){
+ if ( (iAxis*3+1) < (int)(bbGetInputColour().size()) )
+ {
r = bbGetInputColour()[0+iAxis*3];
g = bbGetInputColour()[1+iAxis*3];
b = bbGetInputColour()[2+iAxis*3];
- } else {
- r = bbGetInputColour()[0];
- g = bbGetInputColour()[1];
- b = bbGetInputColour()[2];
- }
+ } 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;
+ }
- vtkactor->GetProperty()->SetColor( 1,0,0 );
- vtkactor->GetProperty()->SetLineWidth( 3 );
+ vtkactor->GetProperty()->SetColor( r,g,b );
+ vtkactor->GetProperty()->SetLineWidth( 0.5 );
+
+ if ( bbGetInputTransform()!=NULL )
+ {
+ vtkactor->SetUserTransform( bbGetInputTransform() );
+ }
// Interface Update
if (bbGetInputRenderer()!=NULL )
numPoints = bbGetInputlstIndexs()[iAxis];
DrawOneAxis(iGeneral,numPoints,iAxis);
iGeneral = iGeneral+numPoints;
+
+ if ((iAxis % 1)==0)
+ {
+ printf("EED DrawAxisTree3D::Process %d/%d\n", iAxis,sizeLstAxis );
+ }
}
}
-void DrawAxisTree3D::bbUserConstructor()
+void DrawAxisTree3D::bbUserSetDefaultValues()
{
bbSetInputiAxis(0);
std::vector<double> colour;
}
-void DrawAxisTree3D::bbUserCopyConstructor()
-{
-}
-
-void DrawAxisTree3D::bbUserDestructor()
-{
-}
+
+ //-----------------------------------------------------------------
+ void DrawAxisTree3D::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void DrawAxisTree3D::bbUserFinalizeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
}
// EO namespace bbcreaMaracasVisu