Skip to content

Commit

Permalink
PERF: SLICImageFilter use faster TransformPhysicalPointToContinuousIndex
Browse files Browse the repository at this point in the history
Replaced a call to `TransformPhysicalPointToContinuousIndex` with its faster
overload, within `SLICImageFilter::BeforeThreadedGenerateData()`.

Follow-up to pull request #2901
commit 6a8569e "PERF: Use the faster
`TransformPhysicalPointToContinuousIndex` overload"
  • Loading branch information
N-Dekker authored and hjmjohnson committed Apr 5, 2023
1 parent dc43b54 commit d010963
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -160,8 +160,8 @@ SLICImageFilter<TInputImage, TOutputImage, TDistancePixel>::BeforeThreadedGenera
const IndexType & idx = it.GetIndex();
typename InputImageType::PointType pt;
shrunkImage->TransformIndexToPhysicalPoint(idx, pt);
ContinuousIndexType cidx;
inputImage->TransformPhysicalPointToContinuousIndex(pt, cidx);
const ContinuousIndexType cidx =
inputImage->template TransformPhysicalPointToContinuousIndex<typename PointType::ValueType>(pt);
for (unsigned int i = 0; i < ImageDimension; ++i)
{
cluster[numberOfComponents + i] = cidx[i];
Expand Down

0 comments on commit d010963

Please sign in to comment.