]> Creatis software - creaVtk.git/blobdiff - lib/creaVtk/vtkVectorsTensorsVisuBase.cpp
#3110 creaVtk Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaVtk.git] / lib / creaVtk / vtkVectorsTensorsVisuBase.cpp
index 4c2872458255da38e8d196e569e65d89774f4ebb..094eebc40db7d2390744ac416cef2de54b65458e 100644 (file)
 */
 
 #include "vtkVectorsTensorsVisuBase.h"
-
-
 #include "vtkObjectFactory.h"
 
-
-
-
 vtkStandardNewMacro(vtkLookupTableDirectionVector);
 
 // Construct with range=(0,1); and hsv ranges set up for rainbow color table 
@@ -48,14 +43,11 @@ vtkLookupTableDirectionVector::~vtkLookupTableDirectionVector()
 {
 }
 
-
-
 unsigned char *vtkLookupTableDirectionVector::MapValue(double v)
 {
        
        //int idx = this->GetIndex(v);
-       //return (this->Table->GetPointer(0) + 4*idx);
-       
+       //return (this->Table->GetPointer(0) + 4*idx);  
        return 0;
 }
 
@@ -129,10 +121,10 @@ inIncr=3;
                sum     = 0;
                for (j = 0; j < inIncr; ++j)
                {
-                       if (j==0) dirx= static_cast<double>(*input);  
-                       if (j==1) diry= static_cast<double>(*input);  
-                       if (j==2) dirz= static_cast<double>(*input);  
-                       tmp = static_cast<double>(*input);  
+                       if (j==0) dirx= static_cast<T>(*input);  
+                       if (j==1) diry= static_cast<T>(*input);  
+                       if (j==2) dirz= static_cast<T>(*input);  
+                       tmp = static_cast<T>(*input);  
                        sum += (tmp * tmp);
                        ++input;
                }
@@ -151,7 +143,6 @@ inIncr=3;
 }
 
 
-
 //----------------------------------------------------------------------------
 void vtkLookupTableDirectionVector::MapScalarsThroughTable2(void *input, 
                                              unsigned char *output,
@@ -196,13 +187,13 @@ void vtkLookupTableDirectionVector::PrintSelf(ostream& os, vtkIndent indent)
 
 vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
 {
-      _firsttime       = true;
-       _active         = false;
-       _scalefactor= 1;
+     _firsttime                = true;
+       _active                 = false;
+       _scalefactor    = 1;
        _opacity                = 1;
-       _dataobject     = NULL;
-       _renderer       = NULL;
-               _typeForm       = 0;
+       _dataobject             = NULL;
+       _renderer               = NULL;
+       _typeForm               = 0;
 
        _LutEED         = vtkLookupTableDirectionVector::New();
 //     _LutEED->SetVectorMode(0);
@@ -210,9 +201,9 @@ vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
 //_LutEED->SetVectorModeToComponent();
 _LutEED->SetVectorModeToRGBColors();
 
-       _pdm            = vtkPolyDataMapper::New();
-       _actor          = vtkActor::New();
-       _actorAdded     = false;
+       _pdm                    = vtkPolyDataMapper::New();
+       _actor                  = vtkActor::New();
+       _actorAdded             = false;
 }
 
 vtkVectorsTensorsVisuBase::~vtkVectorsTensorsVisuBase()
@@ -305,8 +296,6 @@ void vtkVectorsTensorsVisuBase::Process()    // virtual
 {
 }
 
-
-
 //------------------------------------------------------------------------------
 void vtkVectorsTensorsVisuBase::VisibilityActor()
 {
@@ -328,7 +317,6 @@ void vtkVectorsTensorsVisuBase::VisibilityActor()
        } // if _active==false  
 }
 
-
 //------------------------------------------------------------------------------
 void vtkVectorsTensorsVisuBase::SetColorLaw(int colorlaw)
 {