Page MenuHomePhabricator

User is not informed when loading images by mitkWorkbench fails.
Closed, InvalidPublic

Description

The reading of image data can fail when ITK itself fails to return a valid ImageIOBase object. This is done in

mitk::ItkImageFileReader

l.197 itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( filename.c_str(), itk::ImageIOFactory::ReadMode );

if ( imageIO.IsNull() )
  return false;

The bug here is, that the user is not notified at all about the failed attempt to read in the requested data. It remains to clear, where the output should happen.

Pipeline (backtrace-like)

  • [ITK Code]
  • mitk::ItkImageFileReader::CanReadFile() -- no logging if iamgeIO.IsNull()
  • mitk::BaseDataIO::LoadBaseDataFromFile() -- no logging, returning 'false' if none of the possible reader is able to read the file
  • mitk::DataNodeFactory::GenerateData() -- no logging if the vector of BaseData* retrieved is empty
  • mitk::CoreDataNodeReader::Read(...) -- no logging if the number of Outputs retrieved is 0
  • mitk::IOUtil::LoadFiles(...) -- no logging if the number of nodes retrieved is 0
  • [When through GUI] mitk::WorkbenchUtil::LoadFiles() -- no logging, uses the output of IOUtil::LoadFiles to check whether the datastorage has changed or not

The question is, since Core is affected in every case : Where to put the message?

Event Timeline

Solution (as discussed with Marco)

I. there has to be an ExceptionHandling in mitk::WorkbenchUtil::LoadFile()

Dependent on the status of the refactoring of file reader system (service)

II(old). DataNodeFactory::GenerateData() throws an exception when no output is provided

II(new). The new infrastructure throws an exception if no al reader responded 'false' to CanReadFile() query.

Setting TargetMilestone to 2014-03.

hering added a subscriber: hering.

I can not reproduce it.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:33 PM
kislinsk removed goch as the assignee of this task.
kislinsk added a project: Bulk Edit.
kislinsk added a subscriber: goch.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:37 PM
kislinsk removed a project: Bulk Edit.