Skip to content

Commit feba1f8

Browse files
committed
charts/CommonImageFilters: Warning fixes
1 parent 2c066b9 commit feba1f8

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

libs/charts/qcustomplot.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4322,9 +4322,9 @@ double QCPAbstractPlottable1D<DataType>::selectTest(const QPointF &pos, bool onl
43224322
if (DataType::sortKeyIsMainKey()) // we can assume that data is sorted by main key, so can reduce the searched key interval:
43234323
{
43244324
// determine which key range comes into question, taking selection tolerance around pos into account:
4325-
double posKeyMin, posKeyMax, dummy;
4326-
pixelsToCoords(pos-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy);
4327-
pixelsToCoords(pos+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy);
4325+
double posKeyMin, posKeyMax, valueDummy;
4326+
pixelsToCoords(pos-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, valueDummy);
4327+
pixelsToCoords(pos+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, valueDummy);
43284328
if (posKeyMin > posKeyMax)
43294329
qSwap(posKeyMin, posKeyMax);
43304330
begin = mDataContainer->findBegin(posKeyMin, true);

modules/CommonImageFilters/iAEdgeDetectionFilters.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ IAFILTER_DEFAULT_CLASS(iASobelEdgeDetection);
2121

2222
namespace
2323
{
24-
using RealPixelType = float;
25-
using RealImageType = itk::Image<RealPixelType, 3>;
24+
using FloatPixelType = float;
25+
using FloatImageType = itk::Image<FloatPixelType, 3>;
2626
}
2727

2828
template<class T>
2929
void canny_edge_detection(iAFilter* filter, QVariantMap const & parameters)
3030
{
31-
using EdgeDetectionType = itk::CannyEdgeDetectionImageFilter<RealImageType, RealImageType>;
31+
using EdgeDetectionType = itk::CannyEdgeDetectionImageFilter<FloatImageType, FloatImageType>;
3232

33-
auto inImg = castImageTo<RealPixelType>(filter->imageInput(0)->itkImage());
33+
auto inImg = castImageTo<FloatPixelType>(filter->imageInput(0)->itkImage());
3434
auto canny = EdgeDetectionType::New();
3535
canny->SetVariance(parameters["Variance"].toDouble());
3636
canny->SetMaximumError(parameters["Maximum error"].toDouble());
3737
canny->SetUpperThreshold(parameters["Upper threshold"].toDouble());
3838
canny->SetLowerThreshold(parameters["Lower threshold"].toDouble());
39-
canny->SetInput(dynamic_cast<RealImageType*>(inImg.GetPointer()));
39+
canny->SetInput(dynamic_cast<FloatImageType*>(inImg.GetPointer()));
4040
filter->progress()->observe( canny );
4141
canny->Update();
4242
filter->addOutput(std::make_shared<iAImageData>(canny->GetOutput()));
@@ -68,11 +68,11 @@ template <class T>
6868
void sobel_edge_detection(iAFilter* filter, QVariantMap const& parameters)
6969
{
7070
Q_UNUSED(parameters);
71-
using EdgeDetectionType = itk::SobelEdgeDetectionImageFilter<RealImageType, RealImageType> ;
71+
using EdgeDetectionType = itk::SobelEdgeDetectionImageFilter<FloatImageType, FloatImageType>;
7272

73-
auto inImg = castImageTo<RealPixelType>(filter->imageInput(0)->itkImage());
73+
auto inImg = castImageTo<FloatPixelType>(filter->imageInput(0)->itkImage());
7474
auto edgeDetector = EdgeDetectionType::New();
75-
edgeDetector->SetInput(dynamic_cast<RealImageType*>(inImg.GetPointer()));
75+
edgeDetector->SetInput(dynamic_cast<FloatImageType*>(inImg.GetPointer()));
7676
filter->progress()->observe(edgeDetector);
7777
edgeDetector->Update();
7878
filter->addOutput(std::make_shared<iAImageData>(edgeDetector->GetOutput()));

0 commit comments

Comments
 (0)