X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=9801e8bbb65575c3a080bed78f6ff8d92ce2b7ab;hb=e90f3417df897baa4a768b35374d7a80c5fa688e;hp=a3d2000cbd9da993edcd9adccbd3b1130eaf9358;hpb=1cc90963e0fdb6e162a3858e4f4f5dd0d41c2939;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index a3d2000..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 + ")"; @@ -1374,15 +1374,15 @@ QString vvMainWindow::GetSizeInBytes(unsigned long size) if (size > 1000000000) { size /= 1000000000; result += QString::number(size); - result += "Gb";//)"; + result += "GB";//)"; } else if (size > 1000000) { size /= 1000000; result += QString::number(size); - result += "Mb";//)"; + result += "MB";//)"; } else if (size > 1000) { size /= 1000; result += QString::number(size); - result += "kb";//)"; + result += "kB";//)"; } return result; } @@ -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();