]> Creatis software - creaVtk.git/commitdiff
#3223 creaVtk Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 15:21:24 +0000 (17:21 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 15:21:24 +0000 (17:21 +0200)
1  2 
bbtk_creaVtk_PKG/bbs/appli/exampleVectorsTensorsVisu.bbs
bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg
bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx
lib/creaVtk/vtkVectorsTensorsVisuBase.cpp
lib/creaVtk/vtkVectorsVisu.cpp
lib/creaVtk/vtkVectorsVisu.h

index 7cf6bd9b1c292fc030e44473e0c49f5568917b0a,37abe999e69f05b257de14d02bc5fc822bae5cf6..461c370cddb56b09c8a1024b23fb21abf529404d
@@@ -63,11 -63,11 +63,19 @@@ new vtk:StructuredPointsReader Box3
  new vtk:ProbeFilter Box32
    set Box32.BoxProcessMode "Reactive"
  
++<<<<<<< HEAD
 +new creaVtk:TensorsVisu_Widget Box33
 +
 +new wx:LayoutTab Box36
 +
 +new creaVtk:TensorsVisu_Widget Box37
++=======
+ new creaVtk:TensorsVisu_Wideget Box33
+ new wx:LayoutTab Box36
+ new creaVtk:TensorsVisu_Wideget Box37
++>>>>>>> master
  
  new vtk:MaskPoint Box38
  
index 6fd4c3ba49b8acd963f01157912a1931eb52fd1c,54ec6c85a1cd3df6a34552b5ac03942ad8f4aaa5..782c5da71647cc3cfde42e613e5636d3958e26f3
@@@ -1,6 -1,6 +1,10 @@@
  # ----------------------------------
  # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
++<<<<<<< HEAD
 +# - /tmpEED/creaTools2/ci/bin/../share/bbtk/bbs/creaVtk/appli/exampleVectorsVisu.bbg
++=======
+ # - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg
++>>>>>>> master
  # ----------------------------------
  
  APP_START
@@@ -16,7 -16,7 +20,7 @@@ ISEXEC:FALS
  -87.126923:-1.070619:-900.000000
  -50.976923:-11.070619:-900.000000
  PORT
 -Ratio:"1"
 +Ratio:"30"
  FIN_BOX
  BOX
  creaVtk:VectorsVisu:Box02
@@@ -48,15 -48,15 +52,24 @@@ BO
  wx:LayoutSplit:Box05
  ISEXEC:TRUE
  20.586047:-67.968368:-900.000000
++<<<<<<< HEAD
 +57.261047:-77.968368:-900.000000
++=======
+ 59.666047:-77.968368:-900.000000
++>>>>>>> master
  PORT
  Proportion:"10"
  FIN_BOX
  BOX
  wx:FileSelector:Box06
  ISEXEC:FALSE
++<<<<<<< HEAD
 +-79.676950:57.942181:-900.000000
 +-42.301950:47.942181:-900.000000
++=======
+ -82.100831:48.785297:-900.000000
+ -44.725831:38.785297:-900.000000
++>>>>>>> master
  FIN_BOX
  BOX
  vtk:LoadHola:Box07
@@@ -67,24 -67,24 +80,44 @@@ FIN_BO
  BOX
  vtk:StructuredPointsReader:Box08
  ISEXEC:FALSE
++<<<<<<< HEAD
 +-65.776361:20.644357:-900.000000
 +-17.076361:10.644357:-900.000000
++=======
+ -77.679349:22.958827:-900.000000
+ -28.979349:12.958827:-900.000000
++>>>>>>> master
  PORT
  In:"/home/davila/Creatis/creaVtk/data/Vectors.vtk"
  FIN_BOX
  BOX
++<<<<<<< HEAD
 +std:ConcatStrings:Box09
 +ISEXEC:FALSE
 +-9.468286:43.584173:-900.000000
 +30.256714:33.584173:-900.000000
 +PORT
 +In2:"/creaVtk/Vectors.vtk"
 +FIN_BOX
 +BOX
 +std:Configuration:Box10
 +ISEXEC:FALSE
 +8.566544:63.723067:-900.000000
 +47.991544:53.723067:-900.000000
++=======
+ std:Configuration:Box09
+ ISEXEC:FALSE
+ -32.049096:69.753914:-900.000000
+ 7.375904:59.753914:-900.000000
+ FIN_BOX
+ BOX
+ std:ConcatStrings:Box10
+ ISEXEC:FALSE
+ -37.166178:46.323063:-900.000000
+ 2.558822:36.323063:-900.000000
+ PORT
+ In2:"/creaVtk/Vectors.vtk"
++>>>>>>> master
  FIN_BOX
  CONNECTIONS:9
  CONNECTION
@@@ -109,9 -109,9 +142,16 @@@ CONNECTIO
  Box08:Out:Box01:In
  NumberOfControlPoints:0
  CONNECTION
++<<<<<<< HEAD
 +Box10:DataPath:Box09:In1
 +NumberOfControlPoints:0
 +CONNECTION
 +Box09:Out:Box08:In
++=======
+ Box09:DataPath:Box10:In1
+ NumberOfControlPoints:0
+ CONNECTION
+ Box10:Out:Box08:In
++>>>>>>> master
  NumberOfControlPoints:0
  APP_END
index c9a9ad2e0484716121f498403acb7f0e2441cc32,03a4658a0bc7b291a052017b0728dc0ab122d1e3..5998d4858ac81ac32b758e922ff9aee49d3a42b5
@@@ -1,6 -1,6 +1,10 @@@
  # ----------------------------------
  # - BBTKGEditor v 1.4 BBS BlackBox Script
++<<<<<<< HEAD
 +# - /tmpEED/creaTools2/ci/bin/../share/bbtk/bbs/creaVtk/appli/exampleVectorsVisu.bbs
++=======
+ # - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs
++>>>>>>> master
  # ----------------------------------
  
  # BBTK GEditor Script
@@@ -19,7 -19,7 +23,11 @@@ description "Description ??
  category "<VOID>"
  
  new vtk:MaskPoint Box01
++<<<<<<< HEAD
 +  set Box01.Ratio "30"
++=======
+   set Box01.Ratio "1"
++>>>>>>> master
  
  new creaVtk:VectorsVisu Box02
    set Box02.Active "true"
@@@ -41,10 -41,10 +49,17 @@@ new vtk:LoadHola Box0
  new vtk:StructuredPointsReader Box08
    set Box08.In "/home/davila/Creatis/creaVtk/data/Vectors.vtk"
  
++<<<<<<< HEAD
 +new std:ConcatStrings Box09
 +  set Box09.In2 "/creaVtk/Vectors.vtk"
 +
 +new std:Configuration Box10
++=======
+ new std:Configuration Box09
+ new std:ConcatStrings Box10
+   set Box10.In2 "/creaVtk/Vectors.vtk"
++>>>>>>> master
  
  
  connect Box01.Out Box02.In
@@@ -61,9 -61,9 +76,15 @@@ connect Box07.Out Box03.I
  
  connect Box08.Out Box01.In
  
++<<<<<<< HEAD
 +connect Box10.DataPath Box09.In1
 +
 +connect Box09.Out Box08.In
++=======
+ connect Box09.DataPath Box10.In1
+ connect Box10.Out Box08.In
++>>>>>>> master
  
  
  
index 8ee23088f956e7e7bd2525facbfb506209a23267,30c568c7a3450c128444ec2095bc7571d30edd0c..74b8602e57fc3eba79f7761af0341bef12e12c7d
@@@ -1,6 -1,6 +1,10 @@@
  # ----------------------------------
  # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
++<<<<<<< HEAD
 +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
++=======
+ # - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg
++>>>>>>> master
  # ----------------------------------
  
  APP_START
@@@ -19,7 -19,7 +23,7 @@@ COMPLEX_POR
  boxchange
  -75.932205:-101.708611:-900.000000
  FIN_COMPLEX_PORT
- COMPLEXINPUTS:2
+ COMPLEXINPUTS:3
  COMPLEX_PORT
  vtkImageData
  38.028121:89.676762:-900.000000
@@@ -28,42 -28,46 +32,55 @@@ COMPLEX_POR
  renderer
  -52.117833:88.203991:-900.000000
  FIN_COMPLEX_PORT
++<<<<<<< HEAD
 +BOXES:8
 +BOX
 +creaVtk:VectorsVisu:Box00
 +ISEXEC:FALSE
 +-2.817636:-56.941435:-900.000000
 +34.807364:-66.941435:-900.000000
++=======
+ COMPLEX_PORT
+ boxexecute
+ -104.232070:88.823851:-900.000000
+ FIN_COMPLEX_PORT
+ BOXES:9
+ BOX
+ creaVtk:VectorsVisu:Box00
+ ISEXEC:FALSE
+ -4.465574:-69.418679:-900.000000
+ 41.109426:-79.418679:-900.000000
++>>>>>>> master
  FIN_BOX
  BOX
  creaVtk:PlaneWidget:Box01
  ISEXEC:FALSE
  -66.409855:2.022991:-900.000000
 --20.834855:-7.977009:-900.000000
 +-27.884855:-7.977009:-900.000000
  FIN_BOX
  BOX
  vtk:ProbeFilter:Box03
  ISEXEC:FALSE
  -29.657798:-23.712064:-900.000000
 -15.917202:-33.712064:-900.000000
 +6.742202:-33.712064:-900.000000
  FIN_BOX
  BOX
  vtk:vtkImageDataPointerRelay:Box04
  ISEXEC:FALSE
  31.994878:59.395975:-900.000000
 -103.169878:49.395975:-900.000000
 +84.169878:49.395975:-900.000000
  FIN_BOX
  BOX
  std:MagicBox:Box05
  ISEXEC:FALSE
  -63.018802:49.434694:-900.000000
 --17.443802:39.434694:-900.000000
 +-26.943802:39.434694:-900.000000
  FIN_BOX
  BOX
  creaVtk:PlaneVectorViso_Interface:Box06
  ISEXEC:FALSE
  53.843860:42.438188:-900.000000
 -125.018860:32.438188:-900.000000
 +105.768860:32.438188:-900.000000
  PORT
  typeFormsStr:"Line Arrow"
  FIN_BOX
@@@ -71,7 -75,7 +88,7 @@@ BO
  vtk:UpdateRender:Box13
  ISEXEC:FALSE
  -129.325679:-71.617843:-900.000000
 --83.750679:-81.617843:-900.000000
 +-89.000679:-81.617843:-900.000000
  PORT
  Active:"true"
  PORT
@@@ -81,9 -85,15 +98,19 @@@ BO
  std:SharedMemory:Box15
  ISEXEC:FALSE
  -79.072661:-36.761184:-900.000000
 --33.497661:-46.761184:-900.000000
 +-37.897661:-46.761184:-900.000000
  FIN_BOX
++<<<<<<< HEAD
 +CONNECTIONS:21
++=======
+ BOX
+ std:MagicBox:Box11
+ ISEXEC:FALSE
+ -116.304953:49.494646:-900.000000
+ -70.729953:39.494646:-900.000000
+ FIN_BOX
+ CONNECTIONS:22
++>>>>>>> master
  CONNECTION
  Box03:Out:Box00:In
  NumberOfControlPoints:0
@@@ -145,6 -155,9 +172,13 @@@ CONNECTIO
  Box15:Out:Box13:BoxExecute
  NumberOfControlPoints:0
  CONNECTION
++<<<<<<< HEAD
 +Box01:BoxChange:Box15:In2
++=======
+ boxexecute:boxexecute:Box11:BoxExecute
+ NumberOfControlPoints:0
+ CONNECTION
+ Box11:Out:Box15:In2
++>>>>>>> master
  NumberOfControlPoints:0
  APP_END
index b22e2a958ac27e0ef9b8fc4fc0e1bc44d7be1dcc,05e401e1d780f26050a0340e422be023e4846a0f..d9f33658a75d0f7721d1327094d804884d3edbc2
@@@ -1,6 -1,6 +1,10 @@@
  # ----------------------------------
  # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
++<<<<<<< HEAD
 +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
++=======
+ # - /tmpEED/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs
++>>>>>>> master
  # ----------------------------------
  
  include std
@@@ -34,6 -34,8 +38,11 @@@ new vtk:UpdateRender Box1
    set Box13.BoxProcessMode "Reactive"
  
  new std:SharedMemory Box15
++<<<<<<< HEAD
++=======
+ new std:MagicBox Box11
++>>>>>>> master
  
  
  connect Box03.Out Box00.In
@@@ -52,11 -54,12 +61,16 @@@ connect Box05.Out Box13.Rendere
  connect Box15.Out Box00.BoxExecute
  connect Box06.boxChange Box15.In1
  connect Box15.Out Box13.BoxExecute
++<<<<<<< HEAD
 +connect Box01.BoxChange Box15.In2
++=======
+ connect Box11.Out Box15.In2
++>>>>>>> master
  
  # Complex input ports
  input vtkImageData Box04.In " "
  input renderer Box05.In " "
+ input boxexecute Box11.BoxExecute " "
  
  # Complex output ports
  output Widget Box06.widget " "
index 918d216770be079fc41c36d47621c96c59e8e5f6,1662b1a7f1d4af0cce800c798a60ca392c59a7fc..02ae564046763bcacde94b725ca679d459af1fdf
@@@ -13,9 -13,8 +13,9 @@@
  #include <sys/types.h>
  
  #if defined(_WIN32)
 +      #include <share.h> 
  #else
 -#include <unistd.h>
 +      #include <unistd.h>
  #endif // defined(_WIN32)
  
  #include <stdlib.h>
@@@ -43,21 -42,14 +43,21 @@@ vtkImageData* ReadMHDPlane::CreateDefau
        sizeZ = 1;
        vtkImageData *newImage = vtkImageData::New();
        newImage->Initialize();
 -      newImage->SetScalarTypeToUnsignedChar();
        newImage->SetSpacing( 1,1,1 );
        newImage->SetDimensions(  sizeX,sizeY,sizeZ );
 -      newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
        newImage->SetExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
 +      newImage->SetScalarTypeToUnsignedChar();
        newImage->SetNumberOfScalarComponents(1);
        newImage->AllocateScalars();
        newImage->Update();
 +#else
 +      newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
 +#endif
 +
        memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
        for (i=0; i<sizeX; i++)
        {
        return newImage;
  } 
  
- void ReadMHDPlane::ReadNormalMHD()
+ vtkImageData* ReadMHDPlane::ChangeOrientation(vtkImageData* imgOrg)
  {
- // THE MAIN PROCESSING METHOD BODY
- //   Here we simply set the input 'In' value to the output 'Out'
- //   And print out the output value
- // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
- //    void bbSet{Input|Output}NAME(const TYPE&)
- //    const TYPE& bbGet{Input|Output}NAME() const 
- //    Where :
- //    * NAME is the name of the input/output
- //      (the one provided in the attribute 'name' of the tag 'input')
- //    * TYPE is the C++ type of the input/output
- //      (the one provided in the attribute 'type' of the tag 'input')
- //    bbSetOutputOut( bbGetInputIn() );
- //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-       std::string inputfilename;
-       int slice;
-       int width;
-       long long dataSize;
+       int     width = bbGetInputWidth();
+       int     ext[6];
+       int     sizeXOrg, sizeYOrg,sizeZOrg;
+       int     sizeXDst, sizeYDst,sizeZDst;
+       imgOrg->GetWholeExtent(ext);
+       int     sizeLine;
+       
+       sizeXOrg        = ext[1]-ext[0]+1;
+       sizeYOrg        = ext[3]-ext[2]+1;
+       sizeZOrg        = ext[5]-ext[4]+1;
  
+       if (bbGetInputDirectionPlane()=="XY")
+       {
+               sizeXDst        = ext[1]-ext[0]+1;
+               sizeYDst        = ext[3]-ext[2]+1;
+               sizeZDst        = width;
+       } // XY 
+       if (bbGetInputDirectionPlane()=="YZ") 
+       {
+               sizeXDst        = width;
+               sizeYDst        = ext[1]-ext[0]+1;
+               sizeZDst        = ext[3]-ext[2]+1;
+               sizeLine        = sizeYDst;
+       } // YZ
+       if (bbGetInputDirectionPlane()=="ZX")
+       {
+               sizeXDst        = ext[1]-ext[0]+1;
+               sizeYDst        = width;
+               sizeZDst        = ext[3]-ext[2]+1;
+               sizeLine        = sizeXDst;
+       } // ZX
+       vtkImageData *imgDst  = vtkImageData::New();
+       imgDst->Initialize();
+       imgDst->SetScalarType( imgOrg->GetScalarType() );
+       imgDst->SetSpacing( imgOrg->GetSpacing() );
+       imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst );
+       imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
+       imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
+       imgDst->SetNumberOfScalarComponents(1);
+       imgDst->AllocateScalars();
+       imgDst->Update();
+       char *ptrDst,*ptrOrg;
+       int sizeBytes = imgOrg->GetScalarSize();                
+       int sizeLineBytes = sizeLine*imgOrg->GetScalarSize();           
+       int xx,yy,zz;
+       long int sizeXDstBytes          = sizeXDst*sizeBytes;
+       long int sizeXYDstBytes         = sizeXDst*sizeYDst*sizeBytes;
+       long int sizeXYDstBytes2        = sizeXDst*sizeYDst*sizeBytes*2;
+       long int sizeXYZDstBytes        = sizeXDst*sizeYDst*sizeZDst*sizeBytes;
+       long int sizeXYZDstBytes1       = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes;
+       ptrOrg = (char*)( imgOrg->GetScalarPointer() );
  
        if (bbGetInputDirectionPlane()=="XY")
        {
-               inputfilename=bbGetInputFileName();
+               memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) );
        } // if XY
  
-       if ((bbGetInputDirectionPlane()=="YZ") || (bbGetInputDirectionPlane()=="ZX"))
+       if (bbGetInputDirectionPlane()=="ZX")
        {
-               //-- Split FileName
-               std::size_t found               =       bbGetInputFileName().find_last_of("/\\");
-               std::string path                =       bbGetInputFileName().substr(0,found+1);
-               std::string filename    =       bbGetInputFileName().substr(found+1);
- #ifdef _WIN32
-               path=path+"YZ_ZX\\";
- #else
-               path=path+"YZ_ZX/";
- #endif
-               if (bbGetInputDirectionPlane()=="YZ") 
-               { 
-                       inputfilename = path+filename+"_YZ.mhd";  
-               } // if YZ
-               if (bbGetInputDirectionPlane()=="ZX")
+               ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-00-1) );
+               for( zz=0 ; zz<sizeZOrg ; zz++)
                {
-                       inputfilename = path+filename+"_ZX.mhd";
-               } // XZ
-       } // if YZ || XZ
-       width = bbGetInputWidth();
-       if (width<=0 ) { width=1; }
-       slice = bbGetInputSlice();
-       if (slice<0 ) { slice=0; }
-       vtkImageData *newImage;
-       long long newHeaderSize;
-     std::string newFileName=inputfilename+"-OneSlice";
-     int sx,sy,sz;
-     char mystring[250];
-     char strTmp[20];
-       bool ok=true;
-     FILE *ffIn        = fopen(inputfilename.c_str(),"r");
-       if (ffIn!=NULL)
-       {
-           FILE *ffOut = fopen(newFileName.c_str(),"w");
-       while(!feof(ffIn))
-       {
-           strcpy(mystring,"\n");
-                       fgets(mystring,250,ffIn);
-               if (strncmp("NDims",mystring,5)==0) 
-                       {
-                               if (width==1) 
-                               { 
-                                       strcpy(mystring,"NDims = 2\n"); 
-                               } else {
-                                       strcpy(mystring,"NDims = 3\n"); 
-                               }
-                       }
-               if (strncmp("DimSize",mystring,6)==0) 
+ //                    ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-00-1) );
+                       for( yy=0 ; yy<sizeYOrg ; yy++)
                        {
-                               sscanf(mystring,"%s %s %d %d %d",strTmp, strTmp, &sx, &sy,&sz);
-                               if (width==1) 
-                               { 
-                                       sprintf(mystring,"DimSize = %d %d\n",sx,sy);
-                               } else {
-                                       sprintf(mystring,"DimSize = %d %d %d\n",sx,sy,width);
-                               }
-                       newHeaderSize = (long long int)sx*(long long int)sy*(long long int)slice;
-                               if (bbGetInputSlice()>=sz) {ok=false;}
-                       } // if
-               if (strncmp("ElementType = MET_CHAR",mystring,22)==0)                   { dataSize=sizeof(char);                        }
-               if (strncmp("ElementType = VTK_CHAR",mystring,22)==0)                   { dataSize=sizeof(char);                        }
-               if (strncmp("ElementType = MET_UCHAR",mystring,23)==0)                  { dataSize=sizeof(unsigned char);       }
-               if (strncmp("ElementType = VTK_UNSIGNED_CHAR",mystring,31)==0)  { dataSize=sizeof(unsigned char);       }
-               if (strncmp("ElementType = MET_USHORT",mystring,24)==0)                 { dataSize=sizeof(unsigned short);      }
-               if (strncmp("ElementType = VTK_UNSIGNED_SHORT",mystring,32)==0) { dataSize=sizeof(unsigned short);      }
-               if (strncmp("ElementType = MET_SHORT",mystring,23)==0)                  { dataSize=sizeof(short);                       }
-               if (strncmp("ElementType = VTK_SHORT",mystring,23)==0)                  { dataSize=sizeof(short);                       }
-               if (strncmp("ElementType = MET_UINT",mystring,22)==0)                   { dataSize=sizeof(unsigned int);        }
-               if (strncmp("ElementType = VTK_UNSIGNED_INT",mystring,30)==0)   { dataSize=sizeof(unsigned int);        }
-               if (strncmp("ElementType = MET_INT",mystring,21)==0)                    { dataSize=sizeof(int);                         }
-               if (strncmp("ElementType = VTK_INT",mystring,21)==0)                    { dataSize=sizeof(int);                         }
-               if (strncmp("ElementType = MET_FLOAT",mystring,23)==0)                  { dataSize=sizeof(float);                       }
-               if (strncmp("ElementType = VTK_FLOAT",mystring,23)==0)                  { dataSize=sizeof(float);                       }
-               if (strncmp("ElementType = MET_LONG",mystring,22)==0)                   { dataSize=sizeof(long);                        }
-               if (strncmp("ElementType = VTK_LONG",mystring,22)==0)                   { dataSize=sizeof(long);                        }
-               if (strncmp("ElementType = MET_DOUBLE",mystring,24)==0)                 { dataSize=sizeof(double);                      }
-               if (strncmp("ElementType = VTK_DOUBLE",mystring,24)==0)                 { dataSize=sizeof(double);                      }
-                       newHeaderSize=newHeaderSize*dataSize;
-               if (strncmp("Offset",mystring,6)==0) {strcpy(mystring,"Offset = 0 0 0\n");}
-               if (strncmp("HeaderSize",mystring,10)==0) {strcpy(mystring,"");}
-               if (strncmp("ElementDataFile",mystring,15)==0) 
-                       {
-                               fprintf(ffOut,"HeaderSize = %lld\n\n", newHeaderSize );
-                       } // if
-               fprintf(ffOut,mystring); 
-       } // while
-               fclose(ffIn);
-               fclose(ffOut);
-               if (ok==true)
-               {
-                       vtkMetaImageReader * reader = vtkMetaImageReader::New();
-                       reader->SetFileName( newFileName.c_str() );
-                       reader->Update();
-                       newImage = reader->GetOutput();
-               } // if ok
-       } else {
-               ok=false;
-               printf("EED ERROR: Problem openin:%s\n", inputfilename.c_str() );
-       }
-       if (ok==false)
+ //                            ptrOrg=(char*)( imgOrg->GetScalarPointer(0,yy,zz) );
+ //                            ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) );
+                               memcpy ( ptrDst, ptrOrg , sizeLineBytes );
+                               ptrOrg = ptrOrg + sizeLineBytes;
+                               ptrDst = ptrDst - sizeXYDstBytes;
+                       } // for yy 
+                       ptrDst = ptrDst + sizeXDstBytes;
+                       ptrDst = ptrDst + sizeXYZDstBytes;
+               } // for zz 
+       } // ZX
+       if (bbGetInputDirectionPlane()=="YZ")
        {
-               newImage=CreateDefaultImage();
-       } // if ok
-       bbSetOutputOut( newImage );
+               ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-0-1) );
+               for( zz=0 ; zz<sizeZOrg ; zz++)
+               {
+                       ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-0-1) );
+                       for( yy=0 ; yy<sizeYOrg ; yy++)
+                       {
+ //                            ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-yy-1) );
+                               for( xx=0 ; xx<sizeXOrg ; xx++)
+                               {
+ //                                    ptrOrg=(char*)( imgOrg->GetScalarPointer(xx,yy,zz) );
+ //                                    ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) );
+                                       memcpy ( ptrDst, ptrOrg , sizeBytes );
+                                       ptrOrg+= sizeBytes;
+                                       ptrDst+= sizeXDstBytes;
+                               } /// for xx
+                               ptrDst = ptrDst - sizeXYDstBytes2;
+                       } // for yy 
+                       ptrDst = ptrDst + sizeXYZDstBytes;
+ //                    ptrDst++;
+               } // for zz 
+       } // ZX
+       return imgDst;
  }
  
- void ReadMHDPlane::Read64lseek()
+ void ReadMHDPlane::Read64lseek(std::string fileNameIn, std::string plane)
  {
        int             slice;
        int             width;
        width = bbGetInputWidth();
        if (width<=0 ) { width=1; }
        slice = bbGetInputSlice();
        if (slice<0 ) { slice=0; }
        int             dimX=-1,dimY=-1,dimZ=-1;
        int             dim=-1;
        std::string formattype("VOID");
        float           spcX=-1,spcY=-1,spcZ=-1;
        float           ox=-1,oy=-1,oz=-1;
        long int        headersize=0;
        vtkImageData *newImage=NULL;
++
 +      int imageType;
 +
        char mystring[250];
        char strTmp[30];
        char strTmp2[30];
-       FILE *ffIn      = fopen(bbGetInputFileName().c_str(),"r");
+       FILE *ffIn      = fopen( fileNameIn.c_str() , "r");
        long long dataSize;
        if (ffIn!=NULL)
        {
                newImage = vtkImageData::New();
                while(!feof(ffIn))
                {
            strcpy(mystring,"\n");
                        fgets(mystring,250,ffIn);
-               if (strncmp("NDims",mystring,5)==0)                     { sscanf(mystring,"%s %s %d"            ,strTmp, strTmp, &dim);                                 }
-               if (strncmp("DimSize",mystring,6)==0)                   { sscanf(mystring,"%s %s %d %d %d"      ,strTmp, strTmp, &dimX, &dimY,&dimZ);   } 
+               if (strncmp("NDims",mystring,5)==0)                     { sscanf(mystring,"%s %s %d"            ,strTmp, strTmp, &dim);                                                                 }
+               if (strncmp("DimSize",mystring,6)==0)                   { sscanf(mystring,"%s %s %d %d %d"      ,strTmp, strTmp, &dimX, &dimY,&dimZ);                                   
                        if (strncmp("ElementType",mystring,11)==0)              { sscanf(mystring,"%s %s %s"            ,strTmp, strTmp, strTmp2); formattype=strTmp2;                  }
-                       if (strncmp("ElementSpacing",mystring,14)==0)   { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);    }
-                       if (strncmp("ElementSize",mystring,11)==0)              { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);    }
-               if (strncmp("Offset",mystring,6)==0)                    { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &ox, &oy, &oz);                }
-               if (strncmp("HeaderSize",mystring,10)==0)               { sscanf(mystring,"%s %s %ld"           ,strTmp, strTmp, &headersize);                  }
+                       if (strncmp("ElementSpacing",mystring,14)==0)   { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);                                    }
+                       if (strncmp("ElementSize",mystring,11)==0)              { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);                                    }
+               if (strncmp("Offset",mystring,6)==0)                    { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &ox, &oy, &oz);                                                }
+               if (strncmp("HeaderSize",mystring,10)==0)               { sscanf(mystring,"%s %s %ld"           ,strTmp, strTmp, &headersize);                                                  }
                        if (strncmp("ElementDataFile",mystring,15)==0)  { sscanf(mystring,"%s %s %s"            ,strTmp, strTmp, strTmp2); elementdatafile=strTmp2;             }
 -              if (strncmp("ElementType = MET_CHAR",mystring,22)==0)                   { newImage->SetScalarTypeToChar();                      dataSize=sizeof(char);                  }
 -              if (strncmp("ElementType = VTK_CHAR",mystring,22)==0)                   { newImage->SetScalarTypeToChar();                      dataSize=sizeof(char);                  }
 -              if (strncmp("ElementType = MET_UCHAR",mystring,23)==0)                  { newImage->SetScalarTypeToUnsignedChar();      dataSize=sizeof(unsigned char); }
 -              if (strncmp("ElementType = VTK_UNSIGNED_CHAR",mystring,31)==0)  { newImage->SetScalarTypeToUnsignedChar();      dataSize=sizeof(unsigned char); }
 -              if (strncmp("ElementType = MET_USHORT",mystring,24)==0)                 { newImage->SetScalarTypeToUnsignedShort();     dataSize=sizeof(unsigned short);}
 -              if (strncmp("ElementType = VTK_UNSIGNED_SHORT",mystring,32)==0) { newImage->SetScalarTypeToUnsignedShort();     dataSize=sizeof(unsigned short);}
 -              if (strncmp("ElementType = MET_SHORT",mystring,23)==0)                  { newImage->SetScalarTypeToShort();                     dataSize=sizeof(short);                 }
 -              if (strncmp("ElementType = VTK_SHORT",mystring,23)==0)                  { newImage->SetScalarTypeToShort();                     dataSize=sizeof(short);                 }
 -              if (strncmp("ElementType = MET_UINT",mystring,22)==0)                   { newImage->SetScalarTypeToUnsignedInt();       dataSize=sizeof(unsigned int);  }
 -              if (strncmp("ElementType = VTK_UNSIGNED_INT",mystring,30)==0)   { newImage->SetScalarTypeToUnsignedInt();       dataSize=sizeof(unsigned int);  }
 -              if (strncmp("ElementType = MET_INT",mystring,21)==0)                    { newImage->SetScalarTypeToInt();                       dataSize=sizeof(int);                   }
 -              if (strncmp("ElementType = VTK_INT",mystring,21)==0)                    { newImage->SetScalarTypeToInt();                       dataSize=sizeof(int);                   }
 -              if (strncmp("ElementType = MET_FLOAT",mystring,23)==0)                  { newImage->SetScalarTypeToFloat();                     dataSize=sizeof(float);                 }
 -              if (strncmp("ElementType = VTK_FLOAT",mystring,23)==0)                  { newImage->SetScalarTypeToFloat();                     dataSize=sizeof(float);                 }
 -              if (strncmp("ElementType = MET_LONG",mystring,22)==0)                   { newImage->SetScalarTypeToLong();                      dataSize=sizeof(long);                  }
 -              if (strncmp("ElementType = VTK_LONG",mystring,22)==0)                   { newImage->SetScalarTypeToLong();                      dataSize=sizeof(long);                  }
 -              if (strncmp("ElementType = MET_DOUBLE",mystring,24)==0)                 { newImage->SetScalarTypeToDouble();            dataSize=sizeof(double);                }
 -              if (strncmp("ElementType = VTK_DOUBLE",mystring,24)==0)                 { newImage->SetScalarTypeToDouble();            dataSize=sizeof(double);                }
 +
++                      
 +
 +                      if (strncmp("ElementType = MET_CHAR",mystring,22)==0)                   { imageType =VTK_CHAR;                   dataSize=sizeof(char);                  }
 +                      if (strncmp("ElementType = VTK_CHAR",mystring,22)==0)                   { imageType =VTK_CHAR;                   dataSize=sizeof(char);                  }
 +                      if (strncmp("ElementType = MET_UCHAR",mystring,23)==0)                  { imageType =VTK_UNSIGNED_CHAR;  dataSize=sizeof(unsigned char); }
 +                      if (strncmp("ElementType = VTK_UNSIGNED_CHAR",mystring,31)==0)  { imageType =VTK_UNSIGNED_CHAR;  dataSize=sizeof(unsigned char); }
 +                      if (strncmp("ElementType = MET_USHORT",mystring,24)==0)                 { imageType =VTK_UNSIGNED_SHORT; dataSize=sizeof(unsigned short);}
 +                      if (strncmp("ElementType = VTK_UNSIGNED_SHORT",mystring,32)==0) { imageType =VTK_UNSIGNED_SHORT; dataSize=sizeof(unsigned short);}
 +                      if (strncmp("ElementType = MET_SHORT",mystring,23)==0)                  { imageType =VTK_SHORT;                  dataSize=sizeof(short);                 }
 +                      if (strncmp("ElementType = VTK_SHORT",mystring,23)==0)                  { imageType =VTK_SHORT;                  dataSize=sizeof(short);                 }
 +                      if (strncmp("ElementType = MET_UINT",mystring,22)==0)                   { imageType =VTK_UNSIGNED_INT;   dataSize=sizeof(unsigned int);  }
 +                      if (strncmp("ElementType = VTK_UNSIGNED_INT",mystring,30)==0)   { imageType =VTK_UNSIGNED_INT;   dataSize=sizeof(unsigned int);  }
 +                      if (strncmp("ElementType = MET_INT",mystring,21)==0)                    { imageType =VTK_INT;                    dataSize=sizeof(int);                   }
 +                      if (strncmp("ElementType = VTK_INT",mystring,21)==0)                    { imageType =VTK_INT;                    dataSize=sizeof(int);                   }
 +                      if (strncmp("ElementType = MET_FLOAT",mystring,23)==0)                  { imageType =VTK_FLOAT;                  dataSize=sizeof(float);                 }
 +                      if (strncmp("ElementType = VTK_FLOAT",mystring,23)==0)                  { imageType =VTK_FLOAT;                  dataSize=sizeof(float);                 }
 +                      if (strncmp("ElementType = MET_LONG",mystring,22)==0)                   { imageType =VTK_LONG;                   dataSize=sizeof(long);                  }
 +                      if (strncmp("ElementType = VTK_LONG",mystring,22)==0)                   { imageType =VTK_LONG;                   dataSize=sizeof(long);                  }
 +                      if (strncmp("ElementType = MET_DOUBLE",mystring,24)==0)                 { imageType =VTK_DOUBLE;                 dataSize=sizeof(double);                }
 +                      if (strncmp("ElementType = VTK_DOUBLE",mystring,24)==0)                 { imageType =VTK_DOUBLE;                 dataSize=sizeof(double);                }
 +
        } // while
                fclose(ffIn);
                newImage->Initialize();
                int             fd;
                long long       ret;
                std::size_t found;
                std::string filename;
-               found                                   = bbGetInputFileName().find_last_of("/\\");
-               filename                                = bbGetInputFileName().substr(0,found+1) + elementdatafile ;
+               found                                   = fileNameIn.find_last_of("/\\");
+               filename                                = fileNameIn.substr(0,found+1) + elementdatafile ;
                long long       pos;
                long long lsize                 = dimX*dimY*width *dataSize;
  #if defined(_WIN32)
                   _sopen_s( &fd, filename.c_str(), _O_RDONLY, _SH_DENYNO, 0 );
  #else
                fd = open ( filename.c_str() ,  O_RDONLY|O_LARGEFILE );
  #endif // defined(_WIN32)
                if (fd < 0)
                {
                        printf("EED ReadMHDPlane::Read64lseek   WARNNING! raw file not exist\n");
                        newImage=CreateDefaultImage();
  //                    exit(1);
                }       
-               
-               if ((bbGetInputDirectionPlane()=="XY") && (fd>=0)) 
+               if ((plane=="XY") && (fd>=0)) 
                { 
                        newImage->SetSpacing( spcX,spcY,spcZ );
                        newImage->SetDimensions(  dimX,dimY,width );
 -                      newImage->SetWholeExtent(0,  dimX-1,0,dimY-1,0,width-1 );
                        newImage->SetExtent(0,  dimX-1,0,dimY-1,0,width-1 );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +                      newImage->SetWholeExtent(0,  dimX-1,0,dimY-1,0,width-1 );
                        newImage->SetNumberOfScalarComponents(1);
 +                      newImage->SetScalarType(imageType);
                        newImage->AllocateScalars();
                        newImage->Update();
 +#else
 +                      newImage->AllocateScalars( imageType,1 );
 +#endif
 +
 +
                        pos = dimX*dimY*(long long)slice*dataSize;
  #if defined(_WIN32)
                        if (_lseeki64( fd, pos, SEEK_SET ) < 0)
                                fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
                                exit(1);
                        }
                        if ((ret = read(fd, newImage->GetScalarPointer() , lsize)) < 0) 
                        {
                                fprintf(stderr, "Failed reading: %s\n", strerror(errno));
                                exit(1);
                        }
                }  // if PLANE XY
-               if ((bbGetInputDirectionPlane()=="XZ") && (fd>=0))
+               if ((plane=="ZX") && (fd>=0))
                { 
                        newImage->SetSpacing( spcX,spcZ,spcY );
                        newImage->SetDimensions(  dimX,dimZ,width );
 -                      newImage->SetWholeExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
                        newImage->SetExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +                      newImage->SetWholeExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
                        newImage->SetNumberOfScalarComponents(1);
 +                      newImage->SetScalarType(imageType);
                        newImage->AllocateScalars();
                        newImage->Update();
 +#else
 +                      newImage->AllocateScalars( imageType, 1);
 +#endif
 +
                        int iWidth;
                        for (iWidth=0;iWidth<width;iWidth++)
                        {
-                               copy_XZ_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
+                               copy_ZX_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
                        }
                }  // if PLANE XZ
-               if ((bbGetInputDirectionPlane()=="YZ") && (fd>=0))
+               if ((plane=="YZ") && (fd>=0))
                { 
                        newImage->SetSpacing( spcY,spcZ,spcX );
                        newImage->SetDimensions(  dimY,dimZ,width );
 -                      newImage->SetWholeExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
                        newImage->SetExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +                      newImage->SetWholeExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
                        newImage->SetNumberOfScalarComponents(1);
 +                      newImage->SetScalarType(imageType);
                        newImage->AllocateScalars();
                        newImage->Update();
 +#else
 +                      newImage->AllocateScalars( imageType ,1 );
 +#endif
 +
                        int iWidth;
                        for (iWidth=0;iWidth<width;iWidth++)
                        {
                                copy_YZ_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
                        }
                }  // if PLANE YZ       
  #if defined(_WIN32)
                _close (fd);
        } else {
                newImage=CreateDefaultImage();
        } // if  ffIn
        bbSetOutputOut( newImage );
+       bbSetOutputOut2( ChangeOrientation(newImage) );
  }
  
  
@@@ -450,7 -348,7 +386,7 @@@ void ReadMHDPlane::copy_YZ_plane(int fd
  }
  
  
- void ReadMHDPlane::copy_XZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
+ void ReadMHDPlane::copy_ZX_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
  {
        long long int j;
        long long       ret;
                        fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
                        exit(1);
                }
                if ((ret = read(fd, pImage , dimX*dataSize)) < 0) 
                {
                        fprintf(stderr, "Failed reading: %s\n", strerror(errno));
        } // for j
  }
  
  void ReadMHDPlane::Process()
  {
-       if (bbGetInputType()==0)
+       if (bbGetInputActive()==true)
        {
-               ReadNormalMHD();
-       }       
-       if (bbGetInputType()==1)
-       {
-               Read64lseek();
-       }       
+               if (bbGetInputType()==0)
+               {
+                       //-- Split FileName
+                       std::string inputfilename;
+                       std::size_t found               =       bbGetInputFileName().find_last_of("/\\");
+                       std::string path                =       bbGetInputFileName().substr(0,found+1);
+                       std::string filename    =       bbGetInputFileName().substr(found+1);
+       #ifdef _WIN32
+                       path=path+"YZ_ZX\\";
+       #else
+                       path=path+"YZ_ZX/";
+       #endif
+                       if (bbGetInputDirectionPlane()=="XY") { inputfilename = bbGetInputFileName();           } // if XY
+                       if (bbGetInputDirectionPlane()=="YZ") { inputfilename = path+filename+"_YZ.mhd";        } // if YZ
+                       if (bbGetInputDirectionPlane()=="ZX") { inputfilename = path+filename+"_ZX.mhd";        } // if XZ
+                       Read64lseek( inputfilename ,"XY");
+               }       
+               if (bbGetInputType()==1)
+               {
+                       Read64lseek( bbGetInputFileName(), bbGetInputDirectionPlane() );
+               }       
+       } // if active
  }
  //===== 
  // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
  //===== 
  void ReadMHDPlane::bbUserSetDefaultValues()
  {
  //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
  //    Here we initialize the input 'In' to 0
+    bbSetInputActive(true);
     bbSetInputFileName("");
     bbSetInputSlice(0);
     bbSetInputType(1);
     bbSetInputWidth(1);
     bbSetInputDirectionPlane("XY");
-   
  }
  //===== 
  // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
  //===== 
  void ReadMHDPlane::bbUserInitializeProcessing()
  {
  //  THE INITIALIZATION METHOD BODY :
  //    Here does nothing 
  //    but this is where you should allocate the internal/output pointers 
  //    if any 
-   
  }
  //===== 
  // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
  //===== 
  void ReadMHDPlane::bbUserFinalizeProcessing()
  {
  //  THE FINALIZATION METHOD BODY :
  //    Here does nothing 
  //    but this is where you should desallocate the internal/output pointers 
- //    if any
-   
- }
+ //    if any 
  }
- // EO namespace bbcreaVtk
+ } // EO namespace bbcreaVtk
  
  
index 094eebc40db7d2390744ac416cef2de54b65458e,5f6eeed8da7e91a05495f821d73eea2abd913634..3d7c20bba4595da8466fa35800fc7668c56c2e32
  */
  
  #include "vtkVectorsTensorsVisuBase.h"
 -
 -
  #include "vtkObjectFactory.h"
  
 -
 -
 -
  vtkStandardNewMacro(vtkLookupTableDirectionVector);
  
  // Construct with range=(0,1); and hsv ranges set up for rainbow color table 
@@@ -43,11 -48,14 +43,11 @@@ vtkLookupTableDirectionVector::~vtkLook
  {
  }
  
 -
 -
  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;
  }
  
@@@ -143,6 -151,7 +143,6 @@@ inIncr=3
  }
  
  
 -
  //----------------------------------------------------------------------------
  void vtkLookupTableDirectionVector::MapScalarsThroughTable2(void *input, 
                                               unsigned char *output,
@@@ -187,19 -196,19 +187,19 @@@ void vtkLookupTableDirectionVector::Pri
  
  vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
  {
 -      _firsttime      = true;
 -      _active         = false;
 -      _scalefactor= 1;
 -      _opacity        = 1;
 -      _dataobject     = NULL;
 -      _renderer       = NULL;
 -      _typeForm       = 0;
 +     _firsttime               = true;
 +      _active                 = false;
 +      _scalefactor    = 1;
 +      _opacity                = 1;
 +      _dataobject             = NULL;
 +      _renderer               = NULL;
 +      _typeForm               = 0;
  
        _LutEED         = vtkLookupTableDirectionVector::New();
//    _LutEED->SetVectorMode(0);
- //_LutEED->SetVectorModeToMagnitude();
- //_LutEED->SetVectorModeToComponent();
- _LutEED->SetVectorModeToRGBColors();
      //_LutEED->SetVectorMode(0);
      //_LutEED->SetVectorModeToMagnitude();
      //_LutEED->SetVectorModeToComponent();
      _LutEED->SetVectorModeToRGBColors();
  
        _pdm                    = vtkPolyDataMapper::New();
        _actor                  = vtkActor::New();
@@@ -296,6 -305,8 +296,6 @@@ void vtkVectorsTensorsVisuBase::Process
  {
  }
  
 -
 -
  //------------------------------------------------------------------------------
  void vtkVectorsTensorsVisuBase::VisibilityActor()
  {
        } // if _active==false  
  }
  
 -
  //------------------------------------------------------------------------------
  void vtkVectorsTensorsVisuBase::SetColorLaw(int colorlaw)
  {
index 184bd0f2a0e24dbbba38b29090e5e36d8261a84c,5b50b2ae0395e506e8e40c51243479be963eb3d8..eee31ee946f37e4b0db21185288911eaaf46fc01
@@@ -38,82 -38,55 +38,111 @@@ vtkVectorsVisu::vtkVectorsVisu(
    :vtkVectorsTensorsVisuBase()
  {
        _vtkarrowsource         = vtkArrowSource::New();
++<<<<<<< HEAD
 +      _vtklinesource          = vtkLineSource::New();
++=======
++>>>>>>> master
        _vtkglyph                       = vtkGlyph3D::New();
+       _vtklinesource          = vtkLineSource::New();
+       double point1[3];
+       double point2[3];
+       point1[0]=1;
+       point1[1]=0;
+       point1[2]=0;
+       point2[0]=-1;
+       point2[1]=0;
+       point2[2]=0;
+       _vtklinesource->SetPoint1( point1 );
+       _vtklinesource->SetPoint2( point2 );
  }
  
 -
  //------------------------------------------------------------------------------
  vtkVectorsVisu::~vtkVectorsVisu()
  {
  }
  
 +
  //------------------------------------------------------------------------------
  void vtkVectorsVisu::Process()
  {
++<<<<<<< HEAD
 +
++=======
++>>>>>>> master
       if(_active==true)
       {
 +#if VTK_MAJOR_VERSION <= 5
           _vtkglyph->SetInput( GetDataObject() );  
++<<<<<<< HEAD
 +#else
 +         _vtkglyph->SetInputData( GetDataObject() );  
 +#endif
 +
++=======
++>>>>>>> master
                        if(GetTypeForm()==1)                                                            // source Arrow
                        {
 -               _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
 +#if VTK_MAJOR_VERSION <= 5
 +                      _vtkglyph->SetSource( _vtkarrowsource->GetOutput() );
 +#else
 +                              _vtkarrowsource->Update();
 +                      _vtkglyph->SetSourceData( _vtkarrowsource->GetOutput() );
 +#endif
                        } else {                                                                                                // source Line
 +#if VTK_MAJOR_VERSION <= 5
                                _vtkglyph->SetSource( _vtklinesource->GetOutput() );    
 +#else
 +                              _vtklinesource->Update();
 +                              _vtkglyph->SetSourceData( _vtklinesource->GetOutput() );        
 +#endif
                        }
           _vtkglyph->SetScaleModeToScaleByVector();
           _vtkglyph->SetColorModeToColorByVector();
           _vtkglyph->SetScaleFactor( GetScaleFactor() );
++<<<<<<< HEAD
 +
 +              _vtkglyph->Update();
 +
 +#if VTK_MAJOR_VERSION <= 5
 +         _pdm->SetInput( _vtkglyph->GetOutput());
 +#else
 +         _pdm->SetInputData( _vtkglyph->GetOutput());
 +#endif
 +
++=======
+          _vtkglyph->Update();
+          _pdm->SetInput( _vtkglyph->GetOutput());
++>>>>>>> master
  vtkPointData  *data   = _vtkglyph->GetOutput()->GetPointData();
  //printf("EED -------------------------------------------\n");
  //_vtkglyph->GetOutput()->Print(std::cout);
  //printf("EED -------------------------------------------\n");
  //data->Print(std::cout);
- printf("EED -------------------------------------------\n");                  
  int i,sizeDa = data->GetNumberOfArrays();
- printf("EED vtkVectorsVisu::Process  sizeDa %d \n", sizeDa );
  for (i=0;i<sizeDa;i++)
  {
++<<<<<<< HEAD
 +      printf("EED vtkVectorsVisu::Process-name %d, %s \n", i, data->GetArrayName(i) );
 +}
 +
 +//EED         _pdm->SetScalarRange( range );
 +//EED         vtkPolyData     *pd                     = vGlyphFlowPlane->GetOutput();
 +//EED         vtkPointData    *pointdata              = pd->GetPointData();
 +//EED         vtkDataArray    *da                     = pointdata->GetVectors();
 +//EED         vtkDataArray *nda = vtkFloatArray::New();
 +//EED         nda->DeepCopy(da);
 +//       pointdata->RemoveArray( "GlyphVector" );
 +//       bbGetInputIn()->GetPointData()->RemoveArray( "GlyphVector" );
 +//EED         pointdata->AddArray( nda );
 +//EED         bbGetInputIn()->GetPointData()->AddArray( nda );
 +//EED2         _pdm->ScalarVisibilityOn();
 +
++=======
+       data->GetArray(i)->Print(std::cout);
+ }
++>>>>>>> master
        _pdm->ScalarVisibilityOn();
        _pdm->SetColorModeToMapScalars();
        //_pdm->SetColorModeToDefault();
        //_LutEED->SetVectorModeToRGBColors();
        //_LutEED->SetVectorModeToMagnitud();
  
 -
 -
  //         _pdm->SetScalarModeToUsePointFieldData();
           _pdm->SetLookupTable( _LutEED );
           _pdm->SelectColorArray( "GlyphVector" );
  //       vSliceMapperVec->SetLookupTable( vGreenToRedLut );
  //       vSliceMapperVec->SetColorModeToMapScalars();
  
 +#if VTK_MAJOR_VERSION <= 5
 +              // ..
 +#else
 +         _pdm->Update();
 +#endif
           _actor->SetMapper( _pdm );
           _actor->GetProperty()->SetOpacity( GetOpacity() );
      }// if _active
  
      VisibilityActor(); 
  }
 -      
 -
 -
 -
 -
  
index 45f922432d959a9e1c23fe87d271c87873233b2a,0e2dda4efe67b34a9c90b75fe8d356f0ad593876..8fe751fb9604416d3c49fd5f04053ef976f69032
  
  #include "vtkVectorsTensorsVisuBase.h"
  
  #include "vtkArrowSource.h"
  #include "vtkLineSource.h"
  #include "vtkGlyph3D.h"
  
  //---------------------------------------------
  // Class Name: vtkVectorsVisu
  // [classdescription]
@@@ -71,7 -68,7 +68,7 @@@ protected
  private:
        vtkArrowSource  *_vtkarrowsource;
        vtkLineSource   *_vtklinesource;
 -      vtkGlyph3D              *_vtkglyph;
 +      vtkGlyph3D      *_vtkglyph;
  };
  
  //-end of _vtkVectorsVISU_H_------------------------------------------------------