X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FpHistogram.cxx;h=4bac5fba7d5e09ce09047fd6f213698d32a6ced3;hb=255f774ce4100c0b84e6b5efa5c64d0db77f8a61;hp=c14e9511348f57ac1bf39256258777ebdfbaf2d9;hpb=da163855471fe218bef04ee518b126fc066d24aa;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx index c14e951..4bac5fb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx @@ -135,9 +135,16 @@ void pHistogram::initializePoints(int xDimension) //setting image data of the points points->SetDimensions(xDimension,1,1); //EED points->SetScalarTypeToUnsignedShort(); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 points->SetScalarTypeToDouble(); points->AllocateScalars(); points->Update(); +#else + points->AllocateScalars(VTK_DOUBLE,1); +#endif + } /* @@ -146,7 +153,6 @@ void pHistogram::initializePoints(int xDimension) void pHistogram::setPoints(vtkImageData* imageData) { -printf("EED pHistogram::setPoints Trinng new histogram ..\n"); /* printf("EED pHistogram::setPoints Test: vtkPComputeHistogram2DOutliers\n"); vtkComputeHistogram2DOutliers *vtkhist = vtkComputeHistogram2DOutliers::New(); @@ -163,12 +169,12 @@ printf("EED pHistogram::setPoints colums:%d\n", (int)(resulttable->GetNumberOfCo */ char* dataImagePointerC = (char*)imageData->GetScalarPointer(0,0,0); - unsigned char* dataImagePointerUC = (unsigned char*)imageData->GetScalarPointer(0,0,0); + unsigned char* dataImagePointerUC = (unsigned char*)imageData->GetScalarPointer(0,0,0); short* dataImagePointerS = (short*)imageData->GetScalarPointer(0,0,0); - unsigned short* dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0); + unsigned short* dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0); float* dataImagePointerF = (float*)imageData->GetScalarPointer(0,0,0); - double* dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0); - double* dataHistogramPointer = (double*)points->GetScalarPointer(0,0,0); + double* dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0); + double* dataHistogramPointer = (double*)points->GetScalarPointer(0,0,0); /* Range of greys