]> Creatis software - bbtk.git/commitdiff
#3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 13:28:32 +0000 (15:28 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 13:28:32 +0000 (15:28 +0200)
1  2 
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/vtk/src/bbvtkCreateImage.cxx
packages/vtk/src/bbvtkImageBoundaries.cxx
packages/vtk/src/bbvtkImagePlanes.cxx
packages/vtk/src/bbvtkImageVtkProperties.cxx
packages/vtk/src/bbvtkInversCrop.cxx
packages/vtk/src/bbvtkPolyDataToActor.cxx
packages/vtk/src/bbvtkSliceImage.cxx
packages/vtk/src/bbvtkSurfaceTexture.cxx

index c1d16ba58fb15afc84ccce9badb0f3705362fa51,faabc03cf6eca63b458e6c3cfe119ddf5864f823..39ff153e69dc68fc743921f10c94b4f4f0f2ba66
@@@ -59,21 -59,14 +59,21 @@@ vtkImageData* GetXCoherentInfoGdcmReade
        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++)
        {
@@@ -96,7 -89,7 +96,7 @@@ void GetXCoherentInfoGdcmReader::Proces
                f->SetFileName( bbGetInputIn()[0] );
        } else {
                f->SetFileName( "" );
 -      }
 +      } // if
     
     bool res = f->Load();  
     if ( !res )
                f->Delete();
                bbSetOutputOut( CreateDefaultImage() );
                return;
 -   }
 +   } // if res
   // Get info from the first image file
     int i;
     std::vector<double> v_iop;
     for(i=0; i< 6; i++)
        {
        v_iop.push_back(iop[i]);
 -      }
 +      } // for i
     bbSetOutputIOP(v_iop );
   
     std::vector<double> v_ipp;
     for(i=0; i< 3; i++)
        {
        v_ipp.push_back(ipp[i]);
 -      }
 +      } // for i
     bbSetOutputIPP(v_ipp );
  
  // Add *all the files* to the SerieHelper
                                          ++it)
     {
        sh->AddFileName(*it);
 -   }
 +   } //for vector
  
  
     GDCM_NAME_SPACE::FileList::const_iterator it;
     // Should only contain one!
     l = sh->GetFirstSingleSerieUIDFileSet();
  
-    int nbFiles;
-    double zspacing    = 0.;
-    nbFiles                    = l->size() ;
+    double zspacing = 0.;
     sh->OrderFileList(l); // this one should compute the *actual* Z Spacing!
 -   zspacing = sh->GetZSpacing();
 +   zspacing           = sh->GetZSpacing();
     std::vector<double> v_pixelspacing;
     v_pixelspacing.push_back( f->GetXSpacing() );
     v_pixelspacing.push_back( f->GetYSpacing() );
  //      v_pixelspacing.push_back(f->GetZSpacing());
  //   }
     bbSetOutputPixelSpacing(v_pixelspacing);
+       VectorMapInfoDicom vectormapinfodicom;
+       uint16_t group;
+       uint16_t elem;
+       std::string key;
+       std::string strTagValue;  // read on disc
+       int iTag,sizeDicomTagsVector=bbGetInputDicomTags().size();
+       GDCM_NAME_SPACE::FileList::const_iterator iitt = l->begin();
+       //iitt ++;
+       for ( ; iitt != l->end(); ++iitt)
+       {
+               MapInfoDicom mapinfodicom;
+               for (iTag=0; iTag<sizeDicomTagsVector; iTag++)
+               {
+                       key = bbGetInputDicomTags()[iTag];
+                       group = elem = 0;
+                       if ( (key.size()==10) && (key[0] == 'D') && (key[5] == '_') )
+                       {
+                               sscanf(key.c_str(),"D%04hx_%04hx ",&group,&elem);  
+                       }// if key
+                       strTagValue = (*iitt)->GetEntryString(group,elem);
+                       mapinfodicom.insert ( std::pair<std::string,std::string>(key,strTagValue) );
+               } // for iTag
+               vectormapinfodicom.push_back( mapinfodicom );
+    } // for iitt
+    bbSetOutputDicomInfo( vectormapinfodicom );
     if (reader!=NULL)
     { 
        reader->Delete();
 -      reader=NULL;
 +      reader = NULL;
     }
     reader = vtkGdcmReader::New();
 -      
        //EED 21 mars 2012  FLIP probleme  ..PLOP..
        reader->SetFlipY(false);
 -
 -      
     //reader->SetFileName( bbGetInputIn().c_str() );
     reader->SetCoherentFileList(l);
     reader->Update();
- printf("EED GetXCoherentInfoGdcmReader::Process \n");
 +   reader->GetOutput();
 +
     bbSetOutputOut( reader->GetOutput() );
  }
  #endif
@@@ -205,9 -225,7 +231,9 @@@ void GetXCoherentInfoGdcmReader::Proces
     gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
     iop.Read( ss );
     for(i=0; i< 6; i++)
 -      v_iop.push_back((float)(iop[i]));
 +      {
 +              v_iop.push_back((float)(iop[i]));
 +      }
     bbSetOutputIOP(v_iop );
   
    std::vector<double> v_ipp;
     deIpp.GetValue().Print(ss);
     gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
     ipp.Read( ss );
 -        for(i=0; i< 3; i++)
 +      for(i=0; i< 3; i++)
 +      {
                v_ipp.push_back((float)(ipp[i]));
 +      } // for 3
     bbSetOutputIPP(v_ipp );
  
  // Add *all the files* to the IPPsorter
@@@ -278,17 -294,11 +304,17 @@@ void GetXCoherentInfoGdcmReader::bbUser
  void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
  {
     if(reader)
 +      {
        reader->Delete();
 +      } // if reader
     if(f)
 +      {
        f->Delete();
 +      } // if f
     if(sh)
 +      {
        sh->Delete();      
 +      } // if sh
  }
  #endif
  
  void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
  {
     if(reader)
 +      {
        reader->Delete();
 +      }
  }
  #endif
  
index cb9d77bf0d920e156f4de703db005274e643e7f3,c5f71b5fa96406085fd4901905d020c7d9025e90..007c34718cc779e17897a44f3ddd81ec35f4dddc
@@@ -53,10 -53,9 +53,10 @@@ void CreateImage::Process(
  //    * TYPE is the C++ type of the input/output
  //      (the one provided in the attribute 'type' of the tag 'input')
  
-       double  spc[6];
+       double  spc[3];
        int             dim[3]; 
        int             outputformat = VTK_UNSIGNED_SHORT;
 +      
        if (bbGetInputOutputFormat()=="VTK_BIT")                                        outputformat = VTK_BIT;                 // 1
        else if (bbGetInputOutputFormat()=="VTK_CHAR")                          outputformat = VTK_CHAR;                                // 2
        else if (bbGetInputOutputFormat()=="MET_CHAR")                          outputformat = VTK_CHAR;                                // 2
        else if (bbGetInputOutputFormat()=="MET_FLOAT")                         outputformat = VTK_FLOAT;               // 10
        else if (bbGetInputOutputFormat()=="VTK_DOUBLE")                        outputformat = VTK_DOUBLE;              // 11           
        else if (bbGetInputOutputFormat()=="MET_DOUBLE")                        outputformat = VTK_DOUBLE;              // 11  
 +
        spc[0] = bbGetInputSpacing()[0];
        spc[1] = bbGetInputSpacing()[1];
        spc[2] = bbGetInputSpacing()[2];
-       
        dim[0] =  bbGetInputDimensions()[0];
        dim[1] =  bbGetInputDimensions()[1];
        dim[2] =  bbGetInputDimensions()[2];
-       
+       if ((dim[0]<=0)||(dim[1]<=0)||(dim[2]<=0))
+       {
+               dim[0]=1;
+               dim[1]=1;
+               dim[2]=1;
+       }
+       if ((spc[0]<=0)||(spc[1]<=0)||(spc[2]<=0))
+       {
+               spc[0]=1;
+               spc[1]=1;
+               spc[2]=1;
+       }
+ //EED 2017-12-7
+       if (imageoutput!=NULL) 
+       {
+               imageoutput->Delete();
+       }       
+       imageoutput = vtkImageData::New();
        imageoutput->Initialize();
 -      imageoutput->SetScalarType( outputformat );     
        imageoutput->SetSpacing( spc );
        imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
 +      imageoutput->SetScalarType( outputformat );     
        imageoutput->AllocateScalars();
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +      imageoutput->AllocateScalars( outputformat,1 );
 +#endif
 +      
        int i,j,k;
        long sizeBlock; 
 +
        for (i=0; i<dim[0]; i++)
        {
                imageoutput->SetScalarComponentFromDouble(i,0,0, 0, bbGetInputInitialValue() );
 -      }       
 +      } // for i
 +      
        sizeBlock= dim[0] * imageoutput->GetScalarSize();
 -            for (j=1; j<dim[1]; j++)
 +    for (j=1; j<dim[1]; j++)
        {
                memcpy(  imageoutput->GetScalarPointer(0,j,0), imageoutput->GetScalarPointer()  , sizeBlock );
 -      }               
 +      } // for j              
 +
        sizeBlock= dim[0] * dim[1] * imageoutput->GetScalarSize();
        for (k=0; k<dim[2]; k++)
        {
                memcpy(  imageoutput->GetScalarPointer(0,0,k) ,imageoutput->GetScalarPointer()  , sizeBlock );
        } // for k
++      
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
        imageoutput->Update();
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +      // ..
 +#endif
 +
        imageoutput->Modified();
        bbSetOutputOut(imageoutput);
  }     
@@@ -170,7 -162,7 +184,7 @@@ void CreateImage::bbUserInitializeProce
  //    but this is where you should allocate the internal/output pointers 
  //    if any 
  
-       imageoutput = vtkImageData::New();
//EED 2017-12-7       imageoutput = vtkImageData::New();
  
  }
        
index e947bb36046a60fc60f98339f0f070825d5a1b6f,fb9eb2464504f5fd473f5a21534fea7956cd50d1..8d003bdca2e01f1634bf17bc93060f1c0e0ebf89
@@@ -30,6 -30,9 +30,9 @@@
  //===== 
  #include "bbvtkImageBoundaries.h"
  #include "bbvtkPackage.h"
+ #include "creaVtk_MACROS.h"
+ #include <omp.h>
  namespace bbvtk
  {
  
@@@ -40,24 -43,13 +43,23 @@@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageBoun
  //===== 
  void ImageBoundaries::Process()
  {
 -      if (bbGetInputIn()!=NULL)
 -      {
 -              int ext[6];             
 +      printf("bbtk:vtk::ImageBoundaries::Process start\n");
 +      if (bbGetInputIn()!=NULL){
 +              int i,j,k;      
 +              int ext[6];
 +              double value;
 +              
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                bbGetInputIn()->GetWholeExtent(ext);
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +              bbGetInputIn()->GetExtent(ext);
 +#endif
 +
                int maxX        = ext[1]-ext[0]+1;
                int maxY        = ext[3]-ext[2]+1;
                int maxZ        = ext[5]-ext[4]+1;
-                               
                int bXMax       = 0;
                int bYMax       = 0;
                int bZMax       = 0;
                int bYMin       = maxY-1;
                int bZMin       = maxZ-1;
                
-               for (i=0 ; i<maxX ; i++)
+ /*
+               #pragma omp parallel for
+               for (int i=0 ; i<maxX ; i++)
                {
+                       int j;  
+                       int k;
                        for (j=0 ; j<maxY ; j++)
                        {
                                for (k=0 ; k<maxZ ; k++)
                                {
-                                       value = bbGetInputIn()->GetScalarComponentAsDouble(i, j, k,0);
+                                       double value = bbGetInputIn()->GetScalarComponentAsDouble(i, j, k,0);
                                        if ( (value>=bbGetInputLowerValue()) && (value<=bbGetInputUpperValue())  )
                                        {
                                                if (i<bXMin) bXMin=i;
                                } // for k
                        } // for j
                } // i
-                       
+ */
+               DEF_POINTER_IMAGE_VTK_CREA(vI,ssI,pI,stI,bbGetInputIn())        
+               int i;
+               int j;  
+               long int index=0;
+               for (int k=0 ; k<maxZ ; k++)
+               {
+                       for (j=0 ; j<maxY ; j++)
+                       {
+                               for (i=0 ; i<maxX ; i++)
+                               {
+ //                                    double value = bbGetInputIn()->GetScalarComponentAsDouble(i, j, k,0);
+                                       GETVALUE2_VTK_CREA(vI,pI,stI,index) 
+                                       index++;
+                                       if ( (vI>=bbGetInputLowerValue()) && (vI<=bbGetInputUpperValue())  )
+                                       {
+                                               if (i<bXMin) bXMin=i;
+                                               if (j<bYMin) bYMin=j;
+                                               if (k<bZMin) bZMin=k;
+                                               if (i>bXMax) bXMax=i;
+                                               if (j>bYMax) bYMax=j;
+                                               if (k>bZMax) bZMax=k;
+                                       }
+                               } // for k
+                       } // for j
+               } // i
                std::vector<int> tmpIndex;              
                std::vector<int> tmpSize;
-               
                if (bXMin>bXMax){
                        tmpIndex.push_back(0);
                        tmpIndex.push_back(0);
                        tmpSize.push_back(bYMax-bYMin+1);
                        tmpSize.push_back(bZMax-bZMin+1);
                }
-                       
                bbSetOutputIndex(tmpIndex);
                bbSetOutputSize(tmpSize);
        } else {
                printf("bbtk warnning: bbtk:vtk:ImageBoundaries box, Input image (In) not initialized..\n");
        }
-       printf("bbtk:vtk::ImageBoundaries::Process end\n");
  }
  //===== 
  // 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)
index 6f2808219c3faf75f60d7a828e03adbe58aedaca,d3cd9d4040fca938bd84fa6ed9446927fb706c20..9f6bc7d20c36e4fce83d2c320fcfe4eaca8c1fdb
@@@ -153,13 -153,13 +153,13 @@@ namespace bbvt
  
     void ImagePlanes::bbUserSetDefaultValues() 
     { 
-      bbSetOutputPlaneX(0);
-      bbSetOutputPlaneY(0);
-      bbSetOutputPlaneZ(0);
-      bbSetOutputImageX(0);
-      bbSetOutputImageY(0);
-      bbSetOutputImageZ(0);
-      bbSetInputIn(0);
+      bbSetOutputPlaneX(NULL);
+      bbSetOutputPlaneY(NULL);
+      bbSetOutputPlaneZ(NULL);
+      bbSetOutputImageX(NULL);
+      bbSetOutputImageY(NULL);
+      bbSetOutputImageZ(NULL);
+      bbSetInputIn(NULL);
       std::vector<double> vect;
       vect.push_back(0);
       vect.push_back(0);
           // EED MPR view orientation correction..
       vtkImageFlip  *flipYFilter = vtkImageFlip::New();
       flipYFilter->SetFilteredAxis(1); // flip y axis
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
       flipYFilter->SetInput( planeWidgetX->GetResliceOutput() );
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +     flipYFilter->SetInputData( planeWidgetX->GetResliceOutput() );
 +#endif
 +
       flipYFilter->Update();
  
           vtkImageChangeInformation *image = vtkImageChangeInformation::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
           image->SetInput(  planeWidgetY->GetResliceOutput()  );
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +         image->SetInputData(  planeWidgetY->GetResliceOutput()  );
 +#endif
 +
           image->SetOutputSpacing( 1,1,1 );       
           image->CenterImageOn();
           image->Update();
           _imageTransform = vtkTransform::New();
           vtkImageReslice *slicer =vtkImageReslice::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
           slicer->SetInput( image->GetOutput() );
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +         slicer->SetInputData( image->GetOutput() );
 +#endif
 +
           slicer->SetInformationInput( image->GetOutput() );
           slicer->SetResliceTransform( _imageTransform );
           slicer->SetOutputOrigin(0 , 0 , 0 );
           slicer->SetInterpolationModeToNearestNeighbor();
           slicer->Update();       
           vtkImageChangeInformation *imageResult = vtkImageChangeInformation::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
           imageResult->SetInput( slicer->GetOutput() );
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +         imageResult->SetInputData( slicer->GetOutput() );
 +#endif
 +
           double spc[3];
            planeWidgetY->GetResliceOutput()->GetSpacing(spc);
           imageResult->SetOutputSpacing( spc[1], spc[0], spc[2] ); 
       //bbSetOutputImage3Pts(planeWidget3Pts->GetResliceOutput());
  
         if(picker != 0)
+      {
                picker->UnRegister(NULL);
-      
+        }
       mVtkCallback = VtkCallbackType::New();
       mVtkCallback->SetBlackBox(this);
       planeWidgetX->AddObserver(vtkCommand::InteractionEvent,mVtkCallback);
        {
                int dim[3];
                int ext[6];
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                bbGetOutputPlaneX()->GetResliceOutput()->GetWholeExtent(ext);
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +              bbGetOutputPlaneX()->GetResliceOutput()->GetExtent(ext);
 +#endif
 +
                dim[0] = ext[1]-ext[0]+1;
                dim[1] = ext[3]-ext[2]+1;
                dim[2] = ext[5]-ext[4]+1;
                        double xSpacing, ySpacing, zSpacing;
                        bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
  
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneX()->SetInput(bbGetInputIn());
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      bbGetOutputPlaneX()->SetInputData(bbGetInputIn());
 +#endif
 +
                        bbGetOutputPlaneX()->SetPlaneOrientationToXAxes();       
                        bbGetOutputPlaneX()->SetSlicePosition((xMax+xMin)/2.*xSpacing);
  
                        //                 bbGetOutputPlaneX()->SetPoint1( 0*xSpacing, 146*ySpacing, 186*zSpacing);
                        //                 bbGetOutputPlaneX()->SetPoint2( 126*xSpacing, 146*ySpacing, 0*zSpacing);
  
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneY()->SetInput(bbGetInputIn());
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      bbGetOutputPlaneY()->SetInputData(bbGetInputIn());
 +#endif
 +
                        bbGetOutputPlaneY()->SetPlaneOrientationToYAxes();
                        bbGetOutputPlaneY()->SetSlicePosition((yMax+yMin)/2.*ySpacing);
  
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneZ()->SetInput(bbGetInputIn());
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      bbGetOutputPlaneZ()->SetInputData(bbGetInputIn());
 +#endif
 +
                        bbGetOutputPlaneZ()->SetPlaneOrientationToZAxes();
                        bbGetOutputPlaneZ()->SetSlicePosition((zMax+zMin)/2.*zSpacing);
  
                bbGetOutputPlaneZ()->SetResliceInterpolate( bbGetInputInterpolation() );
  
                
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                bbGetOutputPlaneX()->GetResliceOutput()->Update();
                bbGetOutputPlaneY()->GetResliceOutput()->Update(); 
                bbGetOutputPlaneZ()->GetResliceOutput()->Update();               
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +              // ...
 +#endif
                
                std::vector<int> pointsx = bbGetInputPointsX();
                std::vector<int> pointsy = bbGetInputPointsY();
  
                        //Get the corresponding three points out of the vectors
                        double origin[3];
-                       origin[0] = pointsx[0];
-                       origin[1] = pointsy[0];
-                       origin[2] = pointsz[0];
+                       origin[0]                       = pointsx[0];
+                       origin[1]                       = pointsy[0];
+                       origin[2]                       = pointsz[0];
  
                        double point1[3];
-                       point1[0] = pointsx[1];
-                       point1[1] = pointsy[1];
-                       point1[2] = pointsz[1];
+                       point1[0]                       = pointsx[1];
+                       point1[1]                       = pointsy[1];
+                       point1[2]                       = pointsz[1];
                        double point2[3];
-                       point2[0]= pointsx[2];
-                       point2[1]= pointsy[2];
-                       point2[2]= pointsz[2];  
+                       point2[0]                       = pointsx[2];
+                       point2[1]                       = pointsy[2];
+                       point2[2]                       = pointsz[2];   
  
                        //With the three points we create the corresponding X, Y and Z vectors all orthogonal to each other
-                       double* vect1= getNormal(makeVector(origin, point1));
-                       double* vect2= getNormal(makeVector(origin, point2));                           
-                       double* crossp = getCrossProduct(vect1, vect2);
+                       double* vect1           = getNormal(makeVector(origin, point1));
+                       double* vect2           = getNormal(makeVector(origin, point2));                                
+                       double* crossp          = getCrossProduct(vect1, vect2);
  
-                       double *newx = getCrossProduct(vect2, crossp);
+                       double *newx            = getCrossProduct(vect2, crossp);
  
-                       int ext[6],factor=0;
+                       int ext[6],factor       =       0;
                        bbGetInputIn()->GetExtent(ext);
  
                        factor = ext[0]<ext[3]? ext[3] : ext[0];
  
        //for the plane widgets
                        vtkImagePlaneWidget* plane3pts = (vtkImagePlaneWidget*)bbGetOutputPlane3Pts();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        plane3pts->SetInput(bbGetInputIn());                    
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      plane3pts->SetInputData(bbGetInputIn());                        
 +#endif
 +
                        double xSpacing, ySpacing, zSpacing;
                        bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
                        plane3pts->SetOrigin(pointsx[0]*xSpacing,pointsy[0]*ySpacing,pointsz[0]*zSpacing);      
                        plane3pts->SetPoint2((origin[0]+vect2[0]*factor)*xSpacing,
                                                                        (origin[1]+vect2[1]*factor)*ySpacing,
                                                                        (origin[2]+vect2[2]*factor)*zSpacing);
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        plane3pts->GetResliceOutput()->Update();
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      // ..
 +#endif
 +
  //To get the slice of image out of the selected volume
-                       if (_imageReslicer==NULL){
+                       if (_imageReslicer==NULL)
+                       {
                                _imageReslicer = vtkImageReslice::New();                                        
                                _imageReslicer->SetOutputDimensionality(2);
                                _transform = vtkTransform::New();
                                _matrix = vtkMatrix4x4::New();  
-                       }
+                       } // if
                        _imageReslicer->SetInterpolationMode( bbGetInputInterpolation() );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        _imageReslicer->SetInput( bbGetInputIn() );
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      _imageReslicer->SetInputData( bbGetInputIn() );
 +#endif
 +
 +
                        _imageReslicer->SetInformationInput(bbGetInputIn());    
                        //fill out the information with the created vectors and using the spacing of the image
                        _imageReslicer->SetResliceAxesDirectionCosines(newx[0]*xSpacing,newx[1]*xSpacing,newx[2]*xSpacing,
                                                                        vect2[0]*ySpacing,vect2[1]*ySpacing,vect2[2]*ySpacing,
                                                                        crossp[0]*zSpacing,crossp[1]*zSpacing,crossp[2]*zSpacing);                      
                        _imageReslicer->SetResliceAxesOrigin(origin[0]*xSpacing,origin[1]*ySpacing,origin[2]*zSpacing);
 +
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                        _imageReslicer->GetOutput()->Update();
                        _imageReslicer->GetOutput()->UpdateInformation();
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +                      _imageReslicer->Update();
 +#endif
 +
 +
  
                        bbSetOutputImage3Pts(_imageReslicer->GetOutput());
  
        } // bbGetInputIn
    }
        
-   void ImagePlanes::updateInteractor(){
-       vtkRenderWindowInteractor* interactor = bbGetInputInteractor();
-       if(interactor){
-               bbGetOutputPlaneX()->SetInteractor(interactor);
-               bbGetOutputPlaneX()->EnabledOn();
-               bbGetOutputPlaneY()->SetInteractor(interactor);
-               bbGetOutputPlaneY()->EnabledOn();
-               bbGetOutputPlaneZ()->SetInteractor(interactor);
-               bbGetOutputPlaneZ()->EnabledOn();
-               bbGetOutputPlane3Pts()->SetInteractor(interactor);
-               bbGetOutputPlane3Pts()->EnabledOn();
-       }
-   }
+       void ImagePlanes::updateInteractor()
+       {
+               vtkRenderWindowInteractor* interactor = bbGetInputInteractor(); 
+               if(interactor)
+               {
+                       bbGetOutputPlaneX()->SetInteractor(interactor);
+                       bbGetOutputPlaneX()->EnabledOn();
+                       bbGetOutputPlaneY()->SetInteractor(interactor);
+                       bbGetOutputPlaneY()->EnabledOn();
+                       bbGetOutputPlaneZ()->SetInteractor(interactor);
+                       bbGetOutputPlaneZ()->EnabledOn();
+                       bbGetOutputPlane3Pts()->SetInteractor(interactor);
+                       bbGetOutputPlane3Pts()->EnabledOn();
+               } // if
+       }
        //-----------------------------------------------------------------     
-   void vtkImageDataPointerRelay::bbUserSetDefaultValues()
+       void vtkImageDataPointerRelay::bbUserSetDefaultValues()
        {
                
        }
index 50506435bc6026d0c686b66b98c97fd684551874,2057727a9a88ada2d54699fd003f226efafa8840..a065023d1f2d8d09bd310d200bea42574d90890f
@@@ -40,50 -40,41 +40,48 @@@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageVtkP
  //===== 
  void ImageVtkProperties::Process()
  {
-       unsigned int dim;
-       int ext[6];
-       double spc[3];
-       double range[2];
-       std::string nametype;
-       int numberoOfComponents;
-       std::vector<int> vsize;
-       std::vector<float> vspacing;
-       std::vector<float> vrange;
+       unsigned int            dim;
+       int                             ext[6];
+       double                          spc[3];
+       double                          range[2];
+       double                          origin[3];
+       std::string             nametype;
+       int                             numberoOfComponents;
+       std::vector<int>        vsize;
+       std::vector<double> vspacing;
+       std::vector<double> vrange;
+       std::vector<double> vorigin;
  
        if ( bbGetInputIn() )
        {
                bbGetInputIn()->Modified();
-               
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
                bbGetInputIn()->Update();
                bbGetInputIn()->GetWholeExtent(ext);
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +              bbGetInputIn()->GetExtent(ext);
 +#endif
 +
                vsize.push_back(ext[1]-ext[0]+1);
                vsize.push_back(ext[3]-ext[2]+1);
                vsize.push_back(ext[5]-ext[4]+1);
-               
                dim = 0;
                if (vsize[0]>1) dim++;
                if (vsize[1]>1) dim++;
                if (vsize[2]>1) dim++;
-               
                bbGetInputIn()->GetScalarRange(range);
+               bbGetInputIn()->GetOrigin(origin);
                numberoOfComponents=bbGetInputIn()->GetNumberOfScalarComponents();
-       
                bbGetInputIn()->GetSpacing(spc);
                for (unsigned int i=0;i<dim;++i) 
                {
-                       vspacing.push_back((float)spc[i]);
+                       vspacing.push_back( (double)spc[i] );
+                       vorigin.push_back( (double)origin[i] );
                }
-               vrange.push_back((float)range[0]);
-               vrange.push_back((float)range[1]);
+               vrange.push_back((double)range[0]);
+               vrange.push_back((double)range[1]);
                if (bbGetInputIn()->GetScalarType()==VTK_BIT)                           nametype="VTK_BIT";                     // 1
                if (bbGetInputIn()->GetScalarType()==VTK_CHAR)                          nametype="VTK_CHAR";                    // 2
                if (bbGetInputIn()->GetScalarType()==VTK_SIGNED_CHAR)           nametype="VTK_SIGNED_CHAR";     // 15
                vrange.push_back(0);
                nametype                        = "VOID";                               
        }       
-       bbSetOutputDimension( dim );
-       bbSetOutputSize( vsize );
-       bbSetOutputSpacing( vspacing );
-       bbSetOutputMinMax( vrange );
-       bbSetOutputTypeName( nametype );
-       bbSetOutputComponents( numberoOfComponents );
-       
+       bbSetOutputDimension    ( dim );
+       bbSetOutputOrigin               ( vorigin );
+       bbSetOutputSize                 ( vsize );
+       bbSetOutputSpacing              ( vspacing );
+       bbSetOutputMinMax               ( vrange );
+       bbSetOutputTypeName             ( nametype );
+       bbSetOutputComponents   ( numberoOfComponents );
  }
  //===== 
  // 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)
index 8581943820eb2e983ad2861975efcda79f2223cb,75d4e53e57574644639ce0b071309679adda11a4..29be94cabe1ed7bd18a5b9e3f2b6b89130773987
@@@ -26,106 -26,92 +26,162 @@@ void InversCrop::Process(
  //    * TYPE is the C++ type of the input/output
  //      (the one provided in the attribute 'type' of the tag 'input')
  
-     if ((bbGetInputImageFix()!=NULL) && (bbGetInputImageMove()!=NULL) )
-     {
-      if ( bbGetInputImageFix()->GetScalarType()==bbGetInputImageMove()->GetScalarType() ) 
-      {
-         // Creating Image
-       int dim[3];
-       int ext[6];
+       if (bbGetInputActive()==true)
+       {
+           if ( (bbGetInputImageFix()!=NULL) && (bbGetInputImageMove()!=NULL) )
+           {
+            if ( bbGetInputImageFix()->GetScalarType()==bbGetInputImageMove()->GetScalarType() ) 
+            {
+               // Creating Image
+               int dim[3];
+               int ext[6];
        
 -              bbGetInputImageFix()->GetWholeExtent(ext);
 -              dim[0]= ext[1]-ext[0]+1;
 -              dim[1]= ext[3]-ext[2]+1;
 -              dim[2]= ext[5]-ext[4]+1;
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
 +      bbGetInputImageFix()->GetWholeExtent(ext);
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +      bbGetInputImageFix()->GetExtent(ext);
 +#endif
 +      dim[0]= ext[1]-ext[0]+1;
 +      dim[1]= ext[3]-ext[2]+1;
 +      dim[2]= ext[5]-ext[4]+1;
  
 -              if (bbGetInputType()==0)
 +      if (bbGetInputType()==0)
 +      {
 +              _imageoutput = vtkImageData::New();
 +              _imageoutput->Initialize();
 +              _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
 +              _imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
 +              _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
 +              _imageoutput->AllocateScalars();
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +              _imageoutput->AllocateScalars(bbGetInputImageFix()->GetScalarType() , 1);
 +#endif
 +      }
 +      if (bbGetInputType()==1)
 +      {
 +              _imageoutput=bbGetInputImageFix();
 +      }
 +
 +
 +        // Duplicating Fix Image
 +      long sizeimage = dim[0]*dim[1]*dim[2]*bbGetInputImageFix()->GetScalarSize();    
 +      memcpy( _imageoutput->GetScalarPointer() , bbGetInputImageFix()->GetScalarPointer() , sizeimage);
 +
 +      // Copy the Move Image
 +      int j,k; 
 +      int px,py,pz;
 +
 +//EED 2017-01-01 Migration VTK7
 +#if (VTK_MAJOR_VERSION <= 5) 
 +      bbGetInputImageMove()->GetWholeExtent(ext);
 +#endif
 +#if (VTK_MAJOR_VERSION >= 6) 
 +      bbGetInputImageMove()->GetExtent(ext);
 +#endif
 +
 +      int dimMoveX = ext[1]-ext[0]+1;
 +      int dimMoveY = ext[3]-ext[2]+1;
 +      int dimMoveZ = ext[5]-ext[4]+1;
 +
 +        int spxM=0;  // start px MoveImage
 +        int sizeXM=0;  // sizeX MoveImage
 +
 +      px=bbGetInputOrigin()[0];
 +        spxM=0;
 +        if (px<=0)
 +      { 
 +         spxM=px*(-1);
 +         px=0;
 +      }
 +      sizeXM = dimMoveX-spxM;
 +      if (px+sizeXM>=dim[0]) sizeXM=dim[0]-px;
 +
 +      sizeXM=sizeXM*bbGetInputImageFix()->GetScalarSize();
 +      for (k=0; k<dimMoveZ; k++)
 +      {
 +         for (j=0; j<dimMoveY; j++)
 +         {
 +                py=j+bbGetInputOrigin()[1];
 +              pz=k+bbGetInputOrigin()[2];
 +              
 +              if ( (py<dim[1]) && (pz<dim[2]) &&
 +                   (py>=0)    && (pz>=0)      &&
 +                   (sizeXM>0) ) 
                {
-                       memcpy( _imageoutput->GetScalarPointer(px,py,pz) , bbGetInputImageMove()->GetScalarPointer(spxM,j,k) , sizeXM );
+                       _imageoutput = vtkImageData::New();
+                       _imageoutput->Initialize();
+                       _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
+                       _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
+                       _imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
+                       _imageoutput->AllocateScalars();
+                       // Duplicating Fix Image
+                       long sizeimage = dim[0]*dim[1]*dim[2]*bbGetInputImageFix()->GetScalarSize();    
+                       memcpy( _imageoutput->GetScalarPointer() , bbGetInputImageFix()->GetScalarPointer() , sizeimage);
+               }
+               if (bbGetInputType()==1)
+               {
+                       _imageoutput=bbGetInputImageFix();
                }
  
-          } // for j
-       } // for k
-         _imageoutput->Modified();
-       } // If Image Fixe Move the same GetScalarType
-         else {
-            printf ("ERROR: InversCrop  both ImageFixe and ImageMove need the same format.\n");
-       }  
-     } // If Image Fixe Move != NULL
-      else {
-         printf ("ERROR: InversCrop  need ImageFixe and ImageMove to run.\n");
-     } 
-     bbSetOutputOut(_imageoutput);
+               // Copy the Move Image
+               int j,k; 
+               int px,py,pz;
+               bbGetInputImageMove()->GetWholeExtent(ext);
+               int dimMoveX    = ext[1]-ext[0]+1;
+               int dimMoveY    = ext[3]-ext[2]+1;
+               int dimMoveZ    = ext[5]-ext[4]+1;
+               int spxM                = 0;  // start px MoveImage
+               int sizeXM              = 0;  // sizeX MoveImage
+               px                              = bbGetInputOrigin()[0];
+               spxM                    = 0;
+               if (px<0)
+               { 
+                  spxM=px*(-1);
+                  px=0;
+               }
+               sizeXM = dimMoveX-spxM;
+               if (px+sizeXM>=dim[0]) sizeXM=dim[0]-px;
+               sizeXM=sizeXM*bbGetInputImageFix()->GetScalarSize();
+               for (k=0; k<dimMoveZ; k++)
+               {
+                  for (j=0; j<dimMoveY; j++)
+                  {
+                       py=j+bbGetInputOrigin()[1];
+                               pz=k+bbGetInputOrigin()[2];
+                               if ( (py<dim[1]) && (pz<dim[2]) &&
+                                (py>=0)    && (pz>=0)  &&
+                                        (sizeXM>0) ) 
+                               {
+                                       memcpy( _imageoutput->GetScalarPointer(px,py,pz) , bbGetInputImageMove()->GetScalarPointer(spxM,j,k) , sizeXM );
+                               }
+                  } // for j
+               } // for k
+               _imageoutput->Modified();
+             } // If Image Fixe Move the same GetScalarType
+               else {
+                  printf ("ERROR: InversCrop  both ImageFixe and ImageMove need the same format.\n");
+                  printf ("       type ImageFix:%d   type ImageMove:%d\n", bbGetInputImageFix()->GetScalarType(), bbGetInputImageMove()->GetScalarType() );
+             }  
+           } // If Image Fixe Move != NULL   
+            else {
+               printf ("ERROR: InversCrop  need ImageFixe and ImageMove to run.\n");
+           } 
+           bbSetOutputOut(_imageoutput);
+       } // if Active
  }
  
  //===== 
  //===== 
  void InversCrop::bbUserSetDefaultValues()
  {
  //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
  //    Here we initialize the input 'In' to 0
+    bbSetInputActive(true);
     bbSetInputType(0);
     bbSetInputImageFix(NULL);
     bbSetInputImageMove(NULL);
     std::vector<int> origin;
     origin.push_back(0);
     origin.push_back(0);
     origin.push_back(0);
     bbSetInputOrigin(origin);
-    
     _imageoutput=NULL;
  }
  //===== 
index 0a2fdfdb24074331ed862707a18e2c28901bfb3b,d56af36bab4d4e0a0d3366ca2b0a214c9b4dd952..ed7966c13c7f48e50ba0572d2d847cdbdb9762b7
@@@ -47,6 -47,7 +47,7 @@@
  #include "bbvtkPolyDataToActor.h"
  #include "bbvtkPackage.h"
  
  namespace bbvtk
  {
     BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PolyDataToActor)
@@@ -60,7 -61,6 +61,6 @@@
           colour.push_back(1.0);
           colour.push_back(0.5);
           bbSetInputColour(colour);
           bbSetInputActive(true);
           bbSetInputIn(NULL);
           bbSetInputRenderer(NULL);
@@@ -69,7 -69,6 +69,6 @@@
           bbSetInputRepresentation(2);
           bbSetInputLineWidth(1);
           bbSetInputScalarVisibility(false);
           polydatamapper = NULL;
           vtkactor       = NULL;
     }
  
                if (bbGetInputActive()==true)
                {
 -                      polydatamapper->SetInput( bbGetInputIn() );
 -                      vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +                       polydatamapper->SetInput( bbGetInputIn() );
 +#else
 +                       polydatamapper->SetInputData( bbGetInputIn() );
 +#endif
 +
 +                       vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
++
+                       if (bbGetInputRepresentation()==1)
+                       {
+                                vtkactor->GetProperty()->SetAmbient(1);
+                                vtkactor->GetProperty()->SetDiffuse(1);
+                                vtkactor->GetProperty()->SetSpecular(0);
+                       } else {
+ printf("EED WARNNING!  PolyDataToActor::DoProcess  which is the default values of Ambient, Diffuse, Specular ? \n");
+                       }
 -
                         vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
                           
                         vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],  
                                                        bbGetInputColour()[2] );
                                  
                         vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
                         
                         if ( bbGetInputTransform()!=NULL )
                         {
index 4e82b55862039db015962fc5b20292ff2c4d69ad,473b276042177499e0a299de62b7be97cacc0455..497e304db098280df9ef29b6f1dcbd4b8ffc42bd
@@@ -34,6 -34,9 +34,9 @@@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Slice
  BBTK_BLACK_BOX_IMPLEMENTATION(SliceImage,bbtk::AtomicBlackBox);
  void SliceImage::Process()
  {
+ printf("EED ********************************** bbtk-box vtk:SliceImage (Deprecated)\n");
+ printf("EED **********************************   >> use bbtk-box creaMaracasVisu:SliceImage \n");
        vtkImageData* original = bbGetInputIn();
  
        if (original == NULL)
                final = vtkImageData::New();
                final->SetSpacing(space);
                final->SetDimensions(newDim);
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                final->SetScalarType(scalar_type);
                final->AllocateScalars();
                final->Update();
 +#else
 +              final->AllocateScalars(scalar_type,1);
 +#endif
 +
        }
  
        bbSetOutputMax(max_z);
        }
  
        caster = vtkImageCast::New();
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        caster->SetInput(final);
 +#else
 +      caster->SetInputData(final);
 +#endif
 +
        caster->SetOutputScalarTypeToShort();
        caster->Update();
  
index 119e612c470e8630de8e844c686f7280e5308094,f0b0be3f9e50dbcfc4218734eb219898c3b51d9f..76b0b6d953f49286a4ac0530ef2917d1352640bc
@@@ -5,7 -5,7 +5,7 @@@
  #include "bbvtkPackage.h"
  
  #include <vtkPointData.h>
+ #include <vtkMath.h>
  
  namespace bbvtk
  {
@@@ -40,15 -40,7 +40,15 @@@ void SurfaceTexture::Process(
        int ext[6];
        bbGetInputImage()->GetSpacing(spc);
        bbGetInputImage()->GetScalarRange(range);
 +
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        bbGetInputImage()->GetWholeExtent(ext);
 +#else
 +      bbGetInputImage()->GetExtent(ext);
 +#endif
 +
        int maxX = ext[1]-ext[0]+1;
        int maxY = ext[3]-ext[2]+1;
        int maxZ = ext[5]-ext[4]+1;
                  colorLookupTable->SetTableValue(      iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
                } // for iLookTable
  
+ //EED 2018-06-8 ***********************ARDS Projet***********************************************
+               if (bbGetInputColorType()==2)
+               {
+                       int tableSize=256;
+                       colorLookupTable = vtkLookupTable::New();
+ //                    colorLookupTable->SetNumberOfTableValues(tableSize); 
+                       colorLookupTable->SetTableRange(range[0],range[1]);
+ //                    colorLookupTable->SetTableRange(0,11);
+                       colorLookupTable->Build();
+ /*
+   for (unsigned int i = 0; i < tableSize; ++i)
+     {
+     colorLookupTable->SetTableValue(i,
+                        vtkMath::Random(.25, 1.0),
+                        vtkMath::Random(.25, 1.0),
+                        vtkMath::Random(.25, 1.0),
+                        1.0);
+     }
+ */
+                       double rgba1[4];
+                       double rgba2[4];
+                       int i,j;
+                       for (int iLookTable = 0; iLookTable<tableSize*3; iLookTable++)
+                       {
+                               i=rand() % tableSize;
+                               j=rand() % tableSize;
+                               colorLookupTable->GetTableValue(i, rgba1);
+                               colorLookupTable->GetTableValue(j, rgba2);
+                         colorLookupTable->SetTableValue(j, rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
+                         colorLookupTable->SetTableValue(i, rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+                       } // for iLookTable
+               } // type 2
+               if (bbGetInputColorType()==3)
+               {
+                       int tableSize=13;
+                       colorLookupTable = vtkLookupTable::New();
+                       colorLookupTable->SetNumberOfTableValues(tableSize); 
+                       colorLookupTable->SetTableRange(6,range[1]);
+                       colorLookupTable->Build();
+                 colorLookupTable->SetTableValue(0, 1  ,1      ,1      ,1);
+                 colorLookupTable->SetTableValue(1, 1  ,0      ,0      ,1);
+                 colorLookupTable->SetTableValue(2, 0  ,1      ,0      ,1);
+                 colorLookupTable->SetTableValue(3, 0  ,0      ,1      ,1);
+                 colorLookupTable->SetTableValue(4, 0  ,1      ,1      ,1);
+                 colorLookupTable->SetTableValue(5, 1  ,1      ,0      ,1);
+                 colorLookupTable->SetTableValue(6, 1  ,0      ,1      ,1);
+                 colorLookupTable->SetTableValue(7, 0.5,1      ,1      ,1);
+                 colorLookupTable->SetTableValue(8, 1  ,0.5,1  ,1);
+                 colorLookupTable->SetTableValue(9, 1  ,1      ,0.5,1);
+                 colorLookupTable->SetTableValue(10,1  ,0.5,0.5,1);
+                 colorLookupTable->SetTableValue(11,0.5,0.5,1  ,1);
+               } // type 2
        }
  
        bbGetInputMesh()->GetPointData()->SetScalars(colors);