Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Allow nifti load to fail #3529

Merged

Commits on Aug 6, 2022

  1. ENH: Force test failure on bad file writing

    When attempting to write to an invalid file
    location, ensure that an itk::ExceptionObject
    is thrown.
    hjmjohnson committed Aug 6, 2022
    Configuration menu
    Copy the full SHA
    a8cc0a5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3dfab27 View commit details
    Browse the repository at this point in the history
  3. BUG: Provide itk::Exception for invalid NIFTI write

    When attempting to write a nifti file to an invalid location (for
    example, C:\Windows\something.nii) then no file is created there yet no
    error is reported.
    
    The issue is that the error is swallowed in both niftilib and nifti2
    (just "reported" with LNI_FERR macro, which does not throw an exception
    or reports the error to ITK in any other way):
    
    Resolves: InsightSoftwareConsortium#1958
    hjmjohnson committed Aug 6, 2022
    Configuration menu
    Copy the full SHA
    3b46b05 View commit details
    Browse the repository at this point in the history
  4. ENH: Convert unspecified exceptions to itk

    Ensure that caught exceptions are converted to itk::Exception objects.
    hjmjohnson committed Aug 6, 2022
    Configuration menu
    Copy the full SHA
    62e307a View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2022

  1. Configuration menu
    Copy the full SHA
    6fc1c88 View commit details
    Browse the repository at this point in the history
  2. ENH: Consolidate resetting IO object for reuse

    When re-using the HDF IO object, all internal
    state variables should be reset to the
    initial state as if the object had been
    constructed anew.
    
    Previously, the WriteImageInformation function
    would set the value m_ImageInformationWritten
    to true, and it would never again be set to false.
    hjmjohnson committed Aug 7, 2022
    Configuration menu
    Copy the full SHA
    a9165bf View commit details
    Browse the repository at this point in the history
  3. BUG: A temporary work-around for HDF5 testing

    The HDF5ImageIO objects are single use for writing.  After
    the initial use, the WriteImageInformation function is
    short circuited, and can not be reset for writing a second image.
    
    This bug was exposed while fixing a problem with the not
    throwing an exception when attempting to write to a path
    that does not exist.
    
    This temporary work around in the test framework allows fixing
    the initial problem without requiring fixing the HDF5ImageIO
    re-use issues.
    
    NOTE: Resetting the HDF5ImageIO object at the end of writing
    fixes the re-use problem for non-streaming case, but that
    causes the streaming tests to fail.
    hjmjohnson committed Aug 7, 2022
    Configuration menu
    Copy the full SHA
    f244a81 View commit details
    Browse the repository at this point in the history