Skip to content

Commit

Permalink
COMP: More warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntustison committed Jan 30, 2024
1 parent 128c124 commit 0952b3a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 26 deletions.
15 changes: 4 additions & 11 deletions Examples/SetOrigin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace ants
{
template <unsigned int ImageDimension>
int
SetOrigin(int argc, char * argv[])
SetOrigin(int itkNotUsed(argc), char * argv[])
{
using outPixelType = float;
using inPixelType = float;
Expand All @@ -46,17 +46,10 @@ SetOrigin(int argc, char * argv[])
typename OutImageType::PointType orig = outim->GetOrigin();

std::cout << " Old Orig " << outim->GetOrigin();
if (argc > 3)
{
orig[0] = atof(argv[3]);
}
if (argc > 4)
{
orig[1] = atof(argv[4]);
}
if (argc > 5)

for (unsigned int d = 0; d < ImageDimension; d++)
{
orig[2] = atof(argv[5]);
orig[d] = atof(argv[d+3]);
}
std::cout << " New Orig " << orig << std::endl;

Expand Down
14 changes: 3 additions & 11 deletions Examples/SetSpacing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace ants
{
template <unsigned int ImageDimension>
int
SetSpacing(int argc, char * argv[])
SetSpacing(int itkNotUsed(argc), char * argv[])
{
using outPixelType = float;
using inPixelType = float;
Expand All @@ -53,17 +53,9 @@ SetSpacing(int argc, char * argv[])
typename OutImageType::SpacingType spacing = outim->GetSpacing();

std::cout << " Old Spacing " << outim->GetSpacing();
if (argc > 3)
for (unsigned int d = 0; d < ImageDimension; d++)
{
spacing[0] = atof(argv[3]);
}
if (argc > 4)
{
spacing[1] = atof(argv[4]);
}
if (argc > 5)
{
spacing[2] = atof(argv[5]);
spacing[d] = atof(argv[d+3]);
}
std::cout << " New Spacing " << spacing << std::endl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ ExpectationBasedPointSetRegistrationFunction<TFixedImage, TMovingImage, TDisplac
for (unsigned long ii = 0; ii < sz1; ii++)
{
PointType fixedpoint;
PointDataType label;
PointDataType label = 0;
this->m_FixedPointSet->GetPoint(ii, &fixedpoint);
this->m_FixedPointSet->GetPointData(ii, &label);
if (label > 0)
Expand Down
6 changes: 3 additions & 3 deletions Utilities/ReadWriteData.h
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ ConvertTimeSeriesImageToFiveDimensionalImage(TTimeSeriesImageType * timeSeriesIm
{
enum
{
ImageDimension = 3
ImageDimension = TTimeSeriesImageType::ImageDimension - 1
};

typename FiveDimensionalImageType::SpacingType spacing;
Expand Down Expand Up @@ -968,7 +968,7 @@ ConvertFiveDimensionalImageToTimeSeriesImage(FiveDimensionalImageType * FiveDime
{
enum
{
ImageDimension = 3
ImageDimension = TimeSeriesImageType::ImageDimension - 1
};

typename FiveDimensionalImageType::SpacingType spacing = FiveDimensionalImage->GetSpacing();
Expand All @@ -995,7 +995,7 @@ ConvertFiveDimensionalImageToTimeSeriesImage(FiveDimensionalImageType * FiveDime
timeSeriesDirection(d, e) = direction(d, e);
}
}
timeSeriesSize[3] = size[4];
timeSeriesSize[ImageDimension] = size[4];

typename TimeSeriesImageType::Pointer timeSeriesImage =
AllocImage<TimeSeriesImageType>(timeSeriesSize, timeSeriesSpacing, timeSeriesOrigin, timeSeriesDirection);
Expand Down
1 change: 1 addition & 0 deletions Utilities/itkWarpImageMultiTransformFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ WarpImageMultiTransformFilter<TInputImage, TOutputImage, TDisplacementField, TTr
PointType & point2)
{
IndexType null_index;
null_index.Fill(0);

bool isinside = MultiTransformPoint(point1, point2, false, null_index);

Expand Down

0 comments on commit 0952b3a

Please sign in to comment.