- std::cerr << "Input1 = " << inputs[0]->GetScalarTypeAsString() << std::endl;
- std::cerr << "Input2 = " << inputs[1]->GetScalarTypeAsString() << std::endl;
+ std::cerr << "Input1 = " << inputs[0]->GetScalarTypeAsITKString() << std::endl;
+ std::cerr << "Input2 = " << inputs[1]->GetScalarTypeAsITKString() << std::endl;
+ QApplication::restoreOverrideCursor();
+ QMessageBox::information(this, "Wrong image type","Sorry, could not perform operation. Please select inputs with same pixel type.");
+ close();
+ return;
+ }
+
+ // Check size
+ if (!mInput1->GetImage()->HaveSameSizeAndSpacingThan(mInput2->GetImage())) {
+ std::cerr << "Sorry inputs should have the same size and spacing." << std::endl;