diff --git a/Modules/Compatibility/Deprecated/include/itkPostOrderTreeIterator.h b/Modules/Compatibility/Deprecated/include/itkPostOrderTreeIterator.h index 9e556b5664f..f79c269ae6e 100644 --- a/Modules/Compatibility/Deprecated/include/itkPostOrderTreeIterator.h +++ b/Modules/Compatibility/Deprecated/include/itkPostOrderTreeIterator.h @@ -79,7 +79,7 @@ PostOrderTreeIterator::PostOrderTreeIterator(TTreeType * tree) const auto * root = dynamic_cast(tree->GetRoot()); if (root == nullptr) { - itkGenericExceptionMacro(<< "Can't downcast root node to TreeNodeType *"); + itkGenericExceptionMacro("Can't downcast root node to TreeNodeType *"); } this->m_Position = const_cast(root); this->m_Position = const_cast(FindMostRightLeaf(this->m_Position)); @@ -138,7 +138,7 @@ PostOrderTreeIterator::FindNextNode() const auto * rval = dynamic_cast(this->m_Position->GetParent()); if (rval == nullptr) { - itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); + itkGenericExceptionMacro("Can't downcast to TreeNodeType *"); } return rval; } @@ -156,7 +156,7 @@ PostOrderTreeIterator::FindSister(TreeNodeType * node) const auto * parent = dynamic_cast(node->GetParent()); if (parent == nullptr) { - itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); + itkGenericExceptionMacro("Can't downcast to TreeNodeType *"); } int childPosition = parent->ChildPosition(node); @@ -173,7 +173,7 @@ PostOrderTreeIterator::FindSister(TreeNodeType * node) const auto * sister = dynamic_cast(parent->GetChild(childPosition + 1)); if (sister == nullptr) { - itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); + itkGenericExceptionMacro("Can't downcast to TreeNodeType *"); } return sister; } @@ -203,7 +203,7 @@ PostOrderTreeIterator::FindMostRightLeaf(TreeNodeType * node) const helpNode = dynamic_cast(node->GetChild(i)); if (helpNode == nullptr) { - itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); + itkGenericExceptionMacro("Can't downcast to TreeNodeType *"); } } ++i; diff --git a/Modules/Core/Common/include/itkByteSwapper.hxx b/Modules/Core/Common/include/itkByteSwapper.hxx index d1929c34c81..81bdd6e54a9 100644 --- a/Modules/Core/Common/include/itkByteSwapper.hxx +++ b/Modules/Core/Common/include/itkByteSwapper.hxx @@ -92,7 +92,7 @@ ByteSwapper::SwapFromSystemToBigEndian(T * p) Self::Swap8(p); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } @@ -129,7 +129,7 @@ ByteSwapper::SwapRangeFromSystemToBigEndian(T * p, BufferSizeType num) Self::Swap8Range(p, num); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } @@ -163,7 +163,7 @@ ByteSwapper::SwapWriteRangeFromSystemToBigEndian(const T * p, int num, OStrea Self::SwapWrite8Range(p, num, fp); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } @@ -190,7 +190,7 @@ ByteSwapper::SwapFromSystemToLittleEndian(T * p) Self::Swap8(p); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } @@ -220,7 +220,7 @@ ByteSwapper::SwapRangeFromSystemToLittleEndian(T * p, BufferSizeType num) Self::Swap8Range(p, num); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } @@ -250,7 +250,7 @@ ByteSwapper::SwapWriteRangeFromSystemToLittleEndian(const T * p, int num, OSt Self::SwapWrite8Range(p, num, fp); return; default: - itkGenericExceptionMacro(<< "Cannot swap number of bytes requested"); + itkGenericExceptionMacro("Cannot swap number of bytes requested"); } } diff --git a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx index a72517219d0..75cdec2fc01 100644 --- a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx @@ -119,8 +119,9 @@ ConstShapedNeighborhoodIterator::CreateActiveListFro { if (this->GetRadius() != neighborhood.GetRadius()) { - itkGenericExceptionMacro(<< "Radius of shaped iterator(" << this->GetRadius() - << ") does not equal radius of neighborhood(" << neighborhood.GetRadius() << ')'); + itkGenericExceptionMacro("Radius of shaped iterator(" << this->GetRadius() + << ") does not equal radius of neighborhood(" + << neighborhood.GetRadius() << ')'); } typename NeighborhoodType::ConstIterator nit; NeighborIndexType idx = 0; diff --git a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h index c78b54e4169..2fbe7b53af8 100644 --- a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h @@ -195,8 +195,8 @@ class ITK_TEMPLATE_EXPORT ImageLinearConstIteratorWithIndex : public ImageConstI { if (direction >= TImage::ImageDimension) { - itkGenericExceptionMacro(<< "In image of dimension " << TImage::ImageDimension << " Direction " << direction - << " was selected"); + itkGenericExceptionMacro("In image of dimension " << TImage::ImageDimension << " Direction " << direction + << " was selected"); } m_Direction = direction; m_Jump = this->m_OffsetTable[m_Direction]; diff --git a/Modules/Core/Common/include/itkImageRegion.hxx b/Modules/Core/Common/include/itkImageRegion.hxx index 0a1fd1e2f7e..27bbfc4a3ca 100644 --- a/Modules/Core/Common/include/itkImageRegion.hxx +++ b/Modules/Core/Common/include/itkImageRegion.hxx @@ -249,8 +249,8 @@ ImageRegion::Slice(const unsigned int dim) const -> SliceRegion { if (dim >= VImageDimension) { - itkGenericExceptionMacro(<< "The dimension to remove: " << dim - << " is greater than the dimension of the image: " << VImageDimension); + itkGenericExceptionMacro( + "The dimension to remove: " << dim << " is greater than the dimension of the image: " << VImageDimension); } Index sliceIndex; diff --git a/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.hxx index 5d0d70f11f0..866faaf549c 100644 --- a/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.hxx @@ -184,8 +184,8 @@ ImageSliceConstIteratorWithIndex::SetFirstDirection(unsigned int directi { if (direction >= TImage::ImageDimension) { - itkGenericExceptionMacro(<< "In image of dimension " << TImage::ImageDimension << " Direction " << direction - << " sas selected"); + itkGenericExceptionMacro("In image of dimension " << TImage::ImageDimension << " Direction " << direction + << " sas selected"); } m_Direction_A = direction; m_PixelJump = this->m_OffsetTable[m_Direction_A]; @@ -200,8 +200,8 @@ ImageSliceConstIteratorWithIndex::SetSecondDirection(unsigned int direct { if (direction >= TImage::ImageDimension) { - itkGenericExceptionMacro(<< "In image of dimension " << TImage::ImageDimension << " Direction " << direction - << " sas selected"); + itkGenericExceptionMacro("In image of dimension " << TImage::ImageDimension << " Direction " << direction + << " sas selected"); } m_Direction_B = direction; m_LineJump = this->m_OffsetTable[m_Direction_B]; diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 28c7da9d20c..227192af13b 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -1374,8 +1374,8 @@ itkDynamicCastInDebugMode(TSource x) TTarget rval = dynamic_cast(x); if (rval == nullptr) { - itkGenericExceptionMacro(<< "Failed dynamic cast to " << typeid(TTarget).name() - << " object type = " << x->GetNameOfClass()); + itkGenericExceptionMacro("Failed dynamic cast to " << typeid(TTarget).name() + << " object type = " << x->GetNameOfClass()); } return rval; #else diff --git a/Modules/Core/Common/include/itkMatrix.h b/Modules/Core/Common/include/itkMatrix.h index 4a34ee572a5..c1ed4bb00af 100644 --- a/Modules/Core/Common/include/itkMatrix.h +++ b/Modules/Core/Common/include/itkMatrix.h @@ -278,7 +278,7 @@ class ITK_TEMPLATE_EXPORT Matrix { if (vnl_determinant(m_Matrix) == NumericTraits::ZeroValue()) { - itkGenericExceptionMacro(<< "Singular matrix. Determinant is 0."); + itkGenericExceptionMacro("Singular matrix. Determinant is 0."); } vnl_matrix_inverse inverse(m_Matrix.as_ref()); return vnl_matrix_fixed{ inverse.as_matrix() }; diff --git a/Modules/Core/Common/include/itkNumericTraits.h b/Modules/Core/Common/include/itkNumericTraits.h index b24e5d1ba82..91a3b5743f8 100644 --- a/Modules/Core/Common/include/itkNumericTraits.h +++ b/Modules/Core/Common/include/itkNumericTraits.h @@ -187,7 +187,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -366,7 +366,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -472,7 +472,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -594,7 +594,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -698,7 +698,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -800,7 +800,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -903,7 +903,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1005,7 +1005,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1127,7 +1127,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1230,7 +1230,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1333,7 +1333,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1437,7 +1437,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1540,7 +1540,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1651,7 +1651,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1755,7 +1755,7 @@ class NumericTraits : public std::numeric_limits { if (s != 1) { - itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s); + itkGenericExceptionMacro("Cannot set the size of a scalar to " << s); } m = NumericTraits::ZeroValue(); } @@ -1850,7 +1850,7 @@ class NumericTraits : public std::numeric_limits::ZeroValue(); } @@ -1976,7 +1976,7 @@ class NumericTraits> { if (s != 2) { - itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s); + itkGenericExceptionMacro("Cannot set the size of a complex to " << s); } m = NumericTraits::ZeroValue(); } diff --git a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h index 5c217960566..99bc01e7c06 100644 --- a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h @@ -155,7 +155,7 @@ class NumericTraits> { if (s != D) { - itkGenericExceptionMacro(<< "Cannot set the size of a CovariantVector of length " << D << " to " << s); + itkGenericExceptionMacro("Cannot set the size of a CovariantVector of length " << D << " to " << s); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h index 2d688d15f06..e24474b275b 100644 --- a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h @@ -157,8 +157,8 @@ class NumericTraits> { if (s != 6) { - itkGenericExceptionMacro(<< "Cannot set the size of a DiffusionTensor3D " - "to anything other than 6."); + itkGenericExceptionMacro("Cannot set the size of a DiffusionTensor3D " + "to anything other than 6."); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h index 47b52162aeb..a54ea1a37a1 100644 --- a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h @@ -151,7 +151,7 @@ class NumericTraits> { if (s != D) { - itkGenericExceptionMacro(<< "Cannot set the size of a FixedArray of length " << D << " to " << s); + itkGenericExceptionMacro("Cannot set the size of a FixedArray of length " << D << " to " << s); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h index fb7927db02c..59812ae27e3 100644 --- a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h @@ -142,7 +142,7 @@ class NumericTraits> { if (s != D) { - itkGenericExceptionMacro(<< "Cannot set the size of a Point of length " << D << " to " << s); + itkGenericExceptionMacro("Cannot set the size of a Point of length " << D << " to " << s); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h index 3642820aa82..66748afc5ca 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h @@ -182,8 +182,8 @@ class NumericTraits> { if (s != 4) { - itkGenericExceptionMacro(<< "Cannot set the size of a RGBAPixel to anything other " - "than 4."); + itkGenericExceptionMacro("Cannot set the size of a RGBAPixel to anything other " + "than 4."); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h index 15f457ff22d..ea7ca89942c 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h @@ -182,8 +182,8 @@ class NumericTraits> { if (s != 3) { - itkGenericExceptionMacro(<< "Cannot set the size of a RGBPixel to anything other " - "than 3."); + itkGenericExceptionMacro("Cannot set the size of a RGBPixel to anything other " + "than 3."); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h index 8a0c582e083..b11de59bc62 100644 --- a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h @@ -156,8 +156,8 @@ class NumericTraits> { if (s != D * (D + 1) / 2) { - itkGenericExceptionMacro(<< "Cannot set the size of a SymmetricSecondRankTensor " - "of dimension " + itkGenericExceptionMacro("Cannot set the size of a SymmetricSecondRankTensor " + "of dimension " << D << " ( = size of " << D * (D + 1) / 2 << ") to " << s); } m.Fill(NumericTraits::ZeroValue()); diff --git a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h index 32ffda7de7b..e7912d789bc 100644 --- a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h @@ -197,7 +197,7 @@ class NumericTraits> { if (s != D) { - itkGenericExceptionMacro(<< "Cannot set the size of a Vector of length " << D << " to " << s); + itkGenericExceptionMacro("Cannot set the size of a Vector of length " << D << " to " << s); } m.Fill(NumericTraits::ZeroValue()); } diff --git a/Modules/Core/Common/include/itkPriorityQueueContainer.hxx b/Modules/Core/Common/include/itkPriorityQueueContainer.hxx index 24d466fe2a5..8fbda303a43 100644 --- a/Modules/Core/Common/include/itkPriorityQueueContainer.hxx +++ b/Modules/Core/Common/include/itkPriorityQueueContainer.hxx @@ -296,7 +296,7 @@ const typename PriorityQueueContainer= this->Size()) { - itkGenericExceptionMacro(<< " ElementWrapperType location is out of range"); + itkGenericExceptionMacro(" ElementWrapperType location is out of range"); } UpdateDownTree(location); UpdateUpTree(location); @@ -373,7 +373,7 @@ PriorityQueueContainer= tsize) { - itkGenericExceptionMacro(<< " ElementWrapperType location is out of range"); + itkGenericExceptionMacro(" ElementWrapperType location is out of range"); } else { diff --git a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx index b6a12b49599..74d96543d1e 100644 --- a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx +++ b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx @@ -272,7 +272,7 @@ QuadraticTriangleCell::EvaluateShapeFunctions(const ParametricCo { if (parametricCoordinates.size() != 3) { - itkGenericExceptionMacro(<< "QuadraticTriangleCell expect three coordinates"); + itkGenericExceptionMacro("QuadraticTriangleCell expect three coordinates"); } const double L1 = parametricCoordinates[0]; diff --git a/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx b/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx index e1ba8e90321..d3c150d79f6 100644 --- a/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx +++ b/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx @@ -42,7 +42,7 @@ ResourceProbesCollectorBase::Stop(const char * id) auto pos = this->m_Probes.find(tid); if (pos == this->m_Probes.end()) { - itkGenericExceptionMacro(<< "The probe \"" << id << "\" does not exist. It can not be stopped."); + itkGenericExceptionMacro("The probe \"" << id << "\" does not exist. It can not be stopped."); } pos->second.Stop(); } @@ -57,7 +57,7 @@ ResourceProbesCollectorBase::GetProbe(const char * id) const auto pos = this->m_Probes.find(tid); if (pos == this->m_Probes.end()) { - itkGenericExceptionMacro(<< "The probe \"" << id << "\" does not exist."); + itkGenericExceptionMacro("The probe \"" << id << "\" does not exist."); } return pos->second; } diff --git a/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Modules/Core/Common/include/itkSmapsFileParser.hxx index d9bc8d74331..7b61eb32050 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.hxx +++ b/Modules/Core/Common/include/itkSmapsFileParser.hxx @@ -102,7 +102,7 @@ SmapsFileParser::ReadFile(const std::string & mapFileLocation) if (filename.str().empty()) { #if defined(WIN32) || defined(_WIN32) - itkGenericExceptionMacro(<< "smaps files don't exist on Windows"); + itkGenericExceptionMacro("smaps files don't exist on Windows"); #else int pid = getpid(); filename << "/proc/" << pid << "/smaps"; @@ -127,8 +127,7 @@ SmapsFileParser::ReadFile(const std::string & mapFileLocation) catch (const ExceptionObject & excp) { // propagate the exception - itkGenericExceptionMacro(<< "The smaps file " << filename.str() - << " is an invalid file or contains errors: " << excp); + itkGenericExceptionMacro("The smaps file " << filename.str() << " is an invalid file or contains errors: " << excp); } this->m_MapFilePath = filename.str(); } @@ -147,7 +146,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) // can't find or open the VMap file if (inputFile.is_open() == false) { - itkGenericExceptionMacro(<< "The VMap file " << mapFileLocation << " could not be open"); + itkGenericExceptionMacro("The VMap file " << mapFileLocation << " could not be open"); } // load the file inputFile >> this->m_MapData; @@ -156,7 +155,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) else { #if defined(WIN32) || defined(_WIN32) - itkGenericExceptionMacro(<< "VMMap files don't exist on Windows"); + itkGenericExceptionMacro("VMMap files don't exist on Windows"); #else std::stringstream vmmapCommand; vmmapCommand << "vmmap " << getpid(); @@ -164,7 +163,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) FILE * vmmapCommandOutput = nullptr; if ((vmmapCommandOutput = popen(vmmapCommand.str().c_str(), "r")) == nullptr) { - itkGenericExceptionMacro(<< "Error using pmap. Can execute pmap command"); + itkGenericExceptionMacro("Error using pmap. Can execute pmap command"); } // Not optimal solution: copy the output into an std::istream object. @@ -186,7 +185,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) catch (const ExceptionObject & excp) { // propagate the exception - itkGenericExceptionMacro(<< "The vmmap file is an invalid file or contains errors:\n" << excp); + itkGenericExceptionMacro("The vmmap file is an invalid file or contains errors:\n" << excp); } } } // end namespace itk diff --git a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h index d4e24d11745..704c4495af0 100644 --- a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h +++ b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h @@ -153,7 +153,7 @@ Int2EigenValueOrderEnum(const uint8_t value) default: break; } - itkGenericExceptionMacro(<< "Error: Invalid value for conversion."); + itkGenericExceptionMacro("Error: Invalid value for conversion."); } #if !defined(ITK_LEGACY_REMOVE) diff --git a/Modules/Core/Common/include/itkVariableLengthVector.hxx b/Modules/Core/Common/include/itkVariableLengthVector.hxx index 22ed577aed1..73adf100d20 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.hxx +++ b/Modules/Core/Common/include/itkVariableLengthVector.hxx @@ -208,7 +208,7 @@ VariableLengthVector::AllocateElements(ElementIdentifier size) const { // Intercept std::bad_alloc and any exception thrown from TValue // default constructor. - itkGenericExceptionMacro(<< "Failed to allocate memory of length " << size << " for VariableLengthVector."); + itkGenericExceptionMacro("Failed to allocate memory of length " << size << " for VariableLengthVector."); } } diff --git a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx index 70f6a0b632b..d6ce69e35a9 100644 --- a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx +++ b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx @@ -38,8 +38,8 @@ Array VariableSizeMatrix::operator*(const Array & vect) const if (vect.Size() != cols) { - itkGenericExceptionMacro(<< "Matrix with " << this->Cols() << " columns cannot be " - << "multiplied with array of length: " << vect.Size()); + itkGenericExceptionMacro("Matrix with " << this->Cols() << " columns cannot be " + << "multiplied with array of length: " << vect.Size()); } Array result(rows); @@ -63,9 +63,9 @@ VariableSizeMatrix VariableSizeMatrix::operator*(const Self & matrix) cons { if (this->Cols() != matrix.Rows()) { - itkGenericExceptionMacro(<< "Matrix with size (" << this->Rows() << ',' << this->Cols() - << ") cannot be multiplied by matrix with size (" << matrix.Rows() << ',' << matrix.Cols() - << ')'); + itkGenericExceptionMacro("Matrix with size (" << this->Rows() << ',' << this->Cols() + << ") cannot be multiplied by matrix with size (" << matrix.Rows() + << ',' << matrix.Cols() << ')'); } Self result; result = m_Matrix * matrix.m_Matrix; @@ -81,9 +81,9 @@ VariableSizeMatrix::operator+(const Self & matrix) const { if ((matrix.Rows() != this->Rows()) || (matrix.Cols() != this->Cols())) { - itkGenericExceptionMacro(<< "Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() - << ") cannot be added to a matrix with size (" << this->Rows() << ',' << this->Cols() - << ')'); + itkGenericExceptionMacro("Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() + << ") cannot be added to a matrix with size (" << this->Rows() << ',' + << this->Cols() << ')'); } Self result(this->Rows(), this->Cols()); @@ -106,9 +106,9 @@ VariableSizeMatrix::operator+=(const Self & matrix) { if ((matrix.Rows() != this->Rows()) || (matrix.Cols() != this->Cols())) { - itkGenericExceptionMacro(<< "Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() - << ") cannot be added to a matrix with size (" << this->Rows() << ',' << this->Cols() - << ')'); + itkGenericExceptionMacro("Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() + << ") cannot be added to a matrix with size (" << this->Rows() << ',' + << this->Cols() << ')'); } for (unsigned int r = 0; r < this->Rows(); ++r) @@ -130,9 +130,9 @@ VariableSizeMatrix::operator-(const Self & matrix) const { if ((matrix.Rows() != this->Rows()) || (matrix.Cols() != this->Cols())) { - itkGenericExceptionMacro(<< "Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() - << ") cannot be subtracted from matrix with size (" << this->Rows() << ',' << this->Cols() - << ')'); + itkGenericExceptionMacro("Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() + << ") cannot be subtracted from matrix with size (" << this->Rows() + << ',' << this->Cols() << ')'); } Self result(this->Rows(), this->Cols()); @@ -155,9 +155,9 @@ VariableSizeMatrix::operator-=(const Self & matrix) { if ((matrix.Rows() != this->Rows()) || (matrix.Cols() != this->Cols())) { - itkGenericExceptionMacro(<< "Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() - << ") cannot be subtracted from matrix with size (" << this->Rows() << ',' << this->Cols() - << ')'); + itkGenericExceptionMacro("Matrix with size (" << matrix.Rows() << ',' << matrix.Cols() + << ") cannot be subtracted from matrix with size (" << this->Rows() + << ',' << this->Cols() << ')'); } for (unsigned int r = 0; r < this->Rows(); ++r) diff --git a/Modules/Core/Common/include/itkVersor.hxx b/Modules/Core/Common/include/itkVersor.hxx index eb680f12b44..04c8fce1c37 100644 --- a/Modules/Core/Common/include/itkVersor.hxx +++ b/Modules/Core/Common/include/itkVersor.hxx @@ -347,8 +347,8 @@ Versor::Set(const MatrixType & mat) itk::Math::abs(I[1][1] - itk::NumericTraits::OneValue()) > epsilonDiff || itk::Math::abs(I[2][2] - itk::NumericTraits::OneValue()) > epsilonDiff || vnl_det(I) < 0) { - itkGenericExceptionMacro(<< "The following matrix does not represent rotation to within an epsion of " << epsilon - << '.' << std::endl + itkGenericExceptionMacro("The following matrix does not represent rotation to within an epsion of " + << epsilon << '.' << std::endl << m << std::endl << "det(m * m transpose) is: " << vnl_det(I) << std::endl << "m * m transpose is:" << std::endl diff --git a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx index d9d1910f207..61cbe7b657d 100644 --- a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx +++ b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx @@ -211,13 +211,13 @@ WindowsMemoryUsageObserver::GetMemoryUsage() if (!m_hNTLib) { - itkGenericExceptionMacro(<< "Can't find ntdll.dll. " + itkGenericExceptionMacro("Can't find ntdll.dll. " << "You should probably disable SUPPORT_TOOLHELP32"); } // the ntdll.dll library could not have been opened (file not found?) if (!ZwQuerySystemInformation) { - itkGenericExceptionMacro(<< "The file ntdll.dll is not supported. " + itkGenericExceptionMacro("The file ntdll.dll is not supported. " << "You should probably disable SUPPORT_TOOLHELP32"); } @@ -365,7 +365,7 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() if ((fp = popen(command.str().c_str(), "r")) == nullptr) { - itkGenericExceptionMacro(<< "Error using pmap. Can execute pmap command"); + itkGenericExceptionMacro("Error using pmap. Can execute pmap command"); } char remaining[256]; int pmappid = -1; @@ -373,7 +373,7 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() // the first word shall be the process ID if (pmappid != pid) { - itkGenericExceptionMacro(<< "Error using pmap. 1st line output shall be PID: name"); + itkGenericExceptionMacro("Error using pmap. 1st line output shall be PID: name"); } bool heapNotFound = true; char address[64], perms[32]; @@ -404,13 +404,13 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() { if (ferror(fp)) { - itkGenericExceptionMacro(<< "Error using pmap. Corrupted pmap output"); + itkGenericExceptionMacro("Error using pmap. Corrupted pmap output"); } } } if (pclose(fp) == -1) { - itkGenericExceptionMacro(<< "Error using pmap. Can't close pmap output file."); + itkGenericExceptionMacro("Error using pmap. Can't close pmap output file."); } return mem; } diff --git a/Modules/Core/Common/src/itkMetaDataDictionary.cxx b/Modules/Core/Common/src/itkMetaDataDictionary.cxx index 4e71981155a..8edd058fd05 100644 --- a/Modules/Core/Common/src/itkMetaDataDictionary.cxx +++ b/Modules/Core/Common/src/itkMetaDataDictionary.cxx @@ -74,7 +74,7 @@ MetaDataDictionary::Get(const std::string & key) const { if (!this->HasKey(key)) { - itkGenericExceptionMacro(<< "Key '" << key << "' does not exist "); + itkGenericExceptionMacro("Key '" << key << "' does not exist "); } MetaDataObjectBase::Pointer entry = (*m_Dictionary)[key]; const MetaDataObjectBase * constentry = entry.GetPointer(); diff --git a/Modules/Core/Common/src/itkNumberToString.cxx b/Modules/Core/Common/src/itkNumberToString.cxx index e247bcaf09f..f9805da2b05 100644 --- a/Modules/Core/Common/src/itkNumberToString.cxx +++ b/Modules/Core/Common/src/itkNumberToString.cxx @@ -54,7 +54,7 @@ FloatingPointNumberToString(const TValue val) if (!ConvertToShortest(double_conversion::DoubleToStringConverter::EcmaScriptConverter(), val, builder)) { - itkGenericExceptionMacro(<< "Conversion failed for " << val); + itkGenericExceptionMacro("Conversion failed for " << val); } return std::string(builder.Finalize()); } diff --git a/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Modules/Core/Common/src/itkObjectFactoryBase.cxx index 0d3bd8d7581..2a1ac044771 100644 --- a/Modules/Core/Common/src/itkObjectFactoryBase.cxx +++ b/Modules/Core/Common/src/itkObjectFactoryBase.cxx @@ -559,7 +559,7 @@ ObjectFactoryBase::RegisterFactory(ObjectFactoryBase * factory, InsertionPositio { if (m_PimplGlobals->m_StrictVersionChecking) { - itkGenericExceptionMacro(<< "Incompatible factory version load attempt:" + itkGenericExceptionMacro("Incompatible factory version load attempt:" << "\nRunning itk version :\n" << Version::GetITKSourceVersion() << "\nAttempted loading factory version:\n" << factory->GetITKSourceVersion() << "\nAttempted factory:\n" diff --git a/Modules/Core/Common/src/itkSmapsFileParser.cxx b/Modules/Core/Common/src/itkSmapsFileParser.cxx index 13abdfc680b..9a2f2ce8d50 100644 --- a/Modules/Core/Common/src/itkSmapsFileParser.cxx +++ b/Modules/Core/Common/src/itkSmapsFileParser.cxx @@ -61,22 +61,22 @@ ITKCommon_EXPORT std::istream & stream >> address; if (!stream.good()) { - itkGenericExceptionMacro(<< "bad address: " << address); + itkGenericExceptionMacro("bad address: " << address); } stream >> perms; if (!stream.good()) { - itkGenericExceptionMacro(<< "bad perms: " << perms); + itkGenericExceptionMacro("bad perms: " << perms); } stream >> offset; if (!stream.good()) { - itkGenericExceptionMacro(<< "bad offset: " << offset); + itkGenericExceptionMacro("bad offset: " << offset); } stream >> device; if (!stream.good()) { - itkGenericExceptionMacro(<< "bad device: " << device); + itkGenericExceptionMacro("bad device: " << device); } stream >> inode; // name can be empty @@ -102,7 +102,7 @@ ITKCommon_EXPORT std::istream & std::getline(in, token); if (token != " kB" || !in.good()) { - itkGenericExceptionMacro(<< "bad size: " << record.m_Tokens[token]); + itkGenericExceptionMacro("bad size: " << record.m_Tokens[token]); } lastPos = in.tellg(); } @@ -111,7 +111,7 @@ ITKCommon_EXPORT std::istream & { record.Reset(); // propagate the exception - itkGenericExceptionMacro(<< "The smaps header is corrupted" << excp); + itkGenericExceptionMacro("The smaps header is corrupted" << excp); } return in; } @@ -133,7 +133,7 @@ ITKCommon_EXPORT std::istream & if (!in.good()) { - itkGenericExceptionMacro(<< "Bad record name: " << record.m_RecordName); + itkGenericExceptionMacro("Bad record name: " << record.m_RecordName); } std::string bracket; @@ -145,28 +145,28 @@ ITKCommon_EXPORT std::istream & if (!in.good() || bracket.find("[", 0) == std::string::npos) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad left bracket: " << bracket); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad left bracket: " << bracket); } in >> record.m_Tokens["Size"]; if (!in.good()) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad size: " << record.m_Tokens["Size"]); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad size: " << record.m_Tokens["Size"]); } in >> bracket; if (!in.good()) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad right bracket: " << bracket); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad right bracket: " << bracket); } } catch (const ExceptionObject & excp) { record.Reset(); // propagate the exception - itkGenericExceptionMacro(<< "The smaps header is corrupted" << excp); + itkGenericExceptionMacro("The smaps header is corrupted" << excp); } return in; } @@ -209,7 +209,7 @@ ITKCommon_EXPORT std::istream & if (!in.good()) { - itkGenericExceptionMacro(<< "Bad record name: " << record.m_RecordName); + itkGenericExceptionMacro("Bad record name: " << record.m_RecordName); } // skip Submap entries @@ -232,7 +232,7 @@ ITKCommon_EXPORT std::istream & if (!in.good()) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad address: " << address); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad address: " << address); } // If address is "[" then recordName was the address and there is name // for @@ -262,7 +262,7 @@ ITKCommon_EXPORT std::istream & } if (!in.good() || bracket.find("[", 0) == std::string::npos) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad left bracket: " << bracket); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad left bracket: " << bracket); } if (bracket.length() > 1) { // bracket contains the size, ie "[1024K]" @@ -275,19 +275,19 @@ ITKCommon_EXPORT std::istream & } if (!in.good()) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad size: " << record.m_Tokens["Size"]); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad size: " << record.m_Tokens["Size"]); } in.getline(line, 256); if (!in.good()) { - itkGenericExceptionMacro(<< "For record: " << record.m_RecordName << ", bad end of line: " << line); + itkGenericExceptionMacro("For record: " << record.m_RecordName << ", bad end of line: " << line); } } catch (const ExceptionObject & excp) { record.Reset(); // propagate the exception - itkGenericExceptionMacro(<< "The smaps header is corrupted" << excp); + itkGenericExceptionMacro("The smaps header is corrupted" << excp); } return in; } @@ -410,7 +410,7 @@ operator>>(std::istream & smapsStream, SmapsData_2_6 & data) // in case of error, erase the records. data.Reset(); // propagate the exception - itkGenericExceptionMacro(<< "The Smaps stream contains errors, can't read the memory records." << excp); + itkGenericExceptionMacro("The Smaps stream contains errors, can't read the memory records." << excp); } delete record; return smapsStream; @@ -487,7 +487,7 @@ operator>>(std::istream & stream, VMMapData_10_2 & data) } if (stream.fail()) { - itkGenericExceptionMacro(<< "Can't find the \"Writable regions\" section, can't read the memory records."); + itkGenericExceptionMacro("Can't find the \"Writable regions\" section, can't read the memory records."); } data.m_UsingSummary = false; } @@ -529,7 +529,7 @@ operator>>(std::istream & stream, VMMapData_10_2 & data) // in case of error, erase the records. data.Reset(); // propagate the exception - itkGenericExceptionMacro(<< "The VMMap stream contains errors, can't read the memory records." << excp); + itkGenericExceptionMacro("The VMMap stream contains errors, can't read the memory records." << excp); } // last record failed, it hasn't be added into data, delete it. delete record; diff --git a/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx b/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx index 58592e7d6cc..c81650e9592 100644 --- a/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx @@ -66,7 +66,7 @@ class ITK_TEMPLATE_EXPORT DummyImageSource : public ImageSource if (outputRegionForThread.GetIndex(0) == m_ExceptionIndex) { std::cout << "Exception launched" << std::endl; - itkGenericExceptionMacro(<< "Error"); + itkGenericExceptionMacro("Error"); } } diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx index 5e9ec106db1..956ee7b8dbe 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx @@ -194,7 +194,7 @@ FiniteDifferenceImageFilter::ResolveTimeStep(const st if (!flag) { // no values! - itkGenericExceptionMacro(<< "there is no satisfying value"); + itkGenericExceptionMacro("there is no satisfying value"); } t_it = timeStepList.begin(); diff --git a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx index ba82eb70943..1df11cc54da 100644 --- a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx +++ b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx @@ -282,7 +282,7 @@ GPUKernelManager::GetKernelWorkGroupInfo(int kernelIdx, cl_kernel_work_group_inf valueSize = sizeof(cl_ulong); break; default: - itkGenericExceptionMacro(<< "Unknown type of work goup information"); + itkGenericExceptionMacro("Unknown type of work goup information"); } cl_int errid = clGetKernelWorkGroupInfo( @@ -304,7 +304,7 @@ GPUKernelManager::GetDeviceInfo(cl_kernel_work_group_info paramName, size_t argS errid = clGetDeviceInfo(m_Manager->GetDeviceId(0), CL_DEVICE_MAX_WORK_ITEM_SIZES, argSize, argValue, nullptr); break; default: - itkGenericExceptionMacro(<< "Unknown type of device info"); + itkGenericExceptionMacro("Unknown type of device info"); } OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); diff --git a/Modules/Core/Mesh/include/itkMesh.hxx b/Modules/Core/Mesh/include/itkMesh.hxx index 4a32f6b6828..50613bb929e 100644 --- a/Modules/Core/Mesh/include/itkMesh.hxx +++ b/Modules/Core/Mesh/include/itkMesh.hxx @@ -1018,7 +1018,7 @@ Mesh::ReleaseCellsMemory() { // The user forgot to tell the mesh about how he allocated // the cells. No responsible guess can be made here. Call for help. - itkGenericExceptionMacro(<< "Cells Allocation Method was not specified. See SetCellsAllocationMethod()"); + itkGenericExceptionMacro("Cells Allocation Method was not specified. See SetCellsAllocationMethod()"); break; } case MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedAsStaticArray: diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx index 50ab66f940f..3804499f6e4 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx @@ -201,7 +201,7 @@ MetaSceneConverter::CreateSpatialObjectScene if (converterIt == this->m_ConverterMap.end()) { - itkGenericExceptionMacro(<< "Unable to find MetaObject -> SpatialObject converter for " << objectTypeName); + itkGenericExceptionMacro("Unable to find MetaObject -> SpatialObject converter for " << objectTypeName); } currentSO = converterIt->second->MetaObjectToSpatialObject(*it); } @@ -340,8 +340,7 @@ MetaSceneConverter::CreateMetaScene(const Sp auto converterIt = this->m_ConverterMap.find(spatialObjectTypeName); if (converterIt == this->m_ConverterMap.end()) { - itkGenericExceptionMacro(<< "Unable to find MetaObject -> SpatialObject converter for " - << spatialObjectTypeName); + itkGenericExceptionMacro("Unable to find MetaObject -> SpatialObject converter for " << spatialObjectTypeName); } currentMeta = converterIt->second->SpatialObjectToMetaObject(*it); } diff --git a/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx b/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx index 50cc35684d0..adbb0e42f88 100644 --- a/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx @@ -135,7 +135,7 @@ itkMetaArrowConverterTest(int argc, char * argv[]) auto * newMetaArrow = dynamic_cast(converter->SpatialObjectToMetaObject(itkArrow)); if (newMetaArrow == nullptr) { - itkGenericExceptionMacro(<< "Failed to downcast from MetaObject to MetaArrow"); + itkGenericExceptionMacro("Failed to downcast from MetaObject to MetaArrow"); } // check length diff --git a/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx b/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx index 27b3055a829..c995fd68e8b 100644 --- a/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx @@ -108,7 +108,7 @@ itkMetaGaussianConverterTest(int argc, char * argv[]) auto * newMetaGaussian = dynamic_cast(converter->SpatialObjectToMetaObject(GaussianSpatialObj)); if (newMetaGaussian == nullptr) { - itkGenericExceptionMacro(<< "Failed to downcast from GaussianSpatialObject to MetaGaussian"); + itkGenericExceptionMacro("Failed to downcast from GaussianSpatialObject to MetaGaussian"); } // Check maximum diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx index 33d1222354f..c320facbe07 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx @@ -141,7 +141,7 @@ DirectedHausdorffDistanceImageFilter::AfterThreadedG } else { - itkGenericExceptionMacro(<< "pixelcount is equal to 0"); + itkGenericExceptionMacro("pixelcount is equal to 0"); } m_DirectedHausdorffDistance = m_MaxDistance; diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx index d3daff4926f..c01ef96416e 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx @@ -341,7 +341,7 @@ IsoContourDistanceImageFilter::ComputeValue(const Inp } if (diff < NumericTraits::min()) { - itkGenericExceptionMacro(<< "diff " << diff << " < NumericTraits< PixelRealType >::min()"); + itkGenericExceptionMacro("diff " << diff << " < NumericTraits< PixelRealType >::min()"); continue; } diff --git a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx index ded7e7afd3f..742357ff648 100644 --- a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx +++ b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx @@ -106,7 +106,7 @@ FFTWGlobalConfiguration::GetPlanRigorValue(const std::string & name) { return FFTW_EXHAUSTIVE; } - itkGenericExceptionMacro(<< "Unknown plan rigor: " << name); + itkGenericExceptionMacro("Unknown plan rigor: " << name); } std::string @@ -123,7 +123,7 @@ FFTWGlobalConfiguration::GetPlanRigorName(const int value) case FFTW_EXHAUSTIVE: return "FFTW_EXHAUSTIVE"; default: - itkGenericExceptionMacro(<< "Unknown plan rigor: " << value); + itkGenericExceptionMacro("Unknown plan rigor: " << value); } } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx index 6cd79358c01..8bf8d6d3b59 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx @@ -112,14 +112,14 @@ FastMarchingQuadEdgeMeshFilterBase::UpdateNeighbors(OutputMeshT } else { - itkGenericExceptionMacro(<< "qe_it is nullptr"); + itkGenericExceptionMacro("qe_it is nullptr"); } qe_it = qe_it->GetOnext(); } while (qe_it != qe); } else { - itkGenericExceptionMacro(<< "qe is nullptr"); + itkGenericExceptionMacro("qe is nullptr"); } } @@ -135,7 +135,7 @@ FastMarchingQuadEdgeMeshFilterBase::UpdateValue(OutputMeshType if (F < 0.) { - itkGenericExceptionMacro(<< "F < 0."); + itkGenericExceptionMacro("F < 0."); } OutputQEType * qe = p.GetEdge(); @@ -195,7 +195,7 @@ FastMarchingQuadEdgeMeshFilterBase::UpdateValue(OutputMeshType else { // throw one exception here - itkGenericExceptionMacro(<< "qe_it2 is nullptr"); + itkGenericExceptionMacro("qe_it2 is nullptr"); } } while (qe_it != qe); @@ -211,7 +211,7 @@ FastMarchingQuadEdgeMeshFilterBase::UpdateValue(OutputMeshType else { // throw one exception - itkGenericExceptionMacro(<< "qe_it is nullptr"); + itkGenericExceptionMacro("qe_it is nullptr"); } } @@ -595,7 +595,7 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh if (cell->GetNumberOfPoints() != 3) { - itkGenericExceptionMacro(<< "Input mesh has non triangular faces"); + itkGenericExceptionMacro("Input mesh has non triangular faces"); } ++c_it; } diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx index 354a7033542..1e8f95e0177 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx @@ -242,7 +242,7 @@ BinaryFunctorImageFilter::D } else { - itkGenericExceptionMacro(<< "At most one of the inputs can be a constant."); + itkGenericExceptionMacro("At most one of the inputs can be a constant."); } } } // end namespace itk diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx index c68b9ea4691..f4d2945fd96 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx @@ -250,7 +250,7 @@ BinaryGeneratorImageFilter::DynamicThr } else { - itkGenericExceptionMacro(<< "At most one of the inputs can be a constant."); + itkGenericExceptionMacro("At most one of the inputs can be a constant."); } } } // end namespace itk diff --git a/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h index b3b2a87d7d5..28f6f77ba29 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT DivideImageFilter if (input != nullptr && itk::Math::AlmostEquals(input->Get(), itk::NumericTraits::ZeroValue())) { - itkGenericExceptionMacro(<< "The constant value used as denominator should not be set to zero"); + itkGenericExceptionMacro("The constant value used as denominator should not be set to zero"); } } }; diff --git a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx index d5007dc22b9..d47b76cf111 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx @@ -135,7 +135,7 @@ itkImageMomentsTest(int argc, char * argv[]) dynamic_cast *>(mask.GetPointer()); if (test.IsNull()) { - itkGenericExceptionMacro(<< "Failed conversion to SpatialObject base class."); + itkGenericExceptionMacro("Failed conversion to SpatialObject base class."); } moments->SetSpatialObjectMask(test.GetPointer()); } diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx index 2cfcfe84ae2..cfab9cb0db8 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx @@ -40,7 +40,7 @@ LabelObject::GetAttributeFromName(const std::string & s return LABEL; } // can't recognize the name - itkGenericExceptionMacro(<< "Unknown attribute: " << s); + itkGenericExceptionMacro("Unknown attribute: " << s); } template @@ -53,7 +53,7 @@ LabelObject::GetNameFromAttribute(const AttributeType & return "Label"; } // can't recognize the namespace - itkGenericExceptionMacro(<< "Unknown attribute: " << a); + itkGenericExceptionMacro("Unknown attribute: " << a); } /** @@ -254,7 +254,7 @@ LabelObject::GetIndex(SizeValueType offset) const -> In ++it; } - itkGenericExceptionMacro(<< "Invalid offset: " << offset); + itkGenericExceptionMacro("Invalid offset: " << offset); } /** Copy the lines from another node. */ diff --git a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx index 48d08ae0044..15599ba5e12 100644 --- a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx @@ -144,7 +144,7 @@ MergeLabelMapFilter::MergeWithStrict() } else { - itkGenericExceptionMacro(<< "Label " + itkGenericExceptionMacro("Label " << static_cast::PrintType>(newLo->GetLabel()) << " from input " << i << " is output background value."); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx index 2708d6bdaac..13e225d8b32 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx @@ -104,7 +104,7 @@ BorderQuadEdgeMeshFilter::ComputeLongestBorder() -> Inp if (!list || list->empty()) { - itkGenericExceptionMacro(<< "This filter requires at least one boundary"); + itkGenericExceptionMacro("This filter requires at least one boundary"); } InputCoordRepType max_length(0.0), length(0.0); @@ -154,7 +154,7 @@ BorderQuadEdgeMeshFilter::ComputeLargestBorder() -> Inp if (!list || list->empty()) { - itkGenericExceptionMacro(<< "This filter requires at least one boundary"); + itkGenericExceptionMacro("This filter requires at least one boundary"); } SizeValueType max_id = 0L; diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx index 45e77193145..a015020dc81 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.hxx @@ -93,7 +93,7 @@ IntermodesThresholdCalculator::GenerateData() if (smIter > m_MaximumSmoothingIterations) { - itkGenericExceptionMacro(<< "Exceeded maximum iterations for histogram smoothing."); + itkGenericExceptionMacro("Exceeded maximum iterations for histogram smoothing."); } } diff --git a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx index 6f333d6c7d3..578bd162f4d 100644 --- a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx @@ -121,7 +121,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() if (itk::Math::abs(As1) < itk::Math::eps) { - itkGenericExceptionMacro(<< "As1 = 0."); + itkGenericExceptionMacro("As1 = 0."); } while (threshold != Tprev) @@ -133,7 +133,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() if (itk::Math::abs(At) < itk::Math::eps) { - itkGenericExceptionMacro(<< "At = 0."); + itkGenericExceptionMacro("At = 0."); } double mu = Bt / At; @@ -152,17 +152,17 @@ KittlerIllingworthThresholdCalculator::GenerateData() if (sigma2 < itk::Math::eps) { - itkGenericExceptionMacro(<< "sigma2 <= 0"); + itkGenericExceptionMacro("sigma2 <= 0"); } if (itk::Math::abs(tau2) < itk::Math::eps) { - itkGenericExceptionMacro(<< "tau2 = 0"); + itkGenericExceptionMacro("tau2 = 0"); } if (itk::Math::abs(p) < itk::Math::eps) { - itkGenericExceptionMacro(<< "p = 0"); + itkGenericExceptionMacro("p = 0"); } // The terms of the quadratic equation to be solved. diff --git a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx index 6d525ee4590..a9855595375 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx @@ -373,7 +373,7 @@ DCMTKFileReader::LoadFile() { if (this->m_FileName.empty()) { - itkGenericExceptionMacro(<< "No filename given"); + itkGenericExceptionMacro("No filename given"); } delete this->m_DFile; this->m_DFile = new DcmFileFormat(); diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 7d39a8a5233..dab597e0f73 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -76,7 +76,7 @@ template H5::PredType GetType() { - itkGenericExceptionMacro(<< "Type not handled " + itkGenericExceptionMacro("Type not handled " << "in HDF5 File: " << typeid(TScalar).name()); } #define GetH5TypeSpecialize(CXXType, H5Type) \ @@ -159,7 +159,7 @@ GetH5TypeSpecialize(float, H5::PredType::NATIVE_FLOAT) GetH5TypeSpecialize(doubl { return IOComponentEnum::DOUBLE; } - itkGenericExceptionMacro(<< "unsupported HDF5 data type with id " << type.getId()); + itkGenericExceptionMacro("unsupported HDF5 data type with id " << type.getId()); } H5::PredType @@ -193,10 +193,10 @@ ComponentToPredType(IOComponentEnum cType) return H5::PredType::NATIVE_DOUBLE; case IOComponentEnum::LDOUBLE: case IOComponentEnum::UNKNOWNCOMPONENTTYPE: - itkGenericExceptionMacro(<< "unsupported IOComponentEnum" << static_cast(cType)); + itkGenericExceptionMacro("unsupported IOComponentEnum" << static_cast(cType)); } - itkGenericExceptionMacro(<< "unsupported IOComponentEnum" << static_cast(cType)); + itkGenericExceptionMacro("unsupported IOComponentEnum" << static_cast(cType)); } std::string @@ -242,7 +242,7 @@ ComponentToString(IOComponentEnum cType) rval = "DOUBLE"; break; default: - itkGenericExceptionMacro(<< "unsupported IOComponentEnum" << static_cast(cType)); + itkGenericExceptionMacro("unsupported IOComponentEnum" << static_cast(cType)); } return rval; } diff --git a/Modules/IO/ImageBase/include/itkIOTestHelper.h b/Modules/IO/ImageBase/include/itkIOTestHelper.h index 25a840e70ae..70560d6dc1e 100644 --- a/Modules/IO/ImageBase/include/itkIOTestHelper.h +++ b/Modules/IO/ImageBase/include/itkIOTestHelper.h @@ -125,12 +125,12 @@ class IOTestHelper } catch (...) { - itkGenericExceptionMacro(<< "IO library exception not converted to an itk::ExceptionObject."); + itkGenericExceptionMacro("IO library exception not converted to an itk::ExceptionObject."); } if (!exception_correctly_caught) { - itkGenericExceptionMacro(<< "Invalid file writing path did not throw an exception: " << bad_filename << " with " - << imageio->GetNameOfClass()); + itkGenericExceptionMacro("Invalid file writing path did not throw an exception: " << bad_filename << " with " + << imageio->GetNameOfClass()); } } } diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx index 5e74f3eabd2..70650e50787 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx @@ -92,7 +92,7 @@ SlopeInterceptTest() nifti_image_free(niftiImage); // Must free before throwing exception. if (nifti_write_status) { - itkGenericExceptionMacro(<< "ERROR: nifti library failed to write image" << filename); + itkGenericExceptionMacro("ERROR: nifti library failed to write image" << filename); } // diff --git a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx index 473d232f3f7..1c982b22fd2 100644 --- a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx +++ b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx @@ -129,7 +129,7 @@ TIFFReaderInternal::Initialize() if (!TIFFGetField(this->m_Image, TIFFTAG_TILEWIDTH, &this->m_TileWidth) || !TIFFGetField(this->m_Image, TIFFTAG_TILELENGTH, &this->m_TileHeight)) { - itkGenericExceptionMacro(<< "Cannot read tile width and tile length from file"); + itkGenericExceptionMacro("Cannot read tile width and tile length from file"); } else { diff --git a/Modules/IO/TransformBase/include/itkTransformIOBase.h b/Modules/IO/TransformBase/include/itkTransformIOBase.h index 52557ec153d..217fbf466de 100644 --- a/Modules/IO/TransformBase/include/itkTransformIOBase.h +++ b/Modules/IO/TransformBase/include/itkTransformIOBase.h @@ -145,7 +145,7 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformIOBaseTemplate : public LightP static inline void CorrectTransformPrecisionType(std::string & itkNotUsed(inputTransformName)) { - itkGenericExceptionMacro(<< "Unknown ScalarType" << typeid(ScalarType).name()); + itkGenericExceptionMacro("Unknown ScalarType" << typeid(ScalarType).name()); } protected: @@ -165,7 +165,7 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformIOBaseTemplate : public LightP static inline const std::string GetTypeNameString() { - itkGenericExceptionMacro(<< "Unknown ScalarType" << typeid(ScalarType).name()); + itkGenericExceptionMacro("Unknown ScalarType" << typeid(ScalarType).name()); } private: diff --git a/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx b/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx index 8155350fd39..891a10ce5f2 100644 --- a/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx +++ b/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx @@ -116,7 +116,7 @@ CompositeTransformIOHelperTemplate::GetTransformList(const this->BuildTransformList<6>(transform) == 0 && this->BuildTransformList<7>(transform) == 0 && this->BuildTransformList<8>(transform) == 0 && this->BuildTransformList<9>(transform) == 0) { - itkGenericExceptionMacro(<< "Unsupported Composite Transform Type " << transform->GetTransformTypeAsString()); + itkGenericExceptionMacro("Unsupported Composite Transform Type " << transform->GetTransformTypeAsString()); } return m_TransformList; } @@ -137,7 +137,7 @@ CompositeTransformIOHelperTemplate::SetTransformList(Trans this->InternalSetTransformList<8>(transform, transformList) == 0 && this->InternalSetTransformList<9>(transform, transformList) == 0) { - itkGenericExceptionMacro(<< "Unsupported Composite Transform Type " << transform->GetTransformTypeAsString()); + itkGenericExceptionMacro("Unsupported Composite Transform Type " << transform->GetTransformTypeAsString()); } } diff --git a/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx b/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx index 8f237090282..e69171576c9 100644 --- a/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx +++ b/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx @@ -206,7 +206,7 @@ struct TransformIOHelper OutputTransformPointer convertedTransform = dynamic_cast(i.GetPointer()); if (convertedTransform.IsNull()) { - itkGenericExceptionMacro(<< "Could not create an instance of " << transformName); + itkGenericExceptionMacro("Could not create an instance of " << transformName); } convertedTransform->UnRegister(); return convertedTransform; diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx index 9876bcadea4..625e26dca50 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx @@ -34,7 +34,7 @@ LinearSystemWrapperVNL::InitializeMatrix(unsigned int matrixIndex) m_Matrices = new MatrixHolder(m_NumberOfMatrices); if (m_Matrices == nullptr) { - itkGenericExceptionMacro(<< "LinearSystemWrapperVNL::InitializeMatrix(): m_Matrices allocation failed."); + itkGenericExceptionMacro("LinearSystemWrapperVNL::InitializeMatrix(): m_Matrices allocation failed."); } } @@ -44,8 +44,8 @@ LinearSystemWrapperVNL::InitializeMatrix(unsigned int matrixIndex) (*m_Matrices)[matrixIndex] = new MatrixRepresentation(this->GetSystemOrder(), this->GetSystemOrder()); if ((*m_Matrices)[matrixIndex] == nullptr) { - itkGenericExceptionMacro(<< "LinearSystemWrapperVNL::InitializeMatrix(): allocation of (*m_Matrices)[" - << matrixIndex << "] failed."); + itkGenericExceptionMacro("LinearSystemWrapperVNL::InitializeMatrix(): allocation of (*m_Matrices)[" << matrixIndex + << "] failed."); } } @@ -83,7 +83,7 @@ LinearSystemWrapperVNL::InitializeVector(unsigned int vectorIndex) m_Vectors = new std::vector *>(m_NumberOfVectors); if (m_Vectors == nullptr) { - itkGenericExceptionMacro(<< "InitializeVector(): m_Vectors memory allocation failed."); + itkGenericExceptionMacro("InitializeVector(): m_Vectors memory allocation failed."); } } @@ -93,7 +93,7 @@ LinearSystemWrapperVNL::InitializeVector(unsigned int vectorIndex) (*m_Vectors)[vectorIndex] = new vnl_vector(this->GetSystemOrder()); if ((*m_Vectors)[vectorIndex] == nullptr) { - itkGenericExceptionMacro(<< "InitializeVector(): allocation of (*m_Vectors)[" << vectorIndex << "] failed."); + itkGenericExceptionMacro("InitializeVector(): allocation of (*m_Vectors)[" << vectorIndex << "] failed."); } (*m_Vectors)[vectorIndex]->fill(0.0); } @@ -132,7 +132,7 @@ LinearSystemWrapperVNL::InitializeSolution(unsigned int solutionIndex) m_Solutions = new std::vector *>(m_NumberOfSolutions); if (m_Solutions == nullptr) { - itkGenericExceptionMacro(<< "InitializeSolution(): m_Solutions memory allocation failed."); + itkGenericExceptionMacro("InitializeSolution(): m_Solutions memory allocation failed."); } } @@ -142,7 +142,7 @@ LinearSystemWrapperVNL::InitializeSolution(unsigned int solutionIndex) (*m_Solutions)[solutionIndex] = new vnl_vector(this->GetSystemOrder()); if ((*m_Solutions)[solutionIndex] == nullptr) { - itkGenericExceptionMacro(<< "InitializeSolution(): allocation of (*m_olutions)[" << solutionIndex << "] failed."); + itkGenericExceptionMacro("InitializeSolution(): allocation of (*m_olutions)[" << solutionIndex << "] failed."); } (*m_Solutions)[solutionIndex]->fill(0.0); } diff --git a/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx b/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx index c23cdede6fa..6fdc0c6d3c5 100644 --- a/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx @@ -40,7 +40,7 @@ SingleValuedVnlCostFunctionAdaptorv4::f(const InternalParametersType & inparamet { if (!m_ObjectMetric) { - itkGenericExceptionMacro(<< "Attempt to use a SingleValuedVnlCostFunctionAdaptorv4 without any Metric plugge d in"); + itkGenericExceptionMacro("Attempt to use a SingleValuedVnlCostFunctionAdaptorv4 without any Metric plugge d in"); } // Use scales if they are provided diff --git a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx index 96630f9f291..6cf56016930 100644 --- a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx +++ b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx @@ -26,7 +26,7 @@ MultivariateLegendrePolynomial::MultivariateLegendrePolynomial(unsigned int { if (dimension > 3 || dimension < 2) { - itkGenericExceptionMacro(<< "MultivariateLegendrePolynomial only supports 2D and 3D"); + itkGenericExceptionMacro("MultivariateLegendrePolynomial only supports 2D and 3D"); } m_Dimension = dimension; diff --git a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx index cf31f8808dd..c50af28e1ba 100644 --- a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx +++ b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx @@ -252,7 +252,7 @@ FindSampleBound(const TSample * sample, const MeasurementVectorSizeType measurementSize = sample->GetMeasurementVectorSize(); if (measurementSize == 0) { - itkGenericExceptionMacro(<< "Length of a sample's measurement vector hasn't been set."); + itkGenericExceptionMacro("Length of a sample's measurement vector hasn't been set."); } // Sanity check MeasurementVectorTraits::Assert(max, measurementSize, "Length mismatch StatisticsAlgorithm::FindSampleBound"); @@ -260,7 +260,7 @@ FindSampleBound(const TSample * sample, if (sample->Size() == 0) { - itkGenericExceptionMacro(<< "Attempting to compute bounds of a sample list containing no measurement vectors"); + itkGenericExceptionMacro("Attempting to compute bounds of a sample list containing no measurement vectors"); } min = begin.GetMeasurementVector(); @@ -303,7 +303,7 @@ FindSampleBoundAndMean(const TSubsample * sample, const MeasurementVectorSizeType Dimension = sample->GetMeasurementVectorSize(); if (Dimension == 0) { - itkGenericExceptionMacro(<< "Length of a sample's measurement vector hasn't been set."); + itkGenericExceptionMacro("Length of a sample's measurement vector hasn't been set."); } Array sum(Dimension); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx index ba17b09f129..65f8936c2fe 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx @@ -72,7 +72,7 @@ BinaryImageToLevelSetImageAdaptorm_InputImage.IsNull()) { - itkGenericExceptionMacro(<< "m_InputImage is nullptr"); + itkGenericExceptionMacro("m_InputImage is nullptr"); } this->m_LabelMap = LevelSetLabelMapType::New(); @@ -349,7 +349,7 @@ BinaryImageToLevelSetImageAdaptorm_InputImage.IsNull()) { - itkGenericExceptionMacro(<< "m_InputImage is nullptr"); + itkGenericExceptionMacro("m_InputImage is nullptr"); } this->m_LabelMap = LevelSetLabelMapType::New(); @@ -492,7 +492,7 @@ BinaryImageToLevelSetImageAdaptorm_InputImage.IsNull()) { - itkGenericExceptionMacro(<< "m_InputImage is nullptr"); + itkGenericExceptionMacro("m_InputImage is nullptr"); } this->m_LabelMap = LevelSetLabelMapType::New(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx index d34afeb5bb1..4b66df7fac2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx @@ -38,7 +38,7 @@ LevelSetEquationContainer::AddEquation(const LevelSetIdentifierT { if (!iEquation->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "m_LevelSetContainer and iEquation->GetLevelSetContainer() are nullptr"); + itkGenericExceptionMacro("m_LevelSetContainer and iEquation->GetLevelSetContainer() are nullptr"); } } this->m_Container[iId] = iEquation; @@ -50,7 +50,7 @@ LevelSetEquationContainer::AddEquation(const LevelSetIdentifierT } else { - itkGenericExceptionMacro(<< "Term supplied is null"); + itkGenericExceptionMacro("Term supplied is null"); } } @@ -60,13 +60,13 @@ LevelSetEquationContainer::GetEquation(const LevelSetIdentifierT { if (this->m_Container.empty()) { - itkGenericExceptionMacro(<< "m_Container is empty"); + itkGenericExceptionMacro("m_Container is empty"); } auto it = this->m_Container.find(iId); if (it == this->m_Container.end()) { - itkGenericExceptionMacro(<< "this equation " << iId << " does not exist"); + itkGenericExceptionMacro("this equation " << iId << " does not exist"); } return it->second; } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx index fbf261b7b98..c3ff7e06122 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx @@ -73,7 +73,7 @@ LevelSetEquationCurvatureTerm::Init { if (m_CurvatureImage.IsNull()) { - itkGenericExceptionMacro(<< "m_UseCurvatureImage is true and m_CurvatureImage is null"); + itkGenericExceptionMacro("m_UseCurvatureImage is true and m_CurvatureImage is null"); } } } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx index 019640a506f..824f9b217ca 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx @@ -56,7 +56,7 @@ LevelSetEquationTermBase::SetLevelSetContainer( } else { - itkGenericExceptionMacro(<< "iContainer is nullptr"); + itkGenericExceptionMacro("iContainer is nullptr"); } } @@ -106,7 +106,7 @@ LevelSetEquationTermBase::SetUp() { if (this->m_LevelSetContainer.IsNull()) { - itkGenericExceptionMacro(<< "m_LevelSetContainer is nullptr"); + itkGenericExceptionMacro("m_LevelSetContainer is nullptr"); } this->m_CurrentLevelSetPointer = this->m_LevelSetContainer->GetLevelSet(this->m_CurrentLevelSetId); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx index 5c097a0015b..a9d8c85dfd0 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx @@ -78,7 +78,7 @@ LevelSetEquationTermContainer::AddTerm(const Te } else { - itkGenericExceptionMacro(<< "m_Input and iTerm->GetInput are nullptr"); + itkGenericExceptionMacro("m_Input and iTerm->GetInput are nullptr"); } } iTerm->SetCurrentLevelSetId(this->m_CurrentLevelSetId); @@ -91,7 +91,7 @@ LevelSetEquationTermContainer::AddTerm(const Te { if (!iTerm->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr"); + itkGenericExceptionMacro("m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr"); } } @@ -114,7 +114,7 @@ LevelSetEquationTermContainer::AddTerm(const Te } else { - itkGenericExceptionMacro(<< "Term supplied is null"); + itkGenericExceptionMacro("Term supplied is null"); } } @@ -133,7 +133,7 @@ LevelSetEquationTermContainer::PushTerm(TermTyp } else { - itkGenericExceptionMacro(<< "m_Input and iTerm->GetInput are nullptr"); + itkGenericExceptionMacro("m_Input and iTerm->GetInput are nullptr"); } } @@ -147,7 +147,7 @@ LevelSetEquationTermContainer::PushTerm(TermTyp { if (!iTerm->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr"); + itkGenericExceptionMacro("m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr"); } } @@ -173,7 +173,7 @@ LevelSetEquationTermContainer::PushTerm(TermTyp } else { - itkGenericExceptionMacro(<< "Term supplied is null"); + itkGenericExceptionMacro("Term supplied is null"); } } @@ -186,7 +186,7 @@ LevelSetEquationTermContainer::GetTerm(const st if (it == m_Container.end()) { - itkGenericExceptionMacro(<< "the term " << iName.c_str() << " is not present in the container"); + itkGenericExceptionMacro("the term " << iName.c_str() << " is not present in the container"); } return it->second; @@ -201,7 +201,7 @@ LevelSetEquationTermContainer::GetTerm(const Te if (it == m_Container.end()) { - itkGenericExceptionMacro(<< "the term " << iId << " is not present in the container"); + itkGenericExceptionMacro("the term " << iId << " is not present in the container"); } return it->second; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx index d45bb1b5715..883e99f5d13 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx @@ -128,17 +128,17 @@ LevelSetEvolution>::ComputeTimeSt { if (Math::ExactlyEquals(contribution, NumericTraits::max())) { - itkGenericExceptionMacro(<< "contribution is " << contribution); + itkGenericExceptionMacro("contribution is " << contribution); } else { - itkGenericExceptionMacro(<< "contribution is too low"); + itkGenericExceptionMacro("contribution is too low"); } } } else { - itkGenericExceptionMacro(<< "m_Alpha should be in ]0,1["); + itkGenericExceptionMacro("m_Alpha should be in ]0,1["); } } } @@ -304,17 +304,17 @@ LevelSetEvolution::max())) { - itkGenericExceptionMacro(<< "contribution is " << contribution); + itkGenericExceptionMacro("contribution is " << contribution); } else { - itkGenericExceptionMacro(<< "contribution is too low " << contribution); + itkGenericExceptionMacro("contribution is too low " << contribution); } } } else { - itkGenericExceptionMacro(<< "m_Alpha should be in ]0,1["); + itkGenericExceptionMacro("m_Alpha should be in ]0,1["); } } } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx index 293d100ab9a..8565d1580bc 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx @@ -45,7 +45,7 @@ LevelSetEvolutionBase::SetTimeStep(const LevelSet } else { - itkGenericExceptionMacro(<< "iDt should be > epsilon"); + itkGenericExceptionMacro("iDt should be > epsilon"); } } @@ -66,28 +66,28 @@ LevelSetEvolutionBase::CheckSetUp() { if (this->m_LevelSetContainer.IsNull()) { - itkGenericExceptionMacro(<< "this->m_LevelSetContainer is nullptr"); + itkGenericExceptionMacro("this->m_LevelSetContainer is nullptr"); } if (this->m_EquationContainer.IsNull()) { - itkGenericExceptionMacro(<< "m_EquationContainer is nullptr"); + itkGenericExceptionMacro("m_EquationContainer is nullptr"); } typename EquationContainerType::Iterator eqIt = this->m_EquationContainer->Begin(); if (eqIt == this->m_EquationContainer->End()) { - itkGenericExceptionMacro(<< "this->m_EquationContainer is empty"); + itkGenericExceptionMacro("this->m_EquationContainer is empty"); } if (!eqIt->GetEquation()) { - itkGenericExceptionMacro(<< "m_EquationContainer->GetEquation( 0 ) is nullptr"); + itkGenericExceptionMacro("m_EquationContainer->GetEquation( 0 ) is nullptr"); } if (this->m_LevelSetContainer != this->m_EquationContainer->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "this->m_LevelSetContainer != this->m_EquationContainer->GetLevelSetContainer()" + itkGenericExceptionMacro("this->m_LevelSetContainer != this->m_EquationContainer->GetLevelSetContainer()" << std::endl << this->m_LevelSetContainer.GetPointer() << " != " << this->m_EquationContainer->GetLevelSetContainer() << std::endl); @@ -98,7 +98,7 @@ LevelSetEvolutionBase::CheckSetUp() if (inputImage.IsNull()) { - itkGenericExceptionMacro(<< "input Image is nullptr"); + itkGenericExceptionMacro("input Image is nullptr"); } // Get the LevelSetContainer from the EquationContainer @@ -107,24 +107,24 @@ LevelSetEvolutionBase::CheckSetUp() if (termIt == termContainer->End()) { - itkGenericExceptionMacro(<< "TermContainer is empty"); + itkGenericExceptionMacro("TermContainer is empty"); } if (this->m_LevelSetContainer != termContainer->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "this->m_LevelSetContainer != termContainer->GetLevelSetContainer()"); + itkGenericExceptionMacro("this->m_LevelSetContainer != termContainer->GetLevelSetContainer()"); } TermPointer term = termIt->GetTerm(); if (this->m_LevelSetContainer != term->GetLevelSetContainer()) { - itkGenericExceptionMacro(<< "this->m_LevelSetContainer != term->GetLevelSetContainer()"); + itkGenericExceptionMacro("this->m_LevelSetContainer != term->GetLevelSetContainer()"); } if (this->m_StoppingCriterion.IsNull()) { - itkGenericExceptionMacro(<< "m_StoppingCriterion is nullptr"); + itkGenericExceptionMacro("m_StoppingCriterion is nullptr"); } this->m_NumberOfIterations = 0; @@ -162,7 +162,7 @@ LevelSetEvolutionBase::InitializeIteration() if (idList->empty()) { - itkGenericExceptionMacro(<< "No level set exists at voxel"); + itkGenericExceptionMacro("No level set exists at voxel"); } auto idListIt = idList->begin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx index de457fed8e0..86367894cc1 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx @@ -94,7 +94,7 @@ LevelSetSparseImage::GetLayer(LayerIdType value) const -> c auto it = m_Layers.find(value); if (it == m_Layers.end()) { - itkGenericExceptionMacro(<< "This layer does not exist"); + itkGenericExceptionMacro("This layer does not exist"); } return it->second; } @@ -107,7 +107,7 @@ LevelSetSparseImage::GetLayer(LayerIdType value) -> LayerTy auto it = m_Layers.find(value); if (it == m_Layers.end()) { - itkGenericExceptionMacro(<< "This layer does not exist"); + itkGenericExceptionMacro("This layer does not exist"); } return it->second; } @@ -168,7 +168,7 @@ LevelSetSparseImage::GetAsLabelObject() if (this->m_InternalLabelList.empty()) { - itkGenericExceptionMacro(<< "this->m_InternalLabelList empty"); + itkGenericExceptionMacro("this->m_InternalLabelList empty"); } auto lIt = this->m_InternalLabelList.begin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx index e6091a1ada9..557bc5552c2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx @@ -62,7 +62,7 @@ MalcolmSparseLevelSetImage::Evaluate(const InputType & inputPixel) c } else { - itkGenericExceptionMacro(<< "status " << static_cast(status) << " should be 1 or -1"); + itkGenericExceptionMacro("status " << static_cast(status) << " should be 1 or -1"); } } } @@ -73,7 +73,7 @@ auto MalcolmSparseLevelSetImage::EvaluateHessian(const InputType & inputPixel) const -> HessianType { (void)inputPixel; - itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" + itkGenericExceptionMacro("The approximation of the hessian in the Malcolm's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" @@ -87,7 +87,7 @@ auto MalcolmSparseLevelSetImage::EvaluateLaplacian(const InputType & inputPixel) const -> OutputRealType { (void)inputPixel; - itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" + itkGenericExceptionMacro("The approximation of the hessian in the Malcolm's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" @@ -101,7 +101,7 @@ auto MalcolmSparseLevelSetImage::EvaluateMeanCurvature(const InputType & inputPixel) const -> OutputRealType { (void)inputPixel; - itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" + itkGenericExceptionMacro("The approximation of the hessian in the Malcolm's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" diff --git a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx index d214d7be2f0..2d1c9570b24 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx @@ -62,7 +62,7 @@ ShiSparseLevelSetImage::Evaluate(const InputType & inputIndex) const } else { - itkGenericExceptionMacro(<< "status " << static_cast(status) << " should be 3 or -3"); + itkGenericExceptionMacro("status " << static_cast(status) << " should be 3 or -3"); } } } @@ -72,7 +72,7 @@ template auto ShiSparseLevelSetImage::EvaluateHessian(const InputType & itkNotUsed(inputIndex)) const -> HessianType { - itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" + itkGenericExceptionMacro("The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" @@ -84,7 +84,7 @@ template auto ShiSparseLevelSetImage::EvaluateLaplacian(const InputType & itkNotUsed(inputIndex)) const -> OutputRealType { - itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" + itkGenericExceptionMacro("The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" @@ -97,7 +97,7 @@ auto ShiSparseLevelSetImage::EvaluateMeanCurvature(const InputType & itkNotUsed(inputIndex)) const -> OutputRealType { - itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" + itkGenericExceptionMacro("The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." << " If it was required for regularization purpose, " << " you better check recommended regularization methods" diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx index a6218c92c29..3a4ca59e6e5 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx @@ -42,7 +42,7 @@ UpdateMalcolmSparseLevelSet::Update() { if (this->m_InputLevelSet.IsNull()) { - itkGenericExceptionMacro(<< "m_InputLevelSet is nullptr"); + itkGenericExceptionMacro("m_InputLevelSet is nullptr"); } this->m_Offset = this->m_InputLevelSet->GetDomainOffset(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx index 953a02fc5dc..257ec0ad09e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx @@ -39,7 +39,7 @@ UpdateShiSparseLevelSet::Update() { if (this->m_InputLevelSet.IsNull()) { - itkGenericExceptionMacro(<< "m_InputLevelSet is nullptr"); + itkGenericExceptionMacro("m_InputLevelSet is nullptr"); } this->m_Offset = this->m_InputLevelSet->GetDomainOffset(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx index 2e173d7ff6a..b546b7fc6a6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx @@ -50,11 +50,11 @@ UpdateWhitakerSparseLevelSet { if (this->m_InputLevelSet.IsNull()) { - itkGenericExceptionMacro(<< "m_InputLevelSet is nullptr"); + itkGenericExceptionMacro("m_InputLevelSet is nullptr"); } if (this->m_Update.empty()) { - itkGenericExceptionMacro(<< "m_Update is empty"); + itkGenericExceptionMacro("m_Update is empty"); } this->m_Offset = this->m_InputLevelSet->GetDomainOffset(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx index d72650eee03..c886beaefe4 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx @@ -68,13 +68,13 @@ WhitakerSparseLevelSetImage::Evaluate(const InputType & inp } else { - itkGenericExceptionMacro(<< "status " << static_cast(status) << " should be 3 or -3"); + itkGenericExceptionMacro("status " << static_cast(status) << " should be 3 or -3"); } } } else { - itkGenericExceptionMacro(<< "Note: m_LabelMap is nullptr"); + itkGenericExceptionMacro("Note: m_LabelMap is nullptr"); } } return rval; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx index 710a33c360f..7e623ff4944 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx @@ -168,7 +168,7 @@ SegmentTreeGenerator::CompileMergeList(SegmentTableTypePointer segments if (segment_ptr->second.edge_list.empty()) { // This is to defend against the referencing below. This was causing an assert error. - itkGenericExceptionMacro(<< "CompileMergeList:: An unexpected and fatal error has occurred."); + itkGenericExceptionMacro("CompileMergeList:: An unexpected and fatal error has occurred."); } labelTO = m_MergedSegmentsTable->RecursiveLookup(segment_ptr->second.edge_list.front().label); while (labelTO == labelFROM) // Pop off any bogus merges with ourself @@ -307,7 +307,7 @@ SegmentTreeGenerator::PruneMergeSegments(SegmentTableTypePointer if (from_seg == 0 || to_seg == 0) { - itkGenericExceptionMacro(<< "PruneMergeSegments:: An unexpected and fatal error has occurred."); + itkGenericExceptionMacro("PruneMergeSegments:: An unexpected and fatal error has occurred."); } // Compare the minimum values. @@ -444,8 +444,8 @@ SegmentTreeGenerator::MergeSegments(SegmentTableTypePointer s if (from_seg == nullptr || to_seg == nullptr) { - itkGenericExceptionMacro(<< "itk::watershed::SegmentTreeGenerator::MergeSegments:: An unexpected and fatal error " - "has occurred. This is probably the result of overthresholding of the input image."); + itkGenericExceptionMacro("itk::watershed::SegmentTreeGenerator::MergeSegments:: An unexpected and fatal error " + "has occurred. This is probably the result of overthresholding of the input image."); } // Compare the minimum values. diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx index 67e65617951..d70351a8c3c 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx @@ -1017,7 +1017,7 @@ Segmenter::UpdateSegmentTable(InputImageTypePointer input, ImageReg segment_ptr = segments->Lookup(edge_table_entry_ptr->first); if (segment_ptr == nullptr) { - itkGenericExceptionMacro(<< "UpdateSegmentTable:: An unexpected and fatal error has occurred."); + itkGenericExceptionMacro("UpdateSegmentTable:: An unexpected and fatal error has occurred."); } // Copy into the segment list @@ -1135,7 +1135,7 @@ Segmenter::MergeFlatRegions(flat_region_table_t & regions, Equivale { if (((a = regions.find(it->first)) == regions.end()) || ((b = regions.find(it->second)) == regions.end())) { - itkGenericExceptionMacro(<< "MergeFlatRegions:: An unexpected and fatal error has occurred."); + itkGenericExceptionMacro("MergeFlatRegions:: An unexpected and fatal error has occurred."); } if (a->second.bounds_min < b->second.bounds_min)