Skip to content
Snippets Groups Projects
Commit 5559c46e authored by Julien Malik's avatar Julien Malik
Browse files

COMP: fix ambiguous call to vcl_floor on windows

parent 6d00c228
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
typedef typename InputImageType::PixelType InputPixelType; typedef typename InputImageType::PixelType InputPixelType;
typedef typename InputImageType::IndexType InputIndexType; typedef typename InputImageType::IndexType InputIndexType;
typedef typename InputImageType::SizeType InputSizeType; typedef typename InputImageType::SizeType InputSizeType;
typedef typename InputImageType::IndexType IndexType; typedef typename InputImageType::IndexValueType InputIndexValueType;
typedef typename InputImageType::PointType PointType; typedef typename InputImageType::PointType PointType;
typedef typename InputImageType::RegionType RegionType; typedef typename InputImageType::RegionType RegionType;
typedef typename InputImageType::SizeType SizeType; typedef typename InputImageType::SizeType SizeType;
......
...@@ -513,26 +513,23 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel ...@@ -513,26 +513,23 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel
InputSizeType inputSize = requestedRegion.GetSize(); InputSizeType inputSize = requestedRegion.GetSize();
InputIndexType inputIndex = requestedRegion.GetIndex(); InputIndexType inputIndex = requestedRegion.GetIndex();
unsigned int width = inputSize[0];
unsigned int height = inputSize[1];
// define region // define region
itk::ImageRegion<2> imageRegion; itk::ImageRegion<2> imageRegion;
IndexType index; InputIndexType index;
index[0] = vcl_floor(latticePosition[0] + 0.5); index[0] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[0] + 0.5));
index[1] = vcl_floor(latticePosition[1] + 0.5); index[1] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[1] + 0.5));
int xMin = index[0] - vcl_floor(kernelSize[0] / 2); InputIndexValueType xMin = index[0] - static_cast<InputIndexValueType>(vcl_floor(kernelSize[0] / 2));
int xMax = xMin + kernelSize[0]; InputIndexValueType xMax = xMin + kernelSize[0];
int yMin = index[1] - vcl_floor(kernelSize[1] / 2); InputIndexValueType yMin = index[1] - static_cast<InputIndexValueType>(vcl_floor(kernelSize[1] / 2));
int yMax = yMin + kernelSize[1]; InputIndexValueType yMax = yMin + kernelSize[1];
IndexType minIndex; InputIndexType minIndex;
minIndex[0] = vcl_max(xMin,static_cast<int>(inputIndex[0])); // add image index minIndex[0] = vcl_max(xMin,inputIndex[0]); // add image index
minIndex[1] = vcl_max(yMin,static_cast<int>(inputIndex[1])); // add image index minIndex[1] = vcl_max(yMin,inputIndex[1]); // add image index
IndexType maxIndex; InputIndexType maxIndex;
maxIndex[0] = vcl_min(xMax, static_cast<int> (width-1+inputIndex[0])); //add image index maxIndex[0] = vcl_min(xMax, static_cast<InputIndexValueType>(inputSize[0]-1+inputIndex[0])); //add image index
maxIndex[1] = vcl_min(yMax, static_cast<int> (height-1+inputIndex[1])); //add image index maxIndex[1] = vcl_min(yMax, static_cast<InputIndexValueType>(inputSize[1]-1+inputIndex[1])); //add image index
imageRegion.SetIndex(index); imageRegion.SetIndex(index);
SizeType size; SizeType size;
...@@ -542,7 +539,7 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel ...@@ -542,7 +539,7 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel
OutputPixelType *it = *neighborhood; OutputPixelType *it = *neighborhood;
PointType pixelPos; PointType pixelPos;
IndexType pixelIndex; InputIndexType pixelIndex;
InputPixelType inputPixel; InputPixelType inputPixel;
inputPixel.SetSize(numberOfComponents); inputPixel.SetSize(numberOfComponents);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment