Skip to content

Commit

Permalink
COMP: Fix Cuda [[nodiscard]] warnings of Image "Transform" functions
Browse files Browse the repository at this point in the history
Those were missed in 37b2cee.
  • Loading branch information
Simon Rit authored and SimonRit committed Apr 24, 2023
1 parent 37b2cee commit ab08d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/rtkCudaFDKBackProjectionImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ CudaFDKBackProjectionImageFilter ::GPUGenerateData()
// Rotation center (assumed to be at 0 yet)
ImageType::PointType rotCenterPoint;
rotCenterPoint.Fill(0.0);
itk::ContinuousIndex<double, Dimension> rotCenterIndex;
this->GetInput(0)->TransformPhysicalPointToContinuousIndex(rotCenterPoint, rotCenterIndex);
using ValueType = ImageType::PointType::ValueType;
itk::ContinuousIndex<double, Dimension> rotCenterIndex =
this->GetInput(0)->TransformPhysicalPointToContinuousIndex<ValueType, double>(rotCenterPoint);

// Include non-zero index in matrix
itk::Matrix<double, 4, 4> matrixIdxVol;
Expand Down
5 changes: 3 additions & 2 deletions src/rtkCudaWarpBackProjectionImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ CudaWarpBackProjectionImageFilter ::GPUGenerateData()
// Rotation center (assumed to be at 0 yet)
ImageType::PointType rotCenterPoint;
rotCenterPoint.Fill(0.0);
itk::ContinuousIndex<double, Dimension> rotCenterIndex;
this->GetInputVolume()->TransformPhysicalPointToContinuousIndex(rotCenterPoint, rotCenterIndex);
using ValueType = ImageType::PointType::ValueType;
itk::ContinuousIndex<double, Dimension> rotCenterIndex =
this->GetInputVolume()->TransformPhysicalPointToContinuousIndex<ValueType, double>(rotCenterPoint);

// Include non-zero index in matrix
itk::Matrix<double, 4, 4> matrixIdxVol;
Expand Down

0 comments on commit ab08d7a

Please sign in to comment.