Skip to content

Commit

Permalink
BUG: Filter inputs are erroneously released
Browse files Browse the repository at this point in the history
The filters that rely on DataObject class, eg. itk::MaskImageFilter corrupt the input image (clears it) despite that both global and filter relative setting to release data is set to false.

Submitted by @urosvovk1
  • Loading branch information
dzenanz committed Sep 29, 2020
1 parent 498fee2 commit 4e556d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/Core/Common/src/itkDataObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ DataObject ::ReleaseData()
bool
DataObject ::ShouldIReleaseData() const
{
return (m_GlobalReleaseDataFlag || m_ReleaseDataFlag);
return (GetGlobalReleaseDataFlag() || m_ReleaseDataFlag);
}

//----------------------------------------------------------------------------
Expand Down Expand Up @@ -289,7 +289,7 @@ DataObject ::PrintSelf(std::ostream & os, Indent indent) const

os << indent << "Data Released: " << (m_DataReleased ? "True\n" : "False\n");

os << indent << "Global Release Data: " << (m_GlobalReleaseDataFlag ? "On\n" : "Off\n");
os << indent << "Global Release Data: " << (GetGlobalReleaseDataFlag() ? "On\n" : "Off\n");

os << indent << "PipelineMTime: " << m_PipelineMTime << std::endl;
os << indent << "UpdateMTime: " << m_UpdateMTime << std::endl;
Expand Down

0 comments on commit 4e556d4

Please sign in to comment.