Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/GTesting/elxTransformIOGTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ struct WithDimension
catch (const itk::ExceptionObject & exceptionObject)
{
// TODO Avoid this exception!
EXPECT_NE(std::strstr(exceptionObject.GetDescription(), "ERROR: Missing -labels argument!"), nullptr);
EXPECT_NE(std::strstr(exceptionObject.GetDescription(), "Missing -labels argument!"), nullptr);
}

WithElastixTransform<RecursiveBSplineTransform>::Test_CreateTransformParameterMap_for_default_transform(
Expand Down
2 changes: 1 addition & 1 deletion Common/ImageSamplers/itkImageGridSampler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ ImageGridSampler<TInputImage>::SetNumberOfSamples(unsigned long nrofsamples)
/** This function assumes that the input has been set. */
if (!this->GetInput())
{
itkExceptionMacro("ERROR: only call the function SetNumberOfSamples() after the input has been set.");
itkExceptionMacro("only call the function SetNumberOfSamples() after the input has been set.");
}

/** Compute an isotropic grid spacing (in voxels),
Expand Down
4 changes: 2 additions & 2 deletions Common/ImageSamplers/itkImageRandomSamplerSparseMask.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ImageRandomSamplerSparseMask<TInputImage>::GenerateData()
/** Sanity check. */
if (mask == nullptr)
{
itkExceptionMacro("ERROR: do not call this function when no mask is supplied. When using the "
itkExceptionMacro("do not call this function when no mask is supplied. When using the "
"ImageRandomSamplerSparseMask sampler, a mask is required. Otherwise you may consider using a "
"sampler that does not require a mask, for example, ImageRandomSampler.");
}
Expand All @@ -66,7 +66,7 @@ ImageRandomSamplerSparseMask<TInputImage>::GenerateData()
}
catch (const ExceptionObject & err)
{
itkExceptionMacro("ERROR: This ImageSampler internally uses the ImageFullSampler. Updating of this internal "
itkExceptionMacro("This ImageSampler internally uses the ImageFullSampler. Updating of this internal "
"sampler raised the exception:\n"
<< err.GetDescription());
}
Expand Down
4 changes: 2 additions & 2 deletions Common/ImageSamplers/itkImageSamplerBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ImageSamplerBase<TInputImage>::GenerateInputRequestedRegion()
/** Check if input image was set. */
if (this->GetNumberOfInputs() == 0)
{
itkExceptionMacro("ERROR: Input image not set");
itkExceptionMacro("Input image not set");
}

/** Get a non-const reference to the input image. */
Expand Down Expand Up @@ -360,7 +360,7 @@ ImageSamplerBase<TInputImage>::CropInputImageRegion()
*/
if (!cropped)
{
itkExceptionMacro("ERROR: the bounding box of the mask lies entirely out of the InputImageRegion!");
itkExceptionMacro("the bounding box of the mask lies entirely out of the InputImageRegion!");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MultiInputImageRandomCoordinateSampler<TInputImage>::GenerateData()
/** Check. */
if (!this->CheckInputImageRegions())
{
itkExceptionMacro("ERROR: at least one of the InputImageRegions is not a subregion of the LargestPossibleRegion");
itkExceptionMacro("at least one of the InputImageRegions is not a subregion of the LargestPossibleRegion");
}

/** Get handles to the input image, output sample container, and mask. */
Expand Down Expand Up @@ -141,7 +141,7 @@ MultiInputImageRandomCoordinateSampler<TInputImage>::GenerateSampleRegion(
/** Check. */
if (numberOfRegions != numberOfInputs && numberOfRegions != 1)
{
itkExceptionMacro("ERROR: The number of regions should be 1 or the number of inputs.");
itkExceptionMacro("The number of regions should be 1 or the number of inputs.");
}

using DirectionType = typename InputImageType::DirectionType;
Expand All @@ -153,7 +153,7 @@ MultiInputImageRandomCoordinateSampler<TInputImage>::GenerateSampleRegion(
DirectionType diri = this->GetInput(i)->GetDirection();
if (diri != dir0)
{
itkExceptionMacro("ERROR: All input images should have the same direction cosines matrix.");
itkExceptionMacro("All input images should have the same direction cosines matrix.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GPUAdvancedCombinationTransformCopier<TTypeList,
{
if (!this->m_InputTransform)
{
itkExceptionMacro("ERROR: m_InputTransform not set");
itkExceptionMacro("m_InputTransform not set");
}

// Update only if the input AdvancedCombinationTransform has been modified
Expand Down Expand Up @@ -107,7 +107,7 @@ GPUAdvancedCombinationTransformCopier<TTypeList,
if (!copySucceeded)
{
itkExceptionMacro(
"ERROR: GPUAdvancedCombinationTransformCopier was unable to copy transform from: " << this->m_InputTransform);
"GPUAdvancedCombinationTransformCopier was unable to copy transform from: " << this->m_InputTransform);
}

// skip next step when last transform
Expand Down
16 changes: 8 additions & 8 deletions Common/ParameterFileParser/itkParameterFileParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace
void
ThrowException(const std::string & line, const std::string & hint)
{
itkGenericExceptionMacro("ERROR: the following line in your parameter file is invalid: \n\""
itkGenericExceptionMacro("the following line in your parameter file is invalid: \n\""
<< line + "\"\n"
<< hint << "\nPlease correct you parameter file!");

Expand Down Expand Up @@ -250,28 +250,28 @@ BasicFileChecking(const std::string & parameterFileName)
/** Check if the file name is given. */
if (parameterFileName.empty())
{
itkGenericExceptionMacro("ERROR: FileName has not been set.");
itkGenericExceptionMacro("FileName has not been set.");
}

/** Basic error checking: existence. */
const bool exists = itksys::SystemTools::FileExists(parameterFileName);
if (!exists)
{
itkGenericExceptionMacro("ERROR: the file " << parameterFileName << " does not exist.");
itkGenericExceptionMacro("the file " << parameterFileName << " does not exist.");
}

/** Basic error checking: file or directory. */
const bool isDir = itksys::SystemTools::FileIsDirectory(parameterFileName);
if (isDir)
{
itkGenericExceptionMacro("ERROR: the file " << parameterFileName << " is a directory.");
itkGenericExceptionMacro("the file " << parameterFileName << " is a directory.");
}

/** Check the extension. */
if (!ParameterFileParser::HasParameterFileNameExtension(parameterFileName))
{
itkGenericExceptionMacro("ERROR: the file " << parameterFileName
<< " should be a text file (*.txt) or a TOML file (*.toml).");
itkGenericExceptionMacro("the file " << parameterFileName
<< " should be a text file (*.txt) or a TOML file (*.toml).");
}

} // end BasicFileChecking()
Expand Down Expand Up @@ -476,7 +476,7 @@ ParameterFileParser::ReadParameterFile()
/** Check if it opened. */
if (!parameterFile.is_open())
{
itkExceptionMacro("ERROR: could not open " << m_ParameterFileName << " for reading.");
itkExceptionMacro("could not open " << m_ParameterFileName << " for reading.");
}

ReadParameterMapFromInputStream(m_ParameterMap, parameterFile);
Expand All @@ -501,7 +501,7 @@ ParameterFileParser::ReturnParameterFileAsString(const std::string & fileName)
/** Check if it opened. */
if (!parameterFile.is_open())
{
itkGenericExceptionMacro("ERROR: could not open " << fileName << " for reading.");
itkGenericExceptionMacro("could not open " << fileName << " for reading.");
}

/** Loop over the parameter file, line by line. */
Expand Down
2 changes: 1 addition & 1 deletion Common/ParameterFileParser/itkParameterMapInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ParameterMapInterface::ReadParameter(bool & parameterValue,
if (!elastix::Conversion::StringToValue(parameterValueString, parameterValue))
{
/** Trying to read a string other than "true" or "false" as a boolean. */
itkGenericExceptionMacro("ERROR: Entry number "
itkGenericExceptionMacro("Entry number "
<< entry_nr << " for the parameter \"" << parameterName
<< "\" should be a boolean, i.e. either \"true\" or \"false\", but it reads \""
<< parameterValueString << "\".");
Expand Down
4 changes: 2 additions & 2 deletions Common/ParameterFileParser/itkParameterMapInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ParameterMapInterface
/** Check if the cast was successful. */
if (!castSuccesful)
{
itkGenericExceptionMacro("ERROR: Casting entry number "
itkGenericExceptionMacro("Casting entry number "
<< entry_nr << " for the parameter \"" << parameterName << "\" failed!\n"
<< " You tried to cast \"" << vec[entry_nr] << "\" from std::string to "
<< typeid(parameterValue).name() << '\n');
Expand Down Expand Up @@ -360,7 +360,7 @@ class ParameterMapInterface
/** Check if the cast was successful. */
if (!castSuccesful)
{
itkGenericExceptionMacro("ERROR: Casting entry number "
itkGenericExceptionMacro("Casting entry number "
<< i << " for the parameter \"" << parameterName << "\" failed!\n"
<< " You tried to cast \"" << vec[i] << "\" from std::string to "
<< typeid(parameterValues[0]).name() << '\n');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT AdvancedBSplineDeformableTransformBase
return TBSplineDeformableTransform<TScalarType, NDimensions, 3>::New();
}
}
itkGenericExceptionMacro("ERROR: The provided spline order (" << splineOrder << ") is not supported.");
itkGenericExceptionMacro("The provided spline order (" << splineOrder << ") is not supported.");
}


Expand Down
2 changes: 1 addition & 1 deletion Common/Transforms/itkAdvancedCombinationTransform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ AdvancedCombinationTransform<TScalarType, NDimensions>::GetInverse(Self * invers
* the initial and the current transforms are defined.
*/

itkExceptionMacro("ERROR: not implemented");
itkExceptionMacro("not implemented");

// /** Try create the inverse of the initial transform. */
// InitialTransformPointer inverseT0 = InitialTransformType::New();
Expand Down
3 changes: 1 addition & 2 deletions Common/Transforms/itkGridScheduleComputer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ GridScheduleComputer<TTransformScalarType, VImageDimension>::GetBSplineGrid(unsi
/** Check level. */
if (level > m_NumberOfLevels - 1)
{
itkExceptionMacro("ERROR: Requesting resolution level " << level << ", but only " << m_NumberOfLevels
<< " levels exist.");
itkExceptionMacro("Requesting resolution level " << level << ", but only " << m_NumberOfLevels << " levels exist.");
}

/** Return values. */
Expand Down
2 changes: 1 addition & 1 deletion Common/itkAdvancedLinearInterpolateImageFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class ITK_TEMPLATE_EXPORT AdvancedLinearInterpolateImageFunction
void
EvaluateValueAndDerivativeUnOptimized(const ContinuousIndexType &, OutputType &, CovariantVectorType &) const
{
itkExceptionMacro("ERROR: EvaluateValueAndDerivativeAtContinuousIndex() is not implemented for this dimension ("
itkExceptionMacro("EvaluateValueAndDerivativeAtContinuousIndex() is not implemented for this dimension ("
<< ImageDimension << ").");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ComputePreconditionerUsingDisplacementDistribution<TFixedImage, TTransform>::Com
double &,
std::string)
{
itkExceptionMacro("ERROR: do not call");
itkExceptionMacro("do not call");
} // end Compute()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RandomCoordinateSampler<TElastix>::BeforeEachResolution()
{
if (sampleRegionSize[i] > (fixedImageSize[i] - 1) * fixedImageSpacing[i])
{
itkExceptionMacro("ERROR: in your parameter file you selected\n"
itkExceptionMacro("in your parameter file you selected\n"
<< " SampleRegionSize[ " << i << " ] = " << sampleRegionSize[i]
<< " mm,\n while the fixed image size at dim = " << i << " is " << fixedImageSize[i]
<< " voxels or " << fixedImageSize[i] * fixedImageSpacing[i] << " mm.\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ CorrespondingPointsEuclideanDistanceMetric<TElastix>::BeforeRegistration()
}
else
{
itkExceptionMacro("ERROR: the fixed pointset is not specified!");
itkExceptionMacro("the fixed pointset is not specified!");
}

if (movingPointSet)
Expand All @@ -156,7 +156,7 @@ CorrespondingPointsEuclideanDistanceMetric<TElastix>::BeforeRegistration()
}
else
{
itkExceptionMacro("ERROR: the moving pointset is not specified!");
itkExceptionMacro("the moving pointset is not specified!");
}

const itk::SizeValueType nrOfFixedPoints = fixedPointSet->GetNumberOfPoints();
Expand All @@ -165,7 +165,7 @@ CorrespondingPointsEuclideanDistanceMetric<TElastix>::BeforeRegistration()
/** Check. */
if (nrOfFixedPoints != nrOfMovingPoints)
{
itkExceptionMacro("ERROR: the number of points in the fixed pointset ("
itkExceptionMacro("the number of points in the fixed pointset ("
<< nrOfFixedPoints << ") does not match that of the moving pointset (" << nrOfMovingPoints
<< "). The points do not correspond. ");
}
Expand Down Expand Up @@ -202,7 +202,7 @@ CorrespondingPointsEuclideanDistanceMetric<TElastix>::ReadLandmarks(const std::s
catch (const itk::ExceptionObject & err)
{
log::error(std::ostringstream{} << " Error while opening " << landmarkFileName << '\n' << err);
itkExceptionMacro("ERROR: unable to configure " << this->GetComponentLabel());
itkExceptionMacro("unable to configure " << this->GetComponentLabel());
}

/** Some user-feedback. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ DistancePreservingRigidityPenaltyTerm<TFixedImage, TScalarType>::Initialize()
/** Set the B-spline transform to m_RigidityPenaltyTermMetric. */
if (!transformIsBSpline)
{
itkExceptionMacro("ERROR: this metric expects a B-spline transform.");
itkExceptionMacro("this metric expects a B-spline transform.");
}

/** Initialize BSplineKnotImage. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ GradientDifferenceImageToImageMetric<TFixedImage, TMovingImage>::Initialize()
}
else
{
itkExceptionMacro("ERROR: the NormalizedGradientCorrelationImageToImageMetric is currently only suitable for "
itkExceptionMacro("the NormalizedGradientCorrelationImageToImageMetric is currently only suitable for "
"2D-3D registration.\n"
<< " Therefore it expects an interpolator of type RayCastInterpolator.");
}
Expand Down
8 changes: 4 additions & 4 deletions Components/Metrics/Impact/elxImpactMetric.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ ImpactMetric<TElastix>::GenerateModelsConfiguration(unsigned int level,
}
catch (const c10::Error & e)
{
itkExceptionMacro("ERROR: the model are not loaded from this file: " << modelsPathVec[i]
<< ". Torch error message:" << e.what());
itkExceptionMacro("the model are not loaded from this file: " << modelsPathVec[i]
<< ". Torch error message:" << e.what());
}
}
return modelsConfiguration;
Expand Down Expand Up @@ -364,7 +364,7 @@ ImpactMetric<TElastix>::BeforeEachResolution()
{
if (this->GetFixedModelsConfiguration()[i].GetDimension() > FixedImageDimension)
{
itkExceptionMacro("ERROR: The dimension of the fixed input model image exceeds the allowed image dimensions. "
itkExceptionMacro("The dimension of the fixed input model image exceeds the allowed image dimensions. "
"Expected a maximum of "
<< FixedImageDimension << " dimension(s), but received "
<< this->GetFixedModelsConfiguration()[i].GetDimension() << " dimension(s) for model index "
Expand All @@ -378,7 +378,7 @@ ImpactMetric<TElastix>::BeforeEachResolution()
{
if (this->GetMovingModelsConfiguration()[i].GetDimension() > FixedImageDimension)
{
itkExceptionMacro("ERROR: The dimension of the moving input model image exceeds the allowed image dimensions. "
itkExceptionMacro("The dimension of the moving input model image exceeds the allowed image dimensions. "
"Expected a maximum of "
<< MovingImageDimension << " dimension(s), but received "
<< this->GetMovingModelsConfiguration()[i].GetDimension() << " dimension(s) for model index "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ ANNPriorityTreeSearch<TBinaryTree>::SetBinaryTree(BinaryTreeType * tree)
}
else
{
itkExceptionMacro("ERROR: The internal tree is not of ANNkd_tree type, which is required for priority search.");
itkExceptionMacro("The internal tree is not of ANNkd_tree type, which is required for priority search.");
}
}
else
{
itkExceptionMacro("ERROR: Tree is not generated.");
itkExceptionMacro("Tree is not generated.");
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BinaryANNTreeSearchBase<TBinaryTree>::SetBinaryTree(BinaryTreeType * tree)
}
else
{
itkExceptionMacro("ERROR: The tree is not of type BinaryANNTreeBase.");
itkExceptionMacro("The tree is not of type BinaryANNTreeBase.");
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ KNNGraphAlphaMutualInformationMetric<TElastix>::BeforeEachResolution()
}
else
{
itkExceptionMacro("ERROR: there is no tree type \"" << treeType << "\" implemented.");
itkExceptionMacro("there is no tree type \"" << treeType << "\" implemented.");
}

/** Get the parameters for the search tree. */
Expand Down Expand Up @@ -215,7 +215,7 @@ KNNGraphAlphaMutualInformationMetric<TElastix>::BeforeEachResolution()
}
else
{
itkExceptionMacro("ERROR: there is no tree searcher type \"" << treeSearchType << "\" implemented.");
itkExceptionMacro("there is no tree searcher type \"" << treeSearchType << "\" implemented.");
}

} // end BeforeEachResolution()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ KNNGraphAlphaMutualInformationImageToImageMetric<TFixedImage, TMovingImage>::Ini
/** Check if the kNN trees are set. We only need to check the fixed tree. */
if (!this->m_BinaryKNNTreeFixed)
{
itkExceptionMacro("ERROR: The kNN tree is not set. ");
itkExceptionMacro("The kNN tree is not set. ");
}

/** Check if the kNN tree searchers are set. We only need to check the fixed searcher. */
if (!this->m_BinaryKNNTreeSearcherFixed)
{
itkExceptionMacro("ERROR: The kNN tree searcher is not set. ");
itkExceptionMacro("The kNN tree searcher is not set. ");
}

} // end Initialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ NormalizedGradientCorrelationImageToImageMetric<TFixedImage, TMovingImage>::Init
}
else
{
itkExceptionMacro("ERROR: the NormalizedGradientCorrelationImageToImageMetric is currently only suitable for "
itkExceptionMacro("the NormalizedGradientCorrelationImageToImageMetric is currently only suitable for "
"2D-3D registration.\n"
<< " Therefore it expects an interpolator of type RayCastInterpolator.");
}
Expand Down
Loading
Loading