]> Creatis software - creaMaracasVisu.git/commitdiff
#3265 creaMaracasVisu Bug New Normal - DrawAxisTree3D box
authorEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Fri, 21 Jun 2019 11:33:58 +0000 (13:33 +0200)
committerEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Fri, 21 Jun 2019 11:33:58 +0000 (13:33 +0200)
bbtk/bbs/appli/exampleDrawAxisTree3D.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleDrawAxisTree3D.bbs [new file with mode: 0644]
bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx

diff --git a/bbtk/bbs/appli/exampleDrawAxisTree3D.bbg b/bbtk/bbs/appli/exampleDrawAxisTree3D.bbg
new file mode 100644 (file)
index 0000000..b19f7d6
--- /dev/null
@@ -0,0 +1,64 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleDrawAxisTree3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+creaMaracasVisu:DrawAxisTree3D:Box00
+ISEXEC:FALSE
+-21.033945:-26.493137:-900.000000
+24.206055:-36.493137:-900.000000
+PORT
+ColourLaw:"2"
+PORT
+LineWidth:"1"
+PORT
+Opacity:"1"
+PORT
+lstIndexs:"6 3 3"
+PORT
+lstPointX:"10 20 30 40 50 60 30 80 90 40 80 90"
+PORT
+lstPointY:"10 30 20 40 60 60 20 50 70 40 40 60"
+PORT
+lstPointZ:"10 20 30 40 50 60 30 45 53 40 80  90"
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+-32.915716:74.662477:-900.000000
+2.634284:64.662477:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:TRUE
+-42.870713:32.594587:-900.000000
+20.849287:22.594587:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box03
+ISEXEC:FALSE
+-32.273458:55.394741:-900.000000
+19.901542:45.394741:-900.000000
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+Box01:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Renderer1:Box00:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box00:BoxExecute
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/appli/exampleDrawAxisTree3D.bbs b/bbtk/bbs/appli/exampleDrawAxisTree3D.bbs
new file mode 100644 (file)
index 0000000..d2339c2
--- /dev/null
@@ -0,0 +1,45 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleDrawAxisTree3D.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include vtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:DrawAxisTree3D Box00
+  set Box00.ColourLaw "2"
+  set Box00.LineWidth "1"
+  set Box00.Opacity "1"
+  set Box00.lstIndexs "6 3 3"
+  set Box00.lstPointX "10 20 30 40 50 60 30 80 90 40 80 90"
+  set Box00.lstPointY "10 30 20 40 60 60 20 50 70 40 40 60"
+  set Box00.lstPointZ "10 20 30 40 50 60 30 45 53 40 80  90"
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new vtk:vtkImageDataPointerRelay Box03
+
+
+connect Box01.Out Box03.In
+
+connect Box03.Out Box02.In
+
+connect Box02.Renderer1 Box00.Renderer
+
+connect Box02.BoxChange Box00.BoxExecute
+
+
+
+# Complex input ports
+exec Box02
index 33bb1d776f08bac7cbcf4ca07a452cc746da09f7..f56b4164065fab81ce73a0ff4544765802d9bd05 100644 (file)
@@ -54,6 +54,7 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        polydatamapper->SetInput(polydata);
 #else
        polydatamapper->SetInputData(polydata);
+       polydatamapper->Update();
 #endif
        vtkactor->SetMapper(polydatamapper);
 
@@ -147,7 +148,6 @@ polyline->GetPointIds()->InsertNextId(i-iGeneral);
                vtkactor->GetProperty()->SetColor( r,g,b );
        }  // Law 2  color for each segment
 
-
        if (bbGetInputColourLaw()==3)  // color for each point 
        {
                // Setup the colors array
@@ -171,7 +171,6 @@ polyline->GetPointIds()->InsertNextId(i-iGeneral);
  
        }  // Law 3 color for each point
 
-
        vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
        vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
 
@@ -185,18 +184,19 @@ polyline->GetPointIds()->InsertNextId(i-iGeneral);
      {
            bbGetInputRenderer()->AddActor( vtkactor );
      }
+
 }
 
 
 void DrawAxisTree3D::Process()
 {
-       printf("EED DrawAxisTree3D::Process start \n");
 
        int iGeneral=0;
        int iAxis,sizeLstAxis=bbGetInputlstIndexs().size();
     int iActor,sizeActors = vecVtkActors.size();
        int numPoints;
 
+
 //    if (oldLstSize!=sizeLstAxis)
 //      {
 //        oldLstSize=sizeLstAxis;
@@ -214,6 +214,7 @@ void DrawAxisTree3D::Process()
          vecVtkPolyDataMaper.clear();
          vecVtkActors.clear();
 
+
         for ( iAxis=0 ; iAxis<sizeLstAxis ; iAxis++)
         {
             numPoints = bbGetInputlstIndexs()[iAxis];
@@ -235,6 +236,7 @@ void DrawAxisTree3D::Process()
         } // if 
 
  //   } else {// if oldLstSize
+
         for (iActor=0 ; iActor<sizeActors; iActor++)
         {
             vecVtkActors[iActor]->GetProperty()->SetOpacity( bbGetInputOpacity() );
@@ -242,8 +244,6 @@ void DrawAxisTree3D::Process()
         }
 //    } // if oldLstSize
 
-       printf("EED DrawAxisTree3D::Process end \n");
-
 }
 
 void DrawAxisTree3D::bbUserSetDefaultValues()
@@ -281,6 +281,7 @@ void DrawAxisTree3D::bbUserSetDefaultValues()
      bbSetInputOpacity(1);
      bbSetInputLineWidth(0.5);
      bbSetInputColourLaw(1);
+     bbSetInputTransform(NULL);
 
 }