Skip to content

Commit

Permalink
STYLE: Remove initial T from TCoordinateType in itkImageRegionTest
Browse files Browse the repository at this point in the history
In general, we only use the `T` prefix for template parameters, not for aliases.
  • Loading branch information
N-Dekker committed Dec 5, 2024
1 parent a259028 commit 8a3f54b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Modules/Core/Common/test/itkImageRegionTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ itkImageRegionTest(int, char *[])

constexpr unsigned int dimension = 3;

using TCoordinateType = double;
using CoordinateType = double;
using RegionType = itk::ImageRegion<dimension>;
using IndexType = RegionType::IndexType;
using SizeType = RegionType::SizeType;
using SliceRegionType = RegionType::SliceRegion;
using ContinuousIndexType = itk::ContinuousIndex<TCoordinateType, dimension>;
using ContinuousIndexType = itk::ContinuousIndex<CoordinateType, dimension>;

using IndexNumericTraits = itk::NumericTraits<IndexType::IndexValueType>;
using ContinuousIndexNumericTraits = itk::NumericTraits<ContinuousIndexType::ValueType>;
Expand Down Expand Up @@ -273,21 +273,21 @@ itkImageRegionTest(int, char *[])
std::cout << "NaN < -1 = " << (indexC[0] < -1.0) << std::endl;
std::cout << "NaN > -1 = " << (indexC[0] > -1.0) << std::endl;

TCoordinateType NaN = ContinuousIndexNumericTraits::quiet_NaN();
std::cout << "RoundHalfIntegerUp(NaN): " << itk::Math::RoundHalfIntegerUp<TCoordinateType>(NaN) << std::endl;
std::cout << "RoundHalfIntegerUp< TCoordinateType >(NaN) < static_cast<TCoordinateType> (0): "
<< (itk::Math::RoundHalfIntegerUp<TCoordinateType>(NaN) < static_cast<TCoordinateType>(0)) << std::endl;
std::cout << "RoundHalfIntegerUp< TCoordinateType >(NaN) > static_cast<TCoordinateType> (0): "
<< (itk::Math::RoundHalfIntegerUp<TCoordinateType>(NaN) > static_cast<TCoordinateType>(0)) << std::endl;
auto rf = itk::Math::RoundHalfIntegerUp<TCoordinateType>(NaN);
std::cout << "TCoordinateType = RoundHalfIntegerUp(NaN): " << rf << std::endl;
auto rl = itk::Math::RoundHalfIntegerUp<RegionType::IndexValueType, TCoordinateType>(NaN);
CoordinateType NaN = ContinuousIndexNumericTraits::quiet_NaN();
std::cout << "RoundHalfIntegerUp(NaN): " << itk::Math::RoundHalfIntegerUp<CoordinateType>(NaN) << std::endl;
std::cout << "RoundHalfIntegerUp< CoordinateType >(NaN) < static_cast<CoordinateType> (0): "
<< (itk::Math::RoundHalfIntegerUp<CoordinateType>(NaN) < static_cast<CoordinateType>(0)) << std::endl;
std::cout << "RoundHalfIntegerUp< CoordinateType >(NaN) > static_cast<CoordinateType> (0): "
<< (itk::Math::RoundHalfIntegerUp<CoordinateType>(NaN) > static_cast<CoordinateType>(0)) << std::endl;
auto rf = itk::Math::RoundHalfIntegerUp<CoordinateType>(NaN);
std::cout << "CoordinateType = RoundHalfIntegerUp(NaN): " << rf << std::endl;
auto rl = itk::Math::RoundHalfIntegerUp<RegionType::IndexValueType, CoordinateType>(NaN);
std::cout << "RegionType::IndexValueType type = RoundHalfIntegerUp(NaN): " << rl << std::endl;
std::cout << "static_cast<RegionType::IndexValueType>( NaN ): " << static_cast<RegionType::IndexValueType>(NaN)
<< std::endl;
std::cout << "NumericTraits<RegionType::IndexValueType>::min(): "
<< itk::NumericTraits<RegionType::IndexValueType>::min() << std::endl;
std::cout << "TCoordinateType min(): " << ContinuousIndexNumericTraits::min() << std::endl;
std::cout << "CoordinateType min(): " << ContinuousIndexNumericTraits::min() << std::endl;
std::cout << "...end NaN tests." << std::endl << std::endl;
}

Expand Down

0 comments on commit 8a3f54b

Please sign in to comment.