Commit b99eeaa5 authored by Mathieu Westphal's avatar Mathieu Westphal Committed by Kitware Robot
Browse files

Merge topic 'mr5930_fixes'

59600e01

 MR#5930: Add the ability to adding interactive 2D widgets
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Mathieu Westphal's avatarMathieu Westphal <mathieu.westphal@kitware.com>
Merge-request: !7920
parents 010ab24a 59600e01
......@@ -23,7 +23,8 @@ vtkStandardNewMacro(vtkFFT);
//------------------------------------------------------------------------------
std::vector<vtkFFT::ComplexNumber> vtkFFT::FftDirect(const std::vector<ScalarNumber>& in)
{
kiss_fftr_cfg cfg = kiss_fftr_alloc(in.size(), 0 /*is_inverse_fft*/, nullptr, nullptr);
kiss_fftr_cfg cfg =
kiss_fftr_alloc(static_cast<int>(in.size()), 0 /*is_inverse_fft*/, nullptr, nullptr);
if (cfg != nullptr)
{
auto outSize = (in.size() / 2) + 1;
......@@ -41,7 +42,8 @@ std::vector<vtkFFT::ComplexNumber> vtkFFT::FftDirect(const std::vector<ScalarNum
std::vector<vtkFFT::ScalarNumber> vtkFFT::FftInverse(const std::vector<vtkFFT::ComplexNumber>& in)
{
auto outSize = (in.size() - 1) * 2;
kiss_fftr_cfg cfg = kiss_fftr_alloc(outSize, 1 /*is_inverse_fft*/, nullptr, nullptr);
kiss_fftr_cfg cfg =
kiss_fftr_alloc(static_cast<int>(outSize), 1 /*is_inverse_fft*/, nullptr, nullptr);
if (cfg != nullptr)
{
std::vector<vtkFFT::ScalarNumber> result(outSize);
......
......@@ -176,7 +176,8 @@ public:
}
// the first or last point
if ((this->TakenPoint == 0) || (this->TakenPoint == static_cast<int>(this->Points.size()) - 1))
if ((this->TakenPoint == 0) ||
(this->TakenPoint == static_cast<vtkIdType>(this->Points.size()) - 1))
{
const equalizer::EqualizerPoint& point = this->Points.at(this->TakenPoint);
left = point.freq;
......@@ -203,7 +204,7 @@ public:
auto point = transform->MapToScene(this->Points.at(i));
if (equalizer::isNear(posScreen, point, equalizer::EqualizerPoint::radiusInteractive))
{
this->TakenPoint = i;
this->TakenPoint = static_cast<vtkIdType>(i);
break;
}
}
......@@ -284,7 +285,7 @@ public:
// attributes
EqualizerPoints Points;
int TakenPoint = -1;
vtkIdType TakenPoint = -1;
};
//------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment