]> Creatis software - creaVtk.git/blobdiff - lib/creaVtk/vtkTensorsVisu.cpp
#2501 creaVtk Bug New Normal - Clean events in Vectors and Tensors visu widgets...
[creaVtk.git] / lib / creaVtk / vtkTensorsVisu.cpp
index c834ada83a2a76b01e51875f310a8e590a016ac5..7f6fe1584f133499c230ca9d2ca550bebccbcc73 100644 (file)
 //------------------------------------------------------------------------
 vtkTensorsVisu::vtkTensorsVisu() : vtkVectorsTensorsVisuBase()
 {
-       ss              = vtkSphereSource::New();
+       ss                                      = vtkSphereSource::New();
        superquadratic  = vtkSuperquadricSource::New();
-       cs              = vtkCubeSource::New(); 
-       tg              = vtkTensorGlyph::New();
-       pdn             = vtkPolyDataNormals::New();
-       pd              = vtkPolyData::New();
-       pod             = vtkPointData::New();
+       cs                                      = vtkCubeSource::New(); 
+       tg                                      = vtkTensorGlyph::New();
+       pdn                                     = vtkPolyDataNormals::New();
+       pd                                      = vtkPolyData::New();
+       pod                                     = vtkPointData::New();
 }
 
 //------------------------------------------------------------------------
@@ -52,20 +52,17 @@ void vtkTensorsVisu::Process()
 {
 printf("EED vtkTensorsVisu::Process Start\n");
 
-
-  if (_active==true){
-//        std::string source="sphere";
-        std::string source="superquadratic";
-       if(source=="sphere")
+  if (_active==true)
+  {
+       if(GetTypeForm()==2)                                                            // source superquadratic
        {
-               tg->SetSource(ss->GetOutput());
-       } else if(source=="cube") {
-               tg->SetSource(cs->GetOutput());
-       }else if(source=="superquadratic") {
                superquadratic->SetThetaResolution(20);
                superquadratic->SetPhiResolution(20);
                tg->SetSource(superquadratic->GetOutput());
-       } else {
+       } else if(GetTypeForm()==1) {                                   // source sphere
+               tg->SetSource(ss->GetOutput());
+       } else {                                                                                                // source cube
+               tg->SetSource(cs->GetOutput());         
        }
 
 
@@ -149,10 +146,9 @@ printf("EED vtkTensorsVisu::Process Start\n");
 //EED  _pdm->Update(); 
 
 
-
-                       tg->Print( std::cout );
-               printf("EED vtkTensorsVisu::Process  ------------------------------------------\n");
-                       pd->Print( std::cout );
+//EED1                 tg->Print( std::cout );
+//EED1         printf("EED vtkTensorsVisu::Process  ------------------------------------------\n");
+//EED1                 pd->Print( std::cout );
 
 
        tg->Update();
@@ -160,8 +156,8 @@ printf("EED vtkTensorsVisu::Process Start\n");
                        vtkPointData    *pointdata      = pd->GetPointData();
 
 
-               printf("EED vtkTensorsVisu::Process  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx\n");
-                       pointdata->Print( std::cout );
+//EED1         printf("EED vtkTensorsVisu::Process  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx\n");
+//EED1                 pointdata->Print( std::cout );
                        
 
                        int aa = pd->GetNumberOfPieces ();