Skip to content

Commit

Permalink
STYLE: removed duplicated messages
Browse files Browse the repository at this point in the history
Removed itkWarning before itkException with exactly the same messages.
  • Loading branch information
issakomi authored and dzenanz committed Oct 20, 2022
1 parent 6b03920 commit 88120e6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Modules/IO/ImageBase/src/itkImageIOBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ ImageIOBase::SetDimensions(unsigned int i, SizeValueType dim)
{
if (i >= m_Dimensions.size())
{
itkWarningMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Dimensions.size());
itkExceptionMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Dimensions.size());
}
this->Modified();
Expand All @@ -120,7 +119,6 @@ ImageIOBase::SetOrigin(unsigned int i, double origin)
{
if (i >= m_Origin.size())
{
itkWarningMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Origin.size());
itkExceptionMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Origin.size());
}
this->Modified();
Expand All @@ -132,7 +130,6 @@ ImageIOBase::SetSpacing(unsigned int i, double spacing)
{
if (i >= m_Spacing.size())
{
itkWarningMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Spacing.size());
itkExceptionMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Spacing.size());
}
this->Modified();
Expand All @@ -144,7 +141,6 @@ ImageIOBase::SetDirection(unsigned int i, const std::vector<double> & direction)
{
if (i >= m_Direction.size())
{
itkWarningMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Direction.size());
itkExceptionMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Direction.size());
}
this->Modified();
Expand All @@ -156,7 +152,6 @@ ImageIOBase::SetDirection(unsigned int i, const vnl_vector<double> & direction)
{
if (i >= m_Direction.size())
{
itkWarningMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Direction.size());
itkExceptionMacro("Index: " << i << " is out of bounds, expected maximum is " << m_Direction.size());
}
this->Modified();
Expand Down

0 comments on commit 88120e6

Please sign in to comment.