39 #include "qinputdialog.h"
45 #include "itkImageFileReader.h"
47 #include "vtkImageReader2Factory.h"
48 #include "vtkImageReader2.h"
49 #include "vtkImageData.h"
112 synchronizedView->
show();
115 return synchronizedView;
162 tr(
"Select Image"),
"",
163 tr(
"Images (*.png *.bmp *.jpg *.jpeg *.tiff *.mha *.mhd *.img *.lsm)") );
183 vtkImageReader2Factory *r_factory = vtkImageReader2Factory::New();
184 vtkImageReader2 * reader =
185 r_factory->CreateImageReader2( iFile.
toAscii().
data() );
190 vtkImageData *image = reader->GetOutput();
206 tr(
"Select Image"),
"",
207 tr(
"Images (*.png *.bmp *.jpg *.jpeg *.tiff)")
228 std::cerr <<
"QGoSynchronizedViewMainWindow::SaveSnapshotInFile incorrect name of file" << std::endl;
233 std::cout << nameOfScreenshot.
toStdString() << std::endl;
235 if ( ( extension.
contains(
"jpg", Qt::CaseInsensitive) )
236 || ( extension.
contains(
"jpeg", Qt::CaseInsensitive) ) )
242 if ( extension.
contains(
"bmp", Qt::CaseInsensitive) )
248 if ( extension.
contains(
"png", Qt::CaseInsensitive) )
254 if ( extension.
contains(
"eps", Qt::CaseInsensitive) )
260 if ( extension.
contains(
"tiff", Qt::CaseInsensitive) )
266 std::cerr <<
"QGoSynchronizedViewMainWindow::SaveSnapshotInFile couldn't find appropriate extension"
275 if ( SynchronizedView != 0 )
307 std::cerr <<
"QGoSynchronizedViewMainWindow::SaveSnapshotInFile can't access fullscreen view" << std::endl;
320 std::cerr <<
"QGoSynchronizedViewMainWindow::SaveSnapshotInFile synchronizedView pointer error" << std::endl;
328 std::stringstream timageinfo;
346 tr(
"Synchronize open images for point-to-point comparison") );
353 tr(
"Synchronize open images for point-to-point comparison") );
421 tr(
"About QGoCompare"),
422 tr(
"<b>QGoCompare</b> lets you open multiple"
423 " VTK/ITK images from a"
424 " VTK or ITK pipeline and compare them."
426 " Qt, VTK, ITK and GoFigure2 libraries") );
433 tr(
"About GoFigure2"),
434 tr(
"<b>GoFigure2</b> is a cross-platform,"
435 " free open source software (FOSS), for"
436 " visualizing, processing and analysing of bioimages"
437 " http://gofigure2.sourceforge.net/") );
452 bool has3DSynchronizedView = ( ( hasSynchronizedView )
477 tr(
"&Open an image file"),
this);
481 SIGNAL( triggered() ),
497 tr(
"Synchronize open images for point-to-point comparison") );
499 SIGNAL( triggered() ),
507 SIGNAL( triggered() ),
513 #if ( ( QT_MAJOR_VERSION == 4 ) && ( QT_MINOR_VERSION >= 6 ) )
518 SIGNAL( triggered() ),
520 SLOT( closeAllWindows() ) );
526 SIGNAL( triggered() ),
528 SLOT( closeActiveSubWindow() ) );
533 SIGNAL( triggered() ),
535 SLOT( closeAllSubWindows() ) );
540 SIGNAL( triggered() ),
542 SLOT( tileSubWindows() ) );
547 SIGNAL( triggered() ),
549 SLOT( cascadeSubWindows() ) );
554 SIGNAL( triggered() ),
561 SIGNAL( triggered() ),
568 SIGNAL( triggered() ),
575 SIGNAL( triggered() ),
582 SIGNAL( triggered() ),
589 SIGNAL( triggered() ),
596 SIGNAL( triggered() ),
603 SIGNAL( triggered() ),
668 if ( SynchronizedView->
GetName() == iSynchronizedViewName )