From 8adbd489ccd1f941b1fd6e04c4c2c71b3e22efc6 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Thu, 22 Jul 2010 05:55:30 +0000 Subject: [PATCH] add wait icon to mouse pointer --- vv/vvLabelImageLoaderWidget.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vv/vvLabelImageLoaderWidget.cxx b/vv/vvLabelImageLoaderWidget.cxx index a4b7e41..6c36d62 100644 --- a/vv/vvLabelImageLoaderWidget.cxx +++ b/vv/vvLabelImageLoaderWidget.cxx @@ -71,8 +71,6 @@ void vvLabelImageLoaderWidget::SetText(QString t) //------------------------------------------------------------------------------ void vvLabelImageLoaderWidget::OpenImage() { - DD("OpenImage"); - // Browse for file QString Extensions = "Images files ( *.mhd *.hdr *.his)"; Extensions += ";;All Files (*)"; @@ -82,6 +80,7 @@ void vvLabelImageLoaderWidget::OpenImage() if (filename == "") return; // nothing to do // Open Image + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); vvImageReader * mReader = new vvImageReader; mReader->SetInputFilename(filename.toStdString()); mReader->Update(IMAGE); @@ -109,9 +108,7 @@ void vvLabelImageLoaderWidget::OpenImage() return; } - DD(temp->GetScalarTypeAsITKString()); if (temp->GetScalarTypeAsITKString() != "unsigned_char") { - DD("Cast"); vtkImageData * p = vtkImageData::New(); p->SetExtent(temp->GetFirstVTKImageData()->GetExtent ()); // Only first ! could not be 4D p->SetScalarTypeToUnsignedChar(); @@ -129,6 +126,7 @@ void vvLabelImageLoaderWidget::OpenImage() // Set GUI mLabelInputInfo->setText(vtksys::SystemTools::GetFilenameName(filename.toStdString()).c_str()); + QApplication::restoreOverrideCursor(); emit accepted(); } //------------------------------------------------------------------------------ -- 2.47.1