]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx
#3418 creaMaracasVisu Feature New Normal - ManualPaint_model with openmp
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourExtractData.cxx
index 9dc9133a28248d8363998ca4f976543857d43b13..da3d19b816e7aab56e211799800c3660d91ba27c 100644 (file)
@@ -575,21 +575,18 @@ void ContourExtractData::InitVtkImagesResult()
                imagedataValueResult->Delete();
        }
        imagedataValueResult = vtkImageData::New();
-
-//EED 2017-12-18
-       imagedataValueResult->SetScalarType(scalartype);
-       //imagedataValueResult->SetScalarTypeToUnsignedShort();
-
-
        imagedataValueResult->SetSpacing(spc);
        imagedataValueResult->SetDimensions( newDim );
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
-       imagedataValueResult->SetScalarTypeToUnsignedShort();
+
+//EED 2017-12-18
+       imagedataValueResult->SetScalarType(scalartype);
+       //imagedataValueResult->SetScalarTypeToUnsignedShort();
        imagedataValueResult->AllocateScalars();
 #else
-       imagedataValueResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+       imagedataValueResult->AllocateScalars(scalartype,1);
 #endif
 
 
@@ -599,20 +596,18 @@ void ContourExtractData::InitVtkImagesResult()
        }
        imagedataMaskResult  = vtkImageData::New();
 
-//EED 2017-12-18
-//     imagedataMaskResult->SetScalarType(scalartype);
-//     imagedataMaskResult->SetScalarTypeToUnsignedShort();
-       imagedataMaskResult->SetScalarTypeToUnsignedChar();
 
        imagedataMaskResult->SetSpacing(spc);
        imagedataMaskResult->SetDimensions( newDim );
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
-       imagedataMaskResult->SetScalarTypeToUnsignedShort();
+    //EED 2017-12-18
+    //imagedataMaskResult->SetScalarTypeToUnsignedShort();
+       imagedataMaskResult->SetScalarTypeToUnsignedChar();
        imagedataMaskResult->AllocateScalars();
 #else
-       imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+       imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_CHAR,1);
 #endif
 
 }