]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx
*** empty log message ***
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuDrawAxisTree3D.cxx
index 4c80882c463d011ece282b76e2c942879f823ca8..ab3ad3110cd05c73f03ac4a10ca7f862325b2e85 100644 (file)
@@ -1,5 +1,7 @@
 #include "bbmaracasvisuDrawAxisTree3D.h"
 #include "bbcreaMaracasVisuPackage.h"
+#include "vtkLinearTransform.h"
+
 namespace bbcreaMaracasVisu
 {
 
@@ -38,7 +40,7 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
                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] );
@@ -53,7 +55,7 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        // 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];
@@ -66,6 +68,11 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        vtkactor->GetProperty()->SetColor( 1,0,0 );
        vtkactor->GetProperty()->SetLineWidth( 3 );
 
+       if ( bbGetInputTransform()!=NULL )
+       {
+               vtkactor->SetUserTransform( bbGetInputTransform() );
+       }
+
      // Interface Update
      if  (bbGetInputRenderer()!=NULL )
      {
@@ -107,7 +114,7 @@ void DrawAxisTree3D::Process()
 
 }
 
-void DrawAxisTree3D::bbUserConstructor()
+void DrawAxisTree3D::bbUserSetDefaultValues()
 { 
         bbSetInputiAxis(0);
      std::vector<double> colour;
@@ -141,13 +148,18 @@ void DrawAxisTree3D::bbUserConstructor()
 
 }
 
-void DrawAxisTree3D::bbUserCopyConstructor()
-{  
-}
-
-void DrawAxisTree3D::bbUserDestructor()
-{  
-}
+       
+       //-----------------------------------------------------------------     
+       void DrawAxisTree3D::bbUserInitializeProcessing()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
+       void DrawAxisTree3D::bbUserFinalizeProcessing()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
 
 }
 // EO namespace bbcreaMaracasVisu