Skip to content

Commit

Permalink
STYLE: Conform to ITK style guidelines in miscellaneous test comments
Browse files Browse the repository at this point in the history
Conform to ITK SWG style guidelines in miscellaneous test comments:
- Use a single whitespace between the comment characters and the comment
  itself.
- Remove unnecessary/uninformative comments.
- Reword comments where necessary to remove unnecessary/uninformative
  parts.
- Use sentence case.

Remove printing unnecessary line feeds.
  • Loading branch information
jhlegarreta authored and hjmjohnson committed Jul 28, 2023
1 parent 19ae34f commit be8e4f6
Show file tree
Hide file tree
Showing 32 changed files with 44 additions and 58 deletions.
Expand Up @@ -22,10 +22,6 @@
#include "itkSimpleFilterWatcher.h"
#include "itkTestingMacros.h"

/**
* Test the class instance by driving it with a null input and output.
* Returns 0 on success and 1 on failure.
*/
int
itkCurvatureAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
Expand Down Expand Up @@ -57,7 +53,7 @@ itkCurvatureAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itk
filter->SetTimeStep(timeStep);
ITK_TEST_SET_GET_VALUE(timeStep, filter->GetTimeStep());

// Run Test
// Run test
itk::Size<2> sz;
sz[0] = 250;
sz[1] = 250;
Expand Down
Expand Up @@ -21,10 +21,6 @@
#include "itkNullImageToImageFilterDriver.hxx"
#include "itkTestingMacros.h"

/**
* Test the class instance by driving it with a null input and output.
* Returns 0 on success and 1 on failure.
*/
int
itkGradientAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
Expand Down Expand Up @@ -65,7 +61,7 @@ itkGradientAnisotropicDiffusionImageFilterTest(int itkNotUsed(argc), char * itkN
filter->SetFixedAverageGradientMagnitude(fixedAverageGradientMagnitude);
ITK_TEST_SET_GET_VALUE(fixedAverageGradientMagnitude, filter->GetFixedAverageGradientMagnitude());

// Run Test
// Run test
itk::Size<Dimension> sz;
sz[0] = 250;
sz[1] = 250;
Expand Down
Expand Up @@ -150,7 +150,7 @@ itkBinaryDilateImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result " << std::endl;
i = 0;
while (!it2.IsAtEnd())
Expand Down
Expand Up @@ -150,7 +150,7 @@ itkBinaryErodeImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result " << std::endl;
i = 0;
while (!it2.IsAtEnd())
Expand Down
Expand Up @@ -161,7 +161,7 @@ itkErodeObjectMorphologyImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result " << std::endl;
i = 0;
while (!it2.IsAtEnd())
Expand Down
Expand Up @@ -153,7 +153,7 @@ itkFastIncrementalBinaryDilateImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result with cross radius 1 (default)" << std::endl;
i = 0;
it2.GoToBegin();
Expand Down Expand Up @@ -182,7 +182,7 @@ itkFastIncrementalBinaryDilateImageFilterTest(int, char *[])
// Set the iterator for going through the image output
it2.SetRegion(outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result with cross radius 2" << std::endl;
i = 0;
it2.GoToBegin();
Expand Down
Expand Up @@ -142,7 +142,7 @@ itkTensorFractionalAnisotropyImageFilterTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -142,7 +142,7 @@ itkTensorRelativeAnisotropyImageFilterTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -133,7 +133,7 @@ itkAbsoluteValueDifferenceImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType4 it4(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!it4.IsAtEnd())
{
Expand Down
Expand Up @@ -133,7 +133,7 @@ itkSquaredDifferenceImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType4 it4(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!it4.IsAtEnd())
{
Expand Down
12 changes: 5 additions & 7 deletions Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx
Expand Up @@ -164,7 +164,7 @@ itkJoinImageFilterTest(int, char *[])
myFilterType::OutputImageType::Pointer outputImage = filter->GetOutput();
myOutputIteratorType it3(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << std::endl;
std::cout << "Joining #1 and #2 image " << std::endl;
while (!it3.IsAtEnd())
Expand All @@ -177,7 +177,7 @@ itkJoinImageFilterTest(int, char *[])
myFilterType3::OutputImageType::Pointer outputImage123 = filter123->GetOutput();
myOutputIteratorType3 it123(outputImage123, outputImage123->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << std::endl;
std::cout << "Joining #1#2 and #3 image " << std::endl;
while (!it123.IsAtEnd())
Expand All @@ -200,7 +200,7 @@ itkJoinImageFilterTest(int, char *[])
myFilterType1::OutputImageType::Pointer outputImage1 = filter1->GetOutput();
myOutputIteratorType1 it4(outputImage1, outputImage1->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << std::endl;
std::cout << "Joining #2 and #1 image " << std::endl;
while (!it4.IsAtEnd())
Expand All @@ -223,8 +223,7 @@ itkJoinImageFilterTest(int, char *[])
myFilterType2::OutputImageType::Pointer outputImage2 = filter2->GetOutput();
myOutputIteratorType2 it5(outputImage2, outputImage2->GetRequestedRegion());

// Print the content of the result image
// std::cout << std::endl;
// Print the content of the result image
std::cout << "Joining #1 and #1 image " << std::endl;
while (!it5.IsAtEnd())
{
Expand All @@ -246,8 +245,7 @@ itkJoinImageFilterTest(int, char *[])
myFilterType4::OutputImageType::Pointer outputImage4 = filter4->GetOutput();
myOutputIteratorType4 it6(outputImage4, outputImage4->GetRequestedRegion());

// Print the content of the result image
// std::cout << std::endl;
// Print the content of the result image
std::cout << "Joining #2 and #2 image " << std::endl;
while (!it6.IsAtEnd())
{
Expand Down
Expand Up @@ -21,10 +21,6 @@
#include "itkNullImageToImageFilterDriver.hxx"
#include "itkTestingMacros.h"

/**
* Test the class instance by driving it with a null input and output.
* Returns 0 on success and 1 on failure.
*/
int
itkBilateralImageFilterTest(int, char *[])
{
Expand Down Expand Up @@ -74,7 +70,7 @@ itkBilateralImageFilterTest(int, char *[])
filter->SetNumberOfRangeGaussianSamples(numberOfRangeGaussianSamples);
ITK_TEST_SET_GET_VALUE(numberOfRangeGaussianSamples, filter->GetNumberOfRangeGaussianSamples());

// Run Test
// Run test
itk::Size<Dimension> sz;
sz[0] = 250;
sz[1] = 250;
Expand Down
Expand Up @@ -166,7 +166,7 @@ itkGradientVectorFlowImageFilterTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;

gtomfilter->SetInput(filter->GetOutput());
Expand Down
Expand Up @@ -150,7 +150,7 @@ itkHessian3DToVesselnessMeasureImageFilterTest(int argc, char * argv[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -135,7 +135,7 @@ itkHessianRecursiveGaussianFilterTest(int argc, char * argv[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand All @@ -144,7 +144,7 @@ itkHessianRecursiveGaussianFilterTest(int argc, char * argv[])
++itg;
}

// the following just tests for warnings in 2D
// Test for warnings in 2D
using my2DImageType = itk::Image<float, 2>;
using my2DFilterType = itk::HessianRecursiveGaussianImageFilter<my2DImageType>;
auto test = my2DFilterType::New();
Expand Down
Expand Up @@ -147,7 +147,7 @@ itkGradientMagnitudeRecursiveGaussianFilterTest(int argc, char * argv[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -140,7 +140,7 @@ itkGradientRecursiveGaussianFilterSpeedTest(int argc, char * argv[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
std::cout << itg.Get();
Expand Down
Expand Up @@ -145,7 +145,7 @@ itkGradientRecursiveGaussianFilterTest(int argc, char * argv[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -139,7 +139,7 @@ itkMaskImageFilterTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType3 it3(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!it3.IsAtEnd())
{
Expand Down
Expand Up @@ -141,7 +141,7 @@ itkMaskNegatedImageFilterTest(int, char *[])
// Create an iterator for going through the image output
OutputIteratorType outputIterator(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!outputIterator.IsAtEnd())
{
Expand Down
Expand Up @@ -141,7 +141,7 @@ itkWeightedAddImageFilterTest(int argc, char * argv[])
// Create an iterator for going through the image output
myIteratorType3 it3(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!it3.IsAtEnd())
{
Expand Down
Expand Up @@ -145,7 +145,7 @@ itkGrayscaleFunctionDilateImageFilterTest(int argc, char * argv[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result " << std::endl;
i = 0;
while (!it2.IsAtEnd())
Expand Down
Expand Up @@ -145,7 +145,7 @@ itkGrayscaleFunctionErodeImageFilterTest(int argc, char * argv[])
// Create an iterator for going through the image output
myIteratorType it2(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << "Result " << std::endl;
i = 0;
while (!it2.IsAtEnd())
Expand Down
Expand Up @@ -56,7 +56,7 @@ itkGrayscaleMorphologicalClosingImageFilterTest2(int argc, char * argv[])

using RadiusType = FilterType::RadiusType;

// test default values
// Test default values
RadiusType r1;
r1.Fill(1);
ITK_TEST_SET_GET_VALUE(r1, filter->GetRadius());
Expand Down
Expand Up @@ -56,7 +56,7 @@ itkGrayscaleMorphologicalOpeningImageFilterTest2(int argc, char * argv[])

using RadiusType = FilterType::RadiusType;

// test default values
// Test default values
RadiusType r1;
r1.Fill(1);

Expand Down
Expand Up @@ -157,7 +157,7 @@ itkObjectMorphologyImageFilterTest(int, char *[])

elapsedTime = (end - start) / static_cast<double>(CLOCKS_PER_SEC);

// Print the content of the result image
// Print the content of the result image
std::cout << " Success: " << std::endl;
std::cout << " Time = " << elapsedTime << std::endl;

Expand All @@ -178,7 +178,7 @@ itkObjectMorphologyImageFilterTest(int, char *[])

elapsedTime = (end - start) / static_cast<double>(CLOCKS_PER_SEC);

// Print the content of the result image
// Print the content of the result image
std::cout << " Success: " << std::endl;
std::cout << " Time = " << elapsedTime << std::endl;

Expand Down Expand Up @@ -245,7 +245,7 @@ itkObjectMorphologyImageFilterTest(int, char *[])

elapsedTime = (end - start) / static_cast<double>(CLOCKS_PER_SEC);

// Print the content of the result image
// Print the content of the result image
std::cout << " Success: " << std::endl;
std::cout << " Time = " << elapsedTime << std::endl;

Expand All @@ -266,7 +266,7 @@ itkObjectMorphologyImageFilterTest(int, char *[])

elapsedTime = (end - start) / static_cast<double>(CLOCKS_PER_SEC);

// Print the content of the result image
// Print the content of the result image
std::cout << " Success: " << std::endl;
std::cout << " Time = " << elapsedTime << std::endl;

Expand Down
Expand Up @@ -152,7 +152,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -143,7 +143,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -141,7 +141,7 @@ itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest(int, char *[])
// Create an iterator for going through the output image
myOutputIteratorType itg(outputImage, outputImage->GetRequestedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
itg.GoToBegin();
while (!itg.IsAtEnd())
Expand Down
Expand Up @@ -118,7 +118,7 @@ itkFilterImageAddTest(int, char *[])
// Create an iterator for going through the image output
myIteratorType3 it3(outputImage, outputImage->GetBufferedRegion());

// Print the content of the result image
// Print the content of the result image
std::cout << " Result " << std::endl;
while (!it3.IsAtEnd())
{
Expand Down

0 comments on commit be8e4f6

Please sign in to comment.