Skip to content

Commit

Permalink
BUG: GDCM IO: reset internal variables
Browse files Browse the repository at this point in the history
It is safer to reset several variables on InternalReadImageInformation,
because a user can re-use the IO.
  • Loading branch information
issakomi authored and dzenanz committed Dec 20, 2021
1 parent b3fb53f commit d9f4b77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Modules/IO/GDCM/src/itkGDCMImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ GDCMImageIO::Read(void * pointer)
void
GDCMImageIO::InternalReadImageInformation()
{
// Reset, a user can re-use IO.
m_RescaleIntercept = 0.0;
m_RescaleSlope = 1.0;
m_SingleBit = false;

// ensure file can be opened for reading, before doing any more work
std::ifstream inputFileStream;
// let any exceptions propagate
Expand Down

0 comments on commit d9f4b77

Please sign in to comment.