X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=9801e8bbb65575c3a080bed78f6ff8d92ce2b7ab;hb=e90f3417df897baa4a768b35374d7a80c5fa688e;hp=73724194a7c109d3dc4821913a51a791ff6ca573;hpb=bff12b935c8c8f9c55f474e7b773fa8fa9d84865;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 7372419..9801e8b 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -416,7 +416,7 @@ void vvMainWindow::UpdateMemoryUsage() { // clitk::PrintMemory(true); if (clitk::GetMemoryUsageInMb() == 0) infoPanel->setMemoryInMb("NA"); - else infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB"); + else infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MB"); } //------------------------------------------------------------------------------ @@ -1173,7 +1173,7 @@ void vvMainWindow::ImageInfoChanged() sizeMM[i] = inputSize[i]*inputSpacing[i]; NPixel *= inputSize[i]; } - inputSizeInBytes = GetSizeInBytes(imageSelected->GetActualMemorySize()*1000); + inputSizeInBytes = GetSizeInBytes(imageSelected->GetActualMemorySize()); QString dim = QString::number(dimension) + " ("; dim += pixelType + ")"; @@ -3302,7 +3302,11 @@ void vvMainWindow::SaveScreenshotAllSlices() // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); +#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1 + windowToImageFilter->SetScale(1); +#else windowToImageFilter->SetMagnification(1); +#endif windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel windowToImageFilter->Update(); @@ -3352,7 +3356,11 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) if (!fileName.isEmpty()) { vtkSmartPointer w2i = vtkSmartPointer::New(); w2i->SetInput(widget->GetRenderWindow()); +#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1 + w2i->SetScale(1); +#else w2i->SetMagnification(1); +#endif w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel w2i->Update(); vtkImageData *image = w2i->GetOutput();