Skip to content

Commit

Permalink
STYLE: Fix several spelling errors
Browse files Browse the repository at this point in the history
cd ITK
find . -type f | fgrep -v ThirdParty | egrep '\.[hc](xx|pp)?$' | \
  xargs sed -i -r \
    -e 's/(o|O)uput/\1utput/g' \
    -e 's/(u|U)sefull/\1seful/g' \
    -e 's/(a|A)sign/\1ssign/g' \
    -e 's/(s|S)waping/\1wapping/g' \
    -e 's/(m|M)easurment/\1easurement/g' \
    -e 's/(r|R)essource/\1esource/g' \
    -e 's/(l|L)enght/\1ength/g' \
    -e 's/the all the/all the/g' \
    -e 's/[nN]-[dD]imensional/n-dimensional/g' \
    -e 's/([^A-Za-z])a n-dimensional/\1an n-dimensional/g' \
    -e 's/([^A-Za-z])a itk/\1an itk/g' \
    -e 's/([^A-Za-z])a an([^A-Za-z])/\1an\2/g'

Also, change "a" -> "an" where appropriate
  • Loading branch information
Leengit authored and N-Dekker committed Feb 11, 2022
1 parent be81e62 commit 16fd80e
Show file tree
Hide file tree
Showing 112 changed files with 191 additions and 191 deletions.
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Image/Image1.cxx
Expand Up @@ -91,7 +91,7 @@ main(int, char *[])
// the image grid starts. These two parameters make it possible to process
// selected regions.
//
// The \code{Index} is represented by a n-dimensional array where each
// The \code{Index} is represented by an n-dimensional array where each
// component is an integer
// indicating---in topological image coordinates---the initial pixel
// of the image.
Expand Down
2 changes: 1 addition & 1 deletion Examples/Filtering/BilateralImageFilter.cxx
Expand Up @@ -215,7 +215,7 @@ main(int argc, char * argv[])

// Software Guide : BeginLatex
//
// The output of the filter is connected here to a intensity rescaler
// The output of the filter is connected here to an intensity rescaler
// filter and then to a writer. Invoking \code{Update()} on the writer
// triggers the execution of both filters.
//
Expand Down
Expand Up @@ -18,7 +18,7 @@

// Software Guide : BeginLatex
//
// Setting up a pipeline of $m$ filters in order to smooth an N-dimensional
// Setting up a pipeline of $m$ filters in order to smooth an n-dimensional
// image may be a lot of work to do for achieving a simple goal. In order to
// avoid this inconvenience, a filter packaging this $m$ filters internally
// is available. This filter is the
Expand Down
6 changes: 3 additions & 3 deletions Examples/IO/VisibleHumanStreamReadWrite.cxx
Expand Up @@ -72,7 +72,7 @@ main(int argc, char * argv[])
nameGenerator->SetEndIndex(2878);
nameGenerator->SetIncrementIndex(1);

// create a ImageIO for the red channel
// create an ImageIO for the red channel
using ImageIOType = itk::RawImageIO<PixelType, 2>;
auto rimageio = ImageIOType::New();
rimageio->SetDimensions(0, 2048);
Expand All @@ -82,7 +82,7 @@ main(int argc, char * argv[])
rimageio->SetHeaderSize(rimageio->GetImageSizeInPixels() * 0);


// create a ImageIO for the green channel
// create an ImageIO for the green channel
auto gimageio = ImageIOType::New();
gimageio->SetDimensions(0, 2048);
gimageio->SetDimensions(1, 1216);
Expand All @@ -91,7 +91,7 @@ main(int argc, char * argv[])
gimageio->SetHeaderSize(gimageio->GetImageSizeInPixels() * 1);


// create a ImageIO for the blue channel
// create an ImageIO for the blue channel
auto bimageio = ImageIOType::New();
bimageio->SetDimensions(0, 2048);
bimageio->SetDimensions(1, 1216);
Expand Down
Expand Up @@ -75,7 +75,7 @@
// potential image.
//
// The \doxygen{FastMarchingImageFilter} creates an initial level set using
// three user specified seed positions and a initial contour radius. Three
// three user specified seed positions and an initial contour radius. Three
// seeds are used in this example to facilitate the segmentation of long
// narrow objects in a smaller number of iterations. The output of the
// FastMarchingImageFilter is passed as the input to the
Expand Down
2 changes: 1 addition & 1 deletion Examples/SpatialObjects/BlobSpatialObject.cxx
Expand Up @@ -20,7 +20,7 @@
//
// \index{itk::BlobSpatialObject}
//
// \doxygen{BlobSpatialObject} defines an N-dimensional blob.
// \doxygen{BlobSpatialObject} defines an n-dimensional blob.
// This class derives from \doxygen{itkPointBasedSpatialObject}. A blob
// is defined as a list of points which compose the object.
//
Expand Down
2 changes: 1 addition & 1 deletion Examples/SpatialObjects/EllipseSpatialObject.cxx
Expand Up @@ -20,7 +20,7 @@
//
// \index{itk::EllipseSpatialObject}
//
// \doxygen{EllipseSpatialObject} defines an n-Dimensional ellipse. Like
// \doxygen{EllipseSpatialObject} defines an n-dimensional ellipse. Like
// other spatial objects this class derives from
// \doxygen{SpatialObject}. Let's start by including the appropriate header
// file.
Expand Down
2 changes: 1 addition & 1 deletion Examples/SpatialObjects/GaussianSpatialObject.cxx
Expand Up @@ -21,7 +21,7 @@
// \index{itk::GaussianSpatialObject}
//
// This example shows how to create a \doxygen{GaussianSpatialObject} which
// defines a Gaussian in a N-dimensional space. This object is particularly
// defines a Gaussian in an n-dimensional space. This object is particularly
// useful to query the value at a point in physical space. Let's begin by
// including the appropriate header file.
//
Expand Down
2 changes: 1 addition & 1 deletion Examples/Statistics/ScalarImageMarkovRandomField1.cxx
Expand Up @@ -321,7 +321,7 @@ main(int argc, char * argv[])
// classification of any given pixel. Note that despite the fact that we
// call this a radius, it is actually the half size of an hypercube. That
// is, the actual region of influence will not be circular but rather an
// N-Dimensional box. For example, a neighborhood radius of 2 in a 3D image
// n-dimensional box. For example, a neighborhood radius of 2 in a 3D image
// will result in a clique of size 5x5x5 pixels, and a radius of 1 will
// result in a clique of size 3x3x3 pixels.
//
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkArray.h
Expand Up @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT Array : public vnl_vector<TValue>
}
}

/** Set the all the elements of the array to the specified value */
/** Set all the elements of the array to the specified value */
void
Fill(TValue const & v)
{
Expand Down
Expand Up @@ -28,7 +28,7 @@ namespace itk
{
/**
* \brief Define numeric traits for VariableLengthVector.
* \tparam T Component type of VariableLenghtVector
* \tparam T Component type of VariableLengthVector
*
* We provide here a generic implementation based on creating types of
* VariableLengthVector whose components are the types of the NumericTraits from
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkVariableLengthVector.h
Expand Up @@ -497,7 +497,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector
Self &
operator=(VariableLengthVectorExpression<TExpr1, TExpr2, TBinaryOp> const & rhs);

/** Set the all the elements of the array to the specified value.
/** Set all the elements of the array to the specified value.
* \pre This function may be called on empty vectors, it's a no-op.
*/
void
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkVariableLengthVector.hxx
Expand Up @@ -314,7 +314,7 @@ VariableLengthVector<TValue>::SetSize(unsigned int sz, TReallocatePolicy realloc
m_NumElements = sz;
}

/** Set the all the elements of the array to the specified value */
/** Set all the elements of the array to the specified value */
template <typename TValue>
void
VariableLengthVector<TValue>::Fill(TValue const & v)
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/src/itkLightObject.cxx
Expand Up @@ -73,7 +73,7 @@ LightObject::InternalClone() const
}

/**
* Delete a itk object. This method should always be used to delete an object
* Delete an itk object. This method should always be used to delete an object
* when the new operator was used to create it. Using the C++ delete method
* will not work with reference counting.
*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/test/itkCommonTypeTraitsGTest.cxx
Expand Up @@ -30,7 +30,7 @@
#include <type_traits>

// info: is_pod (c++20 deprecated) is equivalent to is_trivial && is_standard_layout
// info: type_traits cannot differentiate if a explicit move constructible/assignmet exist.
// info: type_traits cannot differentiate if an explicit move constructible/assignmet exist.

TEST(CommonTypeTraits, FixedArrayIsPOD)
{
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/test/itkFilterDispatchTest.cxx
Expand Up @@ -123,7 +123,7 @@ ExampleImageFilter<TInputImage, TOutputImage>::Update()


/**
* General N-dimensional implementation of example filter.
* General n-dimensional implementation of example filter.
* The Dispatch parameter is not used. It is just used to control
* instantiation.
*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/test/itkTimeProbeTest2.cxx
Expand Up @@ -92,7 +92,7 @@ itkTimeProbeTest2(int, char *[])
std::cout << std::endl << "Print a normal report" << std::endl;
localTimer.Report();

// Print a expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Print an expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Mean/Min *100 (%), Mean, Max, Max- Mean, Max/Mean(%),
// Total Diff(:Max - Min) and STD)
std::cout << std::endl << "Print an expanded report" << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions Modules/Core/Common/test/itkTimeProbesTest.cxx
Expand Up @@ -156,13 +156,13 @@ itkTimeProbesTest(int, char *[])
std::cout << std::endl << "Print a normal report of a specific probe" << std::endl;
collector.Report("Loop1");

// Print a expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Print an expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Mean/Min *100 (%), Mean, Max, Max- Mean, Max/Mean(%),
// Total Diff(:Max - Min) and STD)
std::cout << std::endl << "Print expanded reports from all probes" << std::endl;
collector.ExpandedReport();

// Print a expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Print an expanded report (including nameOfProbe, Iteration, Total, Min, Mean-Min
// Mean/Min *100 (%), Mean, Max, Max- Mean, Max/Mean(%),
// Total Diff(:Max - Min) and STD)
std::cout << std::endl << "Print an expanded report of a specific probe" << std::endl;
Expand All @@ -174,7 +174,7 @@ itkTimeProbesTest(int, char *[])
std::cout << std::endl << "Print a JSON report of a specific probe" << std::endl;
collector.JSONReport("o:TransformPhysicalPointToIndex");

// Test writing to a ostream
// Test writing to an ostream
std::ofstream logfile;
logfile.open("itkTimeProbesTest.txt");
collector.Report(logfile);
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx
Expand Up @@ -628,7 +628,7 @@ itkVectorImageTest(int, char * argv[])
}

{
// Now read it as a itk::VectorImage.
// Now read it as an itk::VectorImage.
using VectorImageType = itk::VectorImage<PixelType, Dimension>;
using ReaderType = itk::ImageFileReader<VectorImageType>;
auto reader = ReaderType::New();
Expand Down Expand Up @@ -672,7 +672,7 @@ itkVectorImageTest(int, char * argv[])


{
// Now read it as a itk::VectorImage.
// Now read it as an itk::VectorImage.
using VectorImageType = itk::VectorImage<PixelType, Dimension>;
using ReaderType = itk::ImageFileReader<VectorImageType>;
auto reader = ReaderType::New();
Expand Down
Expand Up @@ -470,7 +470,7 @@ BSplineInterpolateImageFunction<TImageType, TCoordRep, TCoefficientType>::Evalua
// perform interpolation
double interpolated = 0.0;
IndexType coefficientIndex;
// Step through eachpoint in the N-dimensional interpolation cube.
// Step through eachpoint in the n-dimensional interpolation cube.
for (unsigned int p = 0; p < m_MaxNumberInterpolationPoints; ++p)
{
double w = 1.0;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Mesh/include/itkImageToMeshFilter.hxx
Expand Up @@ -35,7 +35,7 @@ ImageToMeshFilter<TInputImage, TOutputMesh>::ImageToMeshFilter()
}

/**
* Make Ouput
* Make Output
*/
template <typename TInputImage, typename TOutputMesh>
DataObject::Pointer ImageToMeshFilter<TInputImage, TOutputMesh>::MakeOutput(DataObjectPointerArraySizeType)
Expand Down
Expand Up @@ -442,7 +442,7 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[])
}
std::cout << "OK" << std::endl;
// We now consider a boundary edge (here we consider [0, 5] but still
// with a an adjacent face.
// with an adjacent face.
//
// 20 --------- 21 --------- 22 --------- 23 --------- 24
// | __/ | __/ | __/ | __/ |
Expand Down
Expand Up @@ -195,7 +195,7 @@ TEST(ImageMaskSpatialObject, AxisAlignedBoundingBoxRegionIsRegionOfSinglePixelWh


// Tests that the AABB region is equal to the image region when only a single pixel has value 0.
// (This condition should hold for N-dimensional image regions, with N >= 2, and region size >= 2^N.)
// (This condition should hold for n-dimensional image regions, with N >= 2, and region size >= 2^N.)
TEST(ImageMaskSpatialObject, AxisAlignedBoundingBoxRegionIsImageRegionWhenOnlyOnePixelIsZero)
{
// Test 2D images:
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Transform/include/itkCompositeTransform.hxx
Expand Up @@ -844,7 +844,7 @@ CompositeTransform<TParametersValueType, NDimensions>::UpdateTransformParameters
/* NOTE: We might want to thread this over each sub-transform, if we
* find we're working with longer lists of sub-transforms that do
* not implement any threading of their own for UpdateTransformParameters.
* Since the plan is for a UpdateTransformParameters functor that is
* Since the plan is for an UpdateTransformParameters functor that is
* user-assignable, we would need a method in the
* functor to return whether or not it does therading. If all sub-transforms
* return that they don't thread, we could do each sub-transform in its
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Transform/include/itkMultiTransform.hxx
Expand Up @@ -284,7 +284,7 @@ MultiTransform<TParametersValueType, NDimensions, NSubDimensions>::UpdateTransfo
/* NOTE: We might want to thread this over each sub-transform, if we
* find we're working with longer lists of sub-transforms that do
* not implement any threading of their own for UpdateTransformParameters.
* Since the plan is for a UpdateTransformParameters functor that is
* Since the plan is for an UpdateTransformParameters functor that is
* user-assignable, we would need a method in the
* functor to return whether or not it does therading. If all sub-transforms
* return that they don't thread, we could do each sub-transform in its
Expand Down
Expand Up @@ -57,7 +57,7 @@ GPUDiscreteGaussianImageFilter<TInputImage, TOutputImage>::GPUDiscreteGaussianIm
}
else
{
itkExceptionMacro("GPUDiscreteGaussianImageFilter only supports n-Dimensional image.");
itkExceptionMacro("GPUDiscreteGaussianImageFilter only supports n-dimensional image.");
}
}

Expand Down
Expand Up @@ -123,7 +123,7 @@ template <typename TInputImage, typename TOutputImage>
void
BilateralImageFilter<TInputImage, TOutputImage>::BeforeThreadedGenerateData()
{
// Build a small image of the N-dimensional Gaussian used for domain filter
// Build a small image of the n-dimensional Gaussian used for domain filter
//
// Gaussian image size will be (2*std::ceil(2.5*sigma)+1) x
// (2*std::ceil(2.5*sigma)+1)
Expand Down
Expand Up @@ -343,7 +343,7 @@ bool
TestVectorImageCast2()
{
// This function casts a VectorImage<float, 2>
// to a Image<Vector<unsigned char, 2>, 2>
// to an Image<Vector<unsigned char, 2>, 2>
std::cout << "Casting from a VectorImage<float, 2> to Image<Vector<unsigned char, 2>, 2> ... ";

using UnsignedCharVectorImageType = itk::Image<itk::Vector<unsigned char, 2>, 2>;
Expand Down
Expand Up @@ -51,9 +51,9 @@ GradientImageFilter<TInputImage, TOperatorValueType, TOutputValueType, TOutputIm
delete m_BoundaryCondition;
}

template <typename TInputImage, typename TOperatorValueType, typename TOuputValue, typename TOuputImage>
template <typename TInputImage, typename TOperatorValueType, typename TOutputValue, typename TOutputImage>
void
GradientImageFilter<TInputImage, TOperatorValueType, TOuputValue, TOuputImage>::OverrideBoundaryCondition(
GradientImageFilter<TInputImage, TOperatorValueType, TOutputValue, TOutputImage>::OverrideBoundaryCondition(
ImageBoundaryCondition<TInputImage> * boundaryCondition)
{
delete m_BoundaryCondition;
Expand Down
Expand Up @@ -24,7 +24,7 @@
* convert an RGBPixel image to an image that has
* vector pixel type.
*
* This allows to access an RGB image a an image of vectors.
* This allows access to an RGB image as an image of vectors.
*
*/

Expand Down
Expand Up @@ -46,7 +46,7 @@ namespace itk

namespace Functor
{
template <typename TInputPixel, typename TOuputPixel>
template <typename TInputPixel, typename TOutputPixel>
class SumAccumulator
{
public:
Expand All @@ -56,7 +56,7 @@ class SumAccumulator
inline void
Initialize()
{
m_Sum = NumericTraits<TOuputPixel>::ZeroValue();
m_Sum = NumericTraits<TOutputPixel>::ZeroValue();
}

inline void
Expand All @@ -65,13 +65,13 @@ class SumAccumulator
m_Sum = m_Sum + input;
}

inline TOuputPixel
inline TOutputPixel
GetValue()
{
return m_Sum;
}

TOuputPixel m_Sum;
TOutputPixel m_Sum;
};
} // namespace Functor

Expand Down
Expand Up @@ -67,7 +67,7 @@ itkAdaptiveHistogramEqualizationImageFilterTest(int argc, char * argv[])
ITK_TEST_SET_GET_VALUE(beta, filter->GetBeta());

//
// The output of the filter is connected here to a intensity rescaler filter
// The output of the filter is connected here to an intensity rescaler filter
// and then to a writer. Invoking \code{Update()} on the writer triggers the
// execution of both filters.
//
Expand Down
Expand Up @@ -362,7 +362,7 @@ ContourExtractor2DImageFilter<TInputImage>::GenerateDataForLabels()
for (InputPixelType label : allLabels)
{
const BoundingBoxType & bbox = labelBoundingBoxes[label];
// Compute a extendedRegion that includes one-pixel border on all
// Compute an extendedRegion that includes one-pixel border on all
// sides. However, we don't want the 3-by-3 SquareIterator to be centered
// in the bottom row or right column of this one-pixel-extended region
// because then its lower-right 2-by-2 sub-square won't be wholly within
Expand Down
Expand Up @@ -50,7 +50,7 @@ TriangleThresholdCalculator<THistogram, TOutput>::GenerateData()

// Triangle method needs the maximum and minimum indexes
// Minimum indexes for this purpose are poorly defined - can't just
// take a index with zero entries.
// take an index with zero entries.
double Mx = itk::NumericTraits<double>::min();
IndexValueType MxIdx = 0;

Expand Down
2 changes: 1 addition & 1 deletion Modules/IO/BMP/test/itkBMPImageIOTest3.cxx
Expand Up @@ -105,7 +105,7 @@ itkBMPImageIOTest3(int argc, char * argv[])
{
std::cout << "Test failed!" << std::endl;
std::cout << "An image stored in a lower-left bitmap is different than \
the same image stored in a upper-left bitmap."
the same image stored in an upper-left bitmap."
<< std::endl;
return EXIT_FAILURE;
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/IO/BMP/test/itkBMPImageIOTest4.cxx
Expand Up @@ -107,7 +107,7 @@ itkBMPImageIOTest4(int argc, char * argv[])
{
std::cout << "Test failed!" << std::endl;
std::cout << "An image stored in a lower-left bitmap is different than \
the same image stored in a upper-left bitmap."
the same image stored in an upper-left bitmap."
<< std::endl;
return EXIT_FAILURE;
}
Expand Down

0 comments on commit 16fd80e

Please sign in to comment.