Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
QT
3d Forest
提交
803ed6ea
3
3d Forest
项目概览
QT
/
3d Forest
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
3
3d Forest
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
803ed6ea
编写于
2月 09, 2023
作者:
V
Vaclav Bubnik
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'vb' into main.
上级
831a0eca
5c1df238
变更
33
展开全部
隐藏空白更改
内联
并排
Showing
33 changed file
with
1946 addition
and
231 deletion
+1946
-231
3rdparty/widgets/ctk/ctkDoubleRangeSlider.cpp
3rdparty/widgets/ctk/ctkDoubleRangeSlider.cpp
+939
-0
3rdparty/widgets/ctk/ctkDoubleRangeSlider.h
3rdparty/widgets/ctk/ctkDoubleRangeSlider.h
+287
-0
3rdparty/widgets/ctk/ctkRangeSlider.cpp
3rdparty/widgets/ctk/ctkRangeSlider.cpp
+1
-1
3rdparty/widgets/ctk/ctkRangeSlider.h
3rdparty/widgets/ctk/ctkRangeSlider.h
+0
-0
doc/developerguide/index.txt
doc/developerguide/index.txt
+1
-1
src/apps/tools/segmentation/segmentation.cpp
src/apps/tools/segmentation/segmentation.cpp
+25
-4
src/core/ArgumentParser.cpp
src/core/ArgumentParser.cpp
+11
-0
src/core/ArgumentParser.hpp
src/core/ArgumentParser.hpp
+1
-0
src/core/Log.cpp
src/core/Log.cpp
+36
-0
src/core/Log.hpp
src/core/Log.hpp
+12
-0
src/gui/CMakeLists.txt
src/gui/CMakeLists.txt
+3
-2
src/gui/DoubleRangeSliderWidget.cpp
src/gui/DoubleRangeSliderWidget.cpp
+260
-0
src/gui/DoubleRangeSliderWidget.hpp
src/gui/DoubleRangeSliderWidget.hpp
+82
-0
src/gui/RangeSliderWidget.cpp
src/gui/RangeSliderWidget.cpp
+1
-1
src/plugins/logger/LoggerWindow.cpp
src/plugins/logger/LoggerWindow.cpp
+2
-21
src/plugins/projectnavigator/ProjectNavigatorItemClipping.cpp
...plugins/projectnavigator/ProjectNavigatorItemClipping.cpp
+44
-41
src/plugins/projectnavigator/ProjectNavigatorItemClipping.hpp
...plugins/projectnavigator/ProjectNavigatorItemClipping.hpp
+2
-2
src/plugins/projectnavigator/ProjectNavigatorItemDensity.cpp
src/plugins/projectnavigator/ProjectNavigatorItemDensity.cpp
+17
-15
src/plugins/projectnavigator/ProjectNavigatorItemDensity.hpp
src/plugins/projectnavigator/ProjectNavigatorItemDensity.hpp
+2
-2
src/plugins/projectnavigator/ProjectNavigatorItemDescriptor.cpp
...ugins/projectnavigator/ProjectNavigatorItemDescriptor.cpp
+17
-17
src/plugins/projectnavigator/ProjectNavigatorItemDescriptor.hpp
...ugins/projectnavigator/ProjectNavigatorItemDescriptor.hpp
+2
-2
src/plugins/projectnavigator/ProjectNavigatorItemElevation.cpp
...lugins/projectnavigator/ProjectNavigatorItemElevation.cpp
+13
-13
src/plugins/projectnavigator/ProjectNavigatorItemElevation.hpp
...lugins/projectnavigator/ProjectNavigatorItemElevation.hpp
+2
-2
src/plugins/segmentationl1/SegmentationL1.cpp
src/plugins/segmentationl1/SegmentationL1.cpp
+15
-13
src/plugins/segmentationl1/SegmentationL1.hpp
src/plugins/segmentationl1/SegmentationL1.hpp
+9
-7
src/plugins/segmentationl1/SegmentationL1Parameters.hpp
src/plugins/segmentationl1/SegmentationL1Parameters.hpp
+8
-2
src/plugins/segmentationl1/SegmentationL1TaskCount.hpp
src/plugins/segmentationl1/SegmentationL1TaskCount.hpp
+7
-7
src/plugins/segmentationl1/SegmentationL1TaskInterface.hpp
src/plugins/segmentationl1/SegmentationL1TaskInterface.hpp
+8
-8
src/plugins/segmentationl1/SegmentationL1TaskMedian.hpp
src/plugins/segmentationl1/SegmentationL1TaskMedian.hpp
+8
-13
src/plugins/segmentationl1/SegmentationL1TaskRandom.hpp
src/plugins/segmentationl1/SegmentationL1TaskRandom.hpp
+23
-13
src/plugins/segmentationl1/SegmentationL1TaskSample.hpp
src/plugins/segmentationl1/SegmentationL1TaskSample.hpp
+80
-0
src/plugins/segmentationl1/SegmentationL1Window.cpp
src/plugins/segmentationl1/SegmentationL1Window.cpp
+26
-39
src/plugins/segmentationl1/SegmentationL1Window.hpp
src/plugins/segmentationl1/SegmentationL1Window.hpp
+2
-5
未找到文件。
3rdparty/widgets/ctk/ctkDoubleRangeSlider.cpp
0 → 100644
浏览文件 @
803ed6ea
此差异已折叠。
点击以展开。
3rdparty/widgets/ctk/ctkDoubleRangeSlider.h
0 → 100644
浏览文件 @
803ed6ea
/*=========================================================================
Library: CTK
Copyright (c) Kitware Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.txt
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=========================================================================*/
// Modifications Copyright 2020-present VUKOZ
// Extra ';' after some Qt macros were removed. Caused '-Wpedantic' warnings.
// Added conditional compilation HAS_CTK_VALUE_PROXY.
#ifndef __ctkDoubleRangeSlider_h
#define __ctkDoubleRangeSlider_h
// Qt includes
#include <QWidget>
#include <QSlider>
// CTK includes
// #include <ctkPimpl.h>
// #include "ctkWidgetsExport.h"
class
ctkRangeSlider
;
class
ctkDoubleRangeSliderPrivate
;
#if defined(HAS_CTK_VALUE_PROXY)
class
ctkValueProxy
;
#endif
/// \ingroup Widgets
/// ctkDoubleRangeSlider is a slider that controls 2 numbers as double.
/// ctkDoubleRangeSlider internally aggregates a ctkRangeSlider (not in the
/// API to prevent misuse). Only subclasses can have access to it.
/// \sa ctkRangeSlider, ctkDoubleSlider, ctkRangeWidget
class
ctkDoubleRangeSlider
:
public
QWidget
{
Q_OBJECT
Q_PROPERTY
(
double
minimum
READ
minimum
WRITE
setMinimum
)
Q_PROPERTY
(
double
maximum
READ
maximum
WRITE
setMaximum
)
Q_PROPERTY
(
double
singleStep
READ
singleStep
WRITE
setSingleStep
)
Q_PROPERTY
(
double
minimumValue
READ
minimumValue
WRITE
setMinimumValue
)
Q_PROPERTY
(
double
maximumValue
READ
maximumValue
WRITE
setMaximumValue
)
Q_PROPERTY
(
double
minimumPosition
READ
minimumPosition
WRITE
setMinimumPosition
)
Q_PROPERTY
(
double
maximumPosition
READ
maximumPosition
WRITE
setMaximumPosition
)
Q_PROPERTY
(
bool
tracking
READ
hasTracking
WRITE
setTracking
)
Q_PROPERTY
(
Qt
::
Orientation
orientation
READ
orientation
WRITE
setOrientation
)
Q_PROPERTY
(
double
tickInterval
READ
tickInterval
WRITE
setTickInterval
)
Q_PROPERTY
(
QSlider
::
TickPosition
tickPosition
READ
tickPosition
WRITE
setTickPosition
)
Q_PROPERTY
(
bool
symmetricMoves
READ
symmetricMoves
WRITE
setSymmetricMoves
)
public:
// Superclass typedef
typedef
QWidget
Superclass
;
/// Constructor, builds a ctkDoubleRangeSlider whose default values are the same
/// as ctkRangeSlider.
ctkDoubleRangeSlider
(
Qt
::
Orientation
o
,
QWidget
*
par
=
0
);
/// Constructor, builds a ctkDoubleRangeSlider whose default values are the same
/// as ctkRangeSlider.
ctkDoubleRangeSlider
(
QWidget
*
par
=
0
);
/// Destructor
virtual
~
ctkDoubleRangeSlider
();
///
/// This property holds the single step.
/// The smaller of two natural steps that an abstract sliders provides and
/// typically corresponds to the user pressing an arrow key
/// \sa isValidStep()
void
setSingleStep
(
double
ss
);
double
singleStep
()
const
;
/// Return true if the step can be handled by the slider, false otherwise.
/// An invalid step is a step that can't be used to convert from double
/// to int (too large or too small).
/// \sa singleStep
bool
isValidStep
(
double
step
)
const
;
///
/// This property holds the interval between tickmarks.
/// This is a value interval, not a pixel interval. If it is 0, the slider
/// will choose between lineStep() and pageStep().
/// The default value is 0.
void
setTickInterval
(
double
ti
);
double
tickInterval
()
const
;
///
/// This property holds the tickmark position for this slider.
/// The valid values are described by the QSlider::TickPosition enum.
/// The default value is QSlider::NoTicks.
void
setTickPosition
(
QSlider
::
TickPosition
position
);
QSlider
::
TickPosition
tickPosition
()
const
;
///
/// This property holds the sliders's minimum value.
/// When setting this property, the maximum is adjusted if necessary to
/// ensure that the range remains valid. Also the slider's current values
/// are adjusted to be within the new range.
double
minimum
()
const
;
void
setMinimum
(
double
min
);
///
/// This property holds the slider's maximum value.
/// When setting this property, the minimum is adjusted if necessary to
/// ensure that the range remains valid. Also the slider's current values
/// are adjusted to be within the new range.
double
maximum
()
const
;
void
setMaximum
(
double
max
);
///
/// Sets the slider's minimum to min and its maximum to max.
/// If max is smaller than min, min becomes the only legal value.
void
setRange
(
double
min
,
double
max
);
///
/// This property holds the slider's current minimum value.
/// The slider forces the minimum value to be within the legal range:
/// minimum <= minvalue <= maxvalue <= maximum.
/// Changing the minimumValue also changes the minimumPosition.
double
minimumValue
()
const
;
///
/// This property holds the slider's current maximum value.
/// The slider forces the maximum value to be within the legal range:
/// minimum <= minvalue <= maxvalue <= maximum.
/// Changing the maximumValue also changes the maximumPosition.
double
maximumValue
()
const
;
///
/// This property holds the current slider minimum position.
/// If tracking is enabled (the default), this is identical to minimumValue.
double
minimumPosition
()
const
;
void
setMinimumPosition
(
double
minPos
);
///
/// This property holds the current slider maximum position.
/// If tracking is enabled (the default), this is identical to maximumValue.
double
maximumPosition
()
const
;
void
setMaximumPosition
(
double
maxPos
);
///
/// Utility function that set the minimum position and
/// maximum position at once.
void
setPositions
(
double
minPos
,
double
maxPos
);
///
/// This property holds whether slider tracking is enabled.
/// If tracking is enabled (the default), the slider emits the minimumValueChanged()
/// signal while the left/bottom handler is being dragged and the slider emits
/// the maximumValueChanged() signal while the right/top handler is being dragged.
/// If tracking is disabled, the slider emits the minimumValueChanged()
/// and maximumValueChanged() signals only when the user releases the slider.
void
setTracking
(
bool
enable
);
bool
hasTracking
()
const
;
///
/// Triggers a slider action on the current slider. Possible actions are
/// SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd,
/// SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.
void
triggerAction
(
QAbstractSlider
::
SliderAction
action
);
///
/// This property holds the orientation of the slider.
/// The orientation must be Qt::Vertical (the default) or Qt::Horizontal.
Qt
::
Orientation
orientation
()
const
;
void
setOrientation
(
Qt
::
Orientation
orientation
);
///
/// When symmetricMoves is true, moving a handle will move the other handle
/// symmetrically, otherwise the handles are independent. False by default
bool
symmetricMoves
()
const
;
void
setSymmetricMoves
(
bool
symmetry
);
#if defined(HAS_CTK_VALUE_PROXY)
/// Set/Get the value proxy of the internal range slider.
/// \sa setValueProxy(), valueProxy()
void
setValueProxy
(
ctkValueProxy
*
proxy
);
ctkValueProxy
*
valueProxy
()
const
;
#endif
Q_SIGNALS:
///
/// This signal is emitted when the slider minimum value has changed,
/// with the new slider value as argument.
void
minimumValueChanged
(
double
minVal
);
///
/// This signal is emitted when the slider maximum value has changed,
/// with the new slider value as argument.
void
maximumValueChanged
(
double
maxVal
);
///
/// Utility signal that is fired when minimum or maximum values have changed.
void
valuesChanged
(
double
minVal
,
double
maxVal
);
///
/// This signal is emitted when sliderDown is true and the slider moves.
/// This usually happens when the user is dragging the minimum slider.
/// The value is the new slider minimum position.
/// This signal is emitted even when tracking is turned off.
void
minimumPositionChanged
(
double
minPos
);
///
/// This signal is emitted when sliderDown is true and the slider moves.
/// This usually happens when the user is dragging the maximum slider.
/// The value is the new slider maximum position.
/// This signal is emitted even when tracking is turned off.
void
maximumPositionChanged
(
double
maxPos
);
///
/// Utility signal that is fired when minimum or maximum positions
/// have changed.
void
positionsChanged
(
double
minPos
,
double
maxPos
);
///
/// This signal is emitted when the user presses one slider with the mouse,
/// or programmatically when setSliderDown(true) is called.
void
sliderPressed
();
///
/// This signal is emitted when the user releases one slider with the mouse,
/// or programmatically when setSliderDown(false) is called.
void
sliderReleased
();
///
/// This signal is emitted when the slider range has changed, with min being
/// the new minimum, and max being the new maximum.
/// Warning: don't confound with valuesChanged(double, double);
/// \sa QAbstractSlider::rangeChanged()
void
rangeChanged
(
double
min
,
double
max
);
public
Q_SLOTS
:
///
/// This property holds the slider's current minimum value.
/// The slider forces the minimum value to be within the legal range:
/// minimum <= minvalue <= maxvalue <= maximum.
/// Changing the minimumValue also changes the minimumPosition.
void
setMinimumValue
(
double
minVal
);
///
/// This property holds the slider's current maximum value.
/// The slider forces the maximum value to be within the legal range:
/// minimum <= minvalue <= maxvalue <= maximum.
/// Changing the maximumValue also changes the maximumPosition.
void
setMaximumValue
(
double
maxVal
);
///
/// Utility function that set the minimum value and maximum value at once.
void
setValues
(
double
minVal
,
double
maxVal
);
protected
Q_SLOTS
:
void
onValuesChanged
(
int
min
,
int
max
);
void
onMinPosChanged
(
int
value
);
void
onMaxPosChanged
(
int
value
);
void
onPositionsChanged
(
int
min
,
int
max
);
void
onRangeChanged
(
int
min
,
int
max
);
void
onValueProxyAboutToBeModified
();
void
onValueProxyModified
();
protected:
ctkRangeSlider
*
slider
()
const
;
/// Subclasses can change the internal slider
void
setSlider
(
ctkRangeSlider
*
slider
);
protected:
QScopedPointer
<
ctkDoubleRangeSliderPrivate
>
d_ptr
;
private:
Q_DECLARE_PRIVATE
(
ctkDoubleRangeSlider
)
Q_DISABLE_COPY
(
ctkDoubleRangeSlider
)
};
#endif
3rdparty/widgets/ctk
rangeslider/ctkranges
lider.cpp
→
3rdparty/widgets/ctk
/ctkRangeS
lider.cpp
浏览文件 @
803ed6ea
...
...
@@ -33,7 +33,7 @@
#include <QToolTip>
// CTK includes
#include "ctk
ranges
lider.h"
#include "ctk
RangeS
lider.h"
// Minor cleanup of compiler warnings to include this as 3rdparty source code.
// Extra ';' after some Qt macros caused by '-Wpedantic' were removed.
...
...
3rdparty/widgets/ctk
rangeslider/ctkranges
lider.h
→
3rdparty/widgets/ctk
/ctkRangeS
lider.h
浏览文件 @
803ed6ea
文件已移动
doc/developerguide/index.txt
浏览文件 @
803ed6ea
...
...
@@ -833,7 +833,7 @@ powershell -C "gci | % {rni $_.Name ($_.Name -replace '24px', '24')}"
"${workspaceRoot}/3rdparty/libigl/include",
"${workspaceRoot}/3rdparty/stb",
"${workspaceRoot}/3rdparty/warnings",
"${workspaceRoot}/3rdparty/widgets/ctk
rangeslider
",
"${workspaceRoot}/3rdparty/widgets/ctk",
"${workspaceRoot}/3rdparty/widgets/flowlayout",
"${workspaceRoot}/src/apps/3dforest",
"${workspaceRoot}/src/apps/tools/sandbox",
...
...
src/apps/tools/segmentation/segmentation.cpp
浏览文件 @
803ed6ea
...
...
@@ -84,34 +84,55 @@ static void segmentation(const std::string &path,
std
::
cout
<<
ctx
.
points
.
size
()
<<
" initial points"
<<
std
::
endl
;
for
(
size_t
i
=
0
;
i
<
ctx
.
points
.
size
();
i
++
)
{
std
::
cout
<<
"point["
<<
i
<<
"] index "
<<
ctx
.
points
[
i
].
index
<<
std
::
endl
;
std
::
cout
<<
"point["
<<
i
<<
"] is "
<<
ctx
.
points
[
i
]
<<
std
::
endl
;
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
rc
;
globalLogThread
=
std
::
make_shared
<
LogThread
>
();
LoggerStdout
logger
;
globalLogThread
->
setCallback
(
&
logger
);
try
{
ArgumentParser
arg
;
arg
.
add
(
"--input"
,
""
);
arg
.
add
(
"--iterations"
,
""
);
arg
.
add
(
"--count"
,
""
);
arg
.
add
(
"--test-data"
,
""
);
arg
.
parse
(
argc
,
argv
);
SegmentationL1Parameters
parameters
;
(
void
)
arg
.
read
(
"--count"
,
parameters
.
initialSamplesCount
);
(
void
)
arg
.
read
(
"--iterations"
,
parameters
.
numberOfIterations
);
if
(
arg
.
contains
(
"--test-data"
))
{
createTestDataset
(
arg
.
toString
(
"--input"
));
}
segmentation
(
arg
.
toString
(
"--input"
),
parameters
);
rc
=
0
;
}
catch
(
std
::
exception
&
e
)
{
std
::
cerr
<<
"error: "
<<
e
.
what
()
<<
std
::
endl
;
return
1
;
rc
=
1
;
}
catch
(...)
{
std
::
cerr
<<
"error: unknown"
<<
std
::
endl
;
rc
=
1
;
}
return
0
;
globalLogThread
->
setCallback
(
nullptr
);
globalLogThread
->
stop
();
return
rc
;
}
src/core/ArgumentParser.cpp
浏览文件 @
803ed6ea
...
...
@@ -58,6 +58,17 @@ void ArgumentParser::parse(int argc, char *argv[])
}
}
bool
ArgumentParser
::
read
(
const
std
::
string
&
name
,
int
&
value
)
const
{
if
(
contains
(
name
))
{
value
=
toInt
(
name
);
return
true
;
}
return
false
;
}
float
ArgumentParser
::
toFloat
(
const
std
::
string
&
name
)
const
{
return
std
::
stof
(
toString
(
name
));
...
...
src/core/ArgumentParser.hpp
浏览文件 @
803ed6ea
...
...
@@ -44,6 +44,7 @@ public:
void
parse
(
int
argc
,
char
*
argv
[]);
bool
contains
(
const
std
::
string
&
name
)
const
;
bool
read
(
const
std
::
string
&
name
,
int
&
value
)
const
;
const
std
::
string
&
toString
(
const
std
::
string
&
name
)
const
;
float
toFloat
(
const
std
::
string
&
name
)
const
;
...
...
src/core/Log.cpp
浏览文件 @
803ed6ea
...
...
@@ -194,3 +194,39 @@ void LogThread::run()
}
}
}
const
char
*
LogMessage
::
typeString
()
const
{
return
typeString
(
type
);
}
const
char
*
LogMessage
::
typeString
(
int
type_
)
{
switch
(
type_
)
{
case
LOG_TYPE_DEBUG
:
return
" DBG "
;
case
LOG_TYPE_WARNING
:
return
" WRN "
;
case
LOG_TYPE_ERROR
:
return
" ERR "
;
case
LOG_TYPE_INFO
:
return
" INF "
;
default:
break
;
}
return
" N/A "
;
}
void
LoggerStdout
::
println
(
const
LogMessage
&
message
)
{
std
::
cout
<<
message
.
time
<<
" "
<<
message
.
typeString
()
<<
" "
<<
message
.
text
<<
" ["
<<
message
.
module
<<
":"
<<
message
.
function
<<
"]"
<<
std
::
endl
;
}
void
LoggerStdout
::
flush
()
{
// empty
}
src/core/Log.hpp
浏览文件 @
803ed6ea
...
...
@@ -71,6 +71,9 @@ public:
function
=
function_
;
text
=
text_
;
}
const
char
*
typeString
()
const
;
static
const
char
*
typeString
(
int
type_
);
};
/** Log Thread Callback Interface. */
...
...
@@ -82,6 +85,15 @@ public:
virtual
void
flush
()
=
0
;
};
/** Logger For Standard Output. */
class
EXPORT_CORE
LoggerStdout
:
public
LogThreadCallbackInterface
{
public:
virtual
~
LoggerStdout
()
=
default
;
virtual
void
println
(
const
LogMessage
&
message
);
virtual
void
flush
();
};
/** Log Thread. */
class
EXPORT_CORE
LogThread
{
...
...
src/gui/CMakeLists.txt
浏览文件 @
803ed6ea
...
...
@@ -47,7 +47,8 @@ add_library(
${
SOURCES_PROJECT_NAVIGATOR
}
${
SOURCES_SETTINGS
}
${
SOURCES_VIEWER
}
../../3rdparty/widgets/ctkrangeslider/ctkrangeslider.cpp
../../3rdparty/widgets/ctk/ctkRangeSlider.cpp
../../3rdparty/widgets/ctk/ctkDoubleRangeSlider.cpp
../../3rdparty/widgets/flowlayout/flowlayout.cpp
resources/resources.qrc
../plugins/exportfile/resources/resources.qrc
...
...
@@ -64,7 +65,7 @@ target_include_directories(
${
SUB_PROJECT_NAME
}
PUBLIC
${
CMAKE_CURRENT_LIST_DIR
}
../../3rdparty/widgets/ctk
rangeslider
../../3rdparty/widgets/ctk
../../3rdparty/widgets/flowlayout
../plugins/exportfile
../plugins/help
...
...
src/gui/DoubleRangeSliderWidget.cpp
0 → 100644
浏览文件 @
803ed6ea
/*
Copyright 2020 VUKOZ
This file is part of 3D Forest.
3D Forest is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
3D Forest is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file DoubleRangeSliderWidget.cpp */
#include <DoubleRangeSliderWidget.hpp>
#include <MainWindow.hpp>
#include <ThemeIcon.hpp>
#include <QComboBox>
#include <QDoubleSpinBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
#include <ctkDoubleRangeSlider.h>
#define LOG_MODULE_NAME "DoubleRangeSliderWidget"
#include <Log.hpp>
DoubleRangeSliderWidget
::
DoubleRangeSliderWidget
()
:
QWidget
(),
slider_
(
nullptr
),
minSpinBox_
(
nullptr
),
maxSpinBox_
(
nullptr
),
minimumValue_
(
0
),
maximumValue_
(
0
)
{
}
void
DoubleRangeSliderWidget
::
setMinimum
(
double
min
)
{
LOG_DEBUG
(
<<
"Called with parameter min <"
<<
min
<<
">."
);
minSpinBox_
->
setMinimum
(
min
);
maxSpinBox_
->
setMinimum
(
min
);
slider_
->
setMinimum
(
min
);
minimumValue_
=
min
;
}
void
DoubleRangeSliderWidget
::
setMaximum
(
double
max
)
{
LOG_DEBUG
(
<<
"Called with parameter min <"
<<
max
<<
">."
);
minSpinBox_
->
setMaximum
(
max
);
maxSpinBox_
->
setMaximum
(
max
);
slider_
->
setMaximum
(
max
);
maximumValue_
=
max
;
}
void
DoubleRangeSliderWidget
::
setMinimumValue
(
double
value
)
{
LOG_DEBUG
(
<<
"Called with parameter value <"
<<
value
<<
">."
);
minSpinBox_
->
setValue
(
value
);
slider_
->
setMinimumValue
(
value
);
minimumValue_
=
value
;
}
double
DoubleRangeSliderWidget
::
minimumValue
()
{
return
minimumValue_
;
}
void
DoubleRangeSliderWidget
::
setMaximumValue
(
double
value
)
{
LOG_DEBUG
(
<<
"Called with parameter value <"
<<
value
<<
">."
);
maxSpinBox_
->
setValue
(
value
);
slider_
->
setMaximumValue
(
value
);
maximumValue_
=
value
;
}
double
DoubleRangeSliderWidget
::
maximumValue
()
{
return
maximumValue_
;
}
void
DoubleRangeSliderWidget
::
blockSignals
(
bool
block
)
{
minSpinBox_
->
blockSignals
(
block
);
maxSpinBox_
->
blockSignals
(
block
);
slider_
->
blockSignals
(
block
);
}
void
DoubleRangeSliderWidget
::
slotIntermediateMinimumValue
(
double
v
)
{
LOG_DEBUG
(
<<
"Called with parameter value <"
<<
v
<<
">."
);
QObject
*
obj
=
sender
();
if
(
obj
==
slider_
)
{
minSpinBox_
->
blockSignals
(
true
);
minSpinBox_
->
setValue
(
v
);
minSpinBox_
->
blockSignals
(
false
);
}
else
if
(
obj
==
minSpinBox_
)
{
slider_
->
blockSignals
(
true
);
slider_
->
setMinimumValue
(
v
);
slider_
->
blockSignals
(
false
);
}
minimumValue_
=
v
;
emit
signalIntermediateMinimumValue
();
}
void
DoubleRangeSliderWidget
::
slotIntermediateMaximumValue
(
double
v
)
{
LOG_DEBUG
(
<<
"Called with parameter value <"
<<
v
<<
">."
);
QObject
*
obj
=
sender
();
if
(
obj
==
slider_
)
{
maxSpinBox_
->
blockSignals
(
true
);
maxSpinBox_
->
setValue
(
v
);
maxSpinBox_
->
blockSignals
(
false
);
}
else
if
(
obj
==
maxSpinBox_
)
{
slider_
->
blockSignals
(
true
);
slider_
->
setMaximumValue
(
v
);
slider_
->
blockSignals
(
false
);
}
maximumValue_
=
v
;
emit
signalIntermediateMaximumValue
();
}
void
DoubleRangeSliderWidget
::
create
(
DoubleRangeSliderWidget
*&
outputWidget
,
const
QObject
*
receiver
,
const
char
*
memberIntermediateMinimumValue
,
const
char
*
memberIntermediateMaximumValue
,
const
QString
&
text
,
const
QString
&
toolTip
,
const
QString
&
unitsList
,
double
step
,
double
min
,
double
max
,
double
minValue
,
double
maxValue
)
{
LOG_DEBUG
(
<<
"Called with parameter min <"
<<
min
<<
">"
<<
" max <"
<<
max
<<
">"
<<
" minValue <"
<<
minValue
<<
">"
<<
" maxValue <"
<<
maxValue
<<
">."
);
outputWidget
=
new
DoubleRangeSliderWidget
();
outputWidget
->
minimumValue_
=
minValue
;
outputWidget
->
maximumValue_
=
maxValue
;
// Description Name
QLabel
*
label
=
new
QLabel
(
text
);
// Description Tool Tip
QLabel
*
help
=
new
QLabel
;
help
->
setToolTip
(
toolTip
);
ThemeIcon
helpIcon
(
":/gui/"
,
"question"
);
help
->
setPixmap
(
helpIcon
.
pixmap
(
MainWindow
::
ICON_SIZE_TEXT
));
// Description Units
QComboBox
*
units
=
new
QComboBox
;
units
->
addItem
(
unitsList
);
// Description Layout
QHBoxLayout
*
descriptionLayout
=
new
QHBoxLayout
;
descriptionLayout
->
addWidget
(
label
);
descriptionLayout
->
addWidget
(
help
);
descriptionLayout
->
addStretch
();
descriptionLayout
->
addWidget
(
units
);
// Value Slider
outputWidget
->
slider_
=
new
ctkDoubleRangeSlider
;
ctkDoubleRangeSlider
*
slider
=
outputWidget
->
slider_
;
slider
->
setRange
(
min
,
max
);
slider
->
setValues
(
minValue
,
maxValue
);
slider
->
setSingleStep
(
step
);
slider
->
setOrientation
(
Qt
::
Horizontal
);
connect
(
slider
,
SIGNAL
(
minimumPositionChanged
(
double
)),
outputWidget
,
SLOT
(
slotIntermediateMinimumValue
(
double
)));
if
(
memberIntermediateMinimumValue
)
{
connect
(
outputWidget
,
SIGNAL
(
signalIntermediateMinimumValue
()),
receiver
,
memberIntermediateMinimumValue
);
}
connect
(
slider
,
SIGNAL
(
maximumPositionChanged
(
double
)),
outputWidget
,
SLOT
(
slotIntermediateMaximumValue
(
double
)));
if
(
memberIntermediateMaximumValue
)
{
connect
(
outputWidget
,
SIGNAL
(
signalIntermediateMaximumValue
()),
receiver
,
memberIntermediateMaximumValue
);
}
// Value SpinBox
outputWidget
->
minSpinBox_
=
new
QDoubleSpinBox
;
QDoubleSpinBox
*
minSpinBox
=
outputWidget
->
minSpinBox_
;
minSpinBox
->
setRange
(
min
,
max
);
minSpinBox
->
setValue
(
minValue
);
minSpinBox
->
setSingleStep
(
step
);
connect
(
minSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
outputWidget
,
SLOT
(
slotIntermediateMinimumValue
(
double
)));
outputWidget
->
maxSpinBox_
=
new
QDoubleSpinBox
;
QDoubleSpinBox
*
maxSpinBox
=
outputWidget
->
maxSpinBox_
;
maxSpinBox
->
setRange
(
min
,
max
);
maxSpinBox
->
setValue
(
maxValue
);
maxSpinBox
->
setSingleStep
(
step
);
connect
(
maxSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
outputWidget
,
SLOT
(
slotIntermediateMaximumValue
(
double
)));
// Value Layout
QHBoxLayout
*
valueLayout
=
new
QHBoxLayout
;
valueLayout
->
addWidget
(
new
QLabel
(
"Min"
));
valueLayout
->
addWidget
(
minSpinBox
);
valueLayout
->
addWidget
(
new
QLabel
(
"Max"
));
valueLayout
->
addWidget
(
maxSpinBox
);
// Group Description and Value
QVBoxLayout
*
groupLayout
=
new
QVBoxLayout
;
groupLayout
->
addLayout
(
descriptionLayout
);
groupLayout
->
addWidget
(
slider
);
groupLayout
->
addLayout
(
valueLayout
);
outputWidget
->
setLayout
(
groupLayout
);
}
src/gui/DoubleRangeSliderWidget.hpp
0 → 100644
浏览文件 @
803ed6ea
/*
Copyright 2020 VUKOZ
This file is part of 3D Forest.
3D Forest is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
3D Forest is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file DoubleRangeSliderWidget.hpp */
#ifndef DOUBLE_RANGE_SLIDER_WIDGET_HPP
#define DOUBLE_RANGE_SLIDER_WIDGET_HPP
#include <ExportGui.hpp>
#include <QWidget>
class
ctkDoubleRangeSlider
;
class
QDoubleSpinBox
;
class
QVBoxLayout
;
/** Range Slider Widget with values in double. */
class
EXPORT_GUI
DoubleRangeSliderWidget
:
public
QWidget
{
Q_OBJECT
public:
DoubleRangeSliderWidget
();
static
void
create
(
DoubleRangeSliderWidget
*&
outputWidget
,
const
QObject
*
receiver
,
const
char
*
memberIntermediateMinimumValue
,
const
char
*
memberIntermediateMaximumValue
,
const
QString
&
text
,
const
QString
&
toolTip
,
const
QString
&
unitsList
,
double
step
,
double
min
,
double
max
,
double
minValue
,
double
maxValue
);
void
setMinimum
(
double
min
);
void
setMaximum
(
double
max
);
void
setMinimumValue
(
double
value
);
double
minimumValue
();
void
setMaximumValue
(
double
value
);
double
maximumValue
();
void
blockSignals
(
bool
block
);
signals:
void
signalIntermediateMinimumValue
();
void
signalIntermediateMaximumValue
();
protected
slots
:
void
slotIntermediateMinimumValue
(
double
v
);
void
slotIntermediateMaximumValue
(
double
v
);
protected:
ctkDoubleRangeSlider
*
slider_
;
QDoubleSpinBox
*
minSpinBox_
;
QDoubleSpinBox
*
maxSpinBox_
;
double
minimumValue_
;
double
maximumValue_
;
};
#endif
/* DOUBLE_RANGE_SLIDER_WIDGET_HPP */
src/gui/RangeSliderWidget.cpp
浏览文件 @
803ed6ea
...
...
@@ -29,7 +29,7 @@
#include <QSpinBox>
#include <QVBoxLayout>
#include <ctk
ranges
lider.h>
#include <ctk
RangeS
lider.h>
#define LOG_MODULE_NAME "RangeSliderWidget"
#include <Log.hpp>
...
...
src/plugins/logger/LoggerWindow.cpp
浏览文件 @
803ed6ea
...
...
@@ -84,27 +84,8 @@ void LoggerWindow::slotPrintln(const QString &time,
const
QString
&
module
,
const
QString
&
function
)
{
const
char
*
messageType
=
" "
;
switch
(
type
)
{
case
LOG_TYPE_DEBUG
:
messageType
=
" DBG "
;
break
;
case
LOG_TYPE_WARNING
:
messageType
=
" WRN "
;
break
;
case
LOG_TYPE_ERROR
:
messageType
=
" ERR "
;
break
;
case
LOG_TYPE_INFO
:
messageType
=
" INF "
;
break
;
default:
break
;
}
textEdit_
->
append
(
time
+
messageType
+
text
+
" ["
+
module
+
":"
+
function
+
"]"
);
textEdit_
->
append
(
time
+
QString
(
LogMessage
::
typeString
(
type
))
+
text
+
" ["
+
module
+
":"
+
function
+
"]"
);
}
static
void
loggerWindowQtMessageHandler
(
QtMsgType
type
,
...
...
src/plugins/projectnavigator/ProjectNavigatorItemClipping.cpp
浏览文件 @
803ed6ea
...
...
@@ -21,9 +21,9 @@
#include <Region.hpp>
#include <DoubleRangeSliderWidget.hpp>
#include <MainWindow.hpp>
#include <ProjectNavigatorItemClipping.hpp>
#include <RangeSliderWidget.hpp>
#include <ThemeIcon.hpp>
#include <QHBoxLayout>
...
...
@@ -44,44 +44,47 @@ ProjectNavigatorItemClipping::ProjectNavigatorItemClipping(
LOG_DEBUG
(
<<
"Called."
);
// Input widgets
RangeSliderWidget
::
create
(
rangeInput_
[
0
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"X range"
),
tr
(
"Min-max clipping range filter along X axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
RangeSliderWidget
::
create
(
rangeInput_
[
1
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Y range"
),
tr
(
"Min-max clipping range filter along Y axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
RangeSliderWidget
::
create
(
rangeInput_
[
2
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Z range"
),
tr
(
"Min-max clipping range filter along Z axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
DoubleRangeSliderWidget
::
create
(
rangeInput_
[
0
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"X range"
),
tr
(
"Min-max clipping range filter along X axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
DoubleRangeSliderWidget
::
create
(
rangeInput_
[
1
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Y range"
),
tr
(
"Min-max clipping range filter along Y axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
DoubleRangeSliderWidget
::
create
(
rangeInput_
[
2
],
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Z range"
),
tr
(
"Min-max clipping range filter along Z axis"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
resetButton_
=
new
QPushButton
(
tr
(
"&Reset"
),
this
);
connect
(
resetButton_
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
reset
()));
...
...
@@ -154,7 +157,7 @@ void ProjectNavigatorItemClipping::slotRangeIntermediateMinimumValue()
{
if
(
obj
==
rangeInput_
[
i
])
{
int
v
=
rangeInput_
[
i
]
->
minimumValue
();
double
v
=
rangeInput_
[
i
]
->
minimumValue
();
LOG_DEBUG
(
<<
"Input minimumValue <"
<<
v
<<
">."
);
clipRange_
[
i
].
setMinimumValue
(
v
);
}
...
...
@@ -171,7 +174,7 @@ void ProjectNavigatorItemClipping::slotRangeIntermediateMaximumValue()
{
if
(
obj
==
rangeInput_
[
i
])
{
int
v
=
rangeInput_
[
i
]
->
maximumValue
();
double
v
=
rangeInput_
[
i
]
->
maximumValue
();
LOG_DEBUG
(
<<
"Input maximumValue <"
<<
v
<<
">."
);
clipRange_
[
i
].
setMaximumValue
(
v
);
}
...
...
src/plugins/projectnavigator/ProjectNavigatorItemClipping.hpp
浏览文件 @
803ed6ea
...
...
@@ -27,7 +27,7 @@
#include <Range.hpp>
class
MainWindow
;
class
RangeSliderWidget
;
class
Double
RangeSliderWidget
;
class
QPushButton
;
...
...
@@ -58,7 +58,7 @@ public slots:
void
reset
();
protected:
RangeSliderWidget
*
rangeInput_
[
3
];
Double
RangeSliderWidget
*
rangeInput_
[
3
];
QPushButton
*
resetButton_
;
Range
<
double
>
clipRange_
[
3
];
...
...
src/plugins/projectnavigator/ProjectNavigatorItemDensity.cpp
浏览文件 @
803ed6ea
...
...
@@ -19,9 +19,9 @@
/** @file ProjectNavigatorItemDensity.cpp */
#include <DoubleRangeSliderWidget.hpp>
#include <MainWindow.hpp>
#include <ProjectNavigatorItemDensity.hpp>
#include <RangeSliderWidget.hpp>
#include <QVBoxLayout>
...
...
@@ -31,18 +31,18 @@ ProjectNavigatorItemDensity::ProjectNavigatorItemDensity(MainWindow *mainWindow,
:
ProjectNavigatorItem
(
mainWindow
,
icon
,
text
)
{
// Input widgets
RangeSliderWidget
::
create
(
densityInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Density"
),
tr
(
"Min-max density range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
Double
RangeSliderWidget
::
create
(
densityInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Density"
),
tr
(
"Min-max density range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
// Layout
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
...
...
@@ -83,13 +83,15 @@ void ProjectNavigatorItemDensity::slotUpdate(void *sender,
void
ProjectNavigatorItemDensity
::
slotRangeIntermediateMinimumValue
()
{
densityRange_
.
setMinimumValue
(
densityInput_
->
minimumValue
()
*
0.0039216
F
);
densityRange_
.
setMinimumValue
(
static_cast
<
float
>
(
densityInput_
->
minimumValue
())
*
0.0039216
F
);
densityInputChanged
();
}
void
ProjectNavigatorItemDensity
::
slotRangeIntermediateMaximumValue
()
{
densityRange_
.
setMaximumValue
(
densityInput_
->
maximumValue
()
*
0.0039216
F
);
densityRange_
.
setMaximumValue
(
static_cast
<
float
>
(
densityInput_
->
maximumValue
())
*
0.0039216
F
);
densityInputChanged
();
}
...
...
src/plugins/projectnavigator/ProjectNavigatorItemDensity.hpp
浏览文件 @
803ed6ea
...
...
@@ -27,7 +27,7 @@
#include <Range.hpp>
class
MainWindow
;
class
RangeSliderWidget
;
class
Double
RangeSliderWidget
;
/** Project Navigator Density. */
class
ProjectNavigatorItemDensity
:
public
ProjectNavigatorItem
...
...
@@ -56,7 +56,7 @@ public slots:
void
slotRangeIntermediateMaximumValue
();
protected:
RangeSliderWidget
*
densityInput_
;
Double
RangeSliderWidget
*
densityInput_
;
Range
<
float
>
densityRange_
;
void
densityInputChanged
();
...
...
src/plugins/projectnavigator/ProjectNavigatorItemDescriptor.cpp
浏览文件 @
803ed6ea
...
...
@@ -19,9 +19,9 @@
/** @file ProjectNavigatorItemDescriptor.cpp */
#include <DoubleRangeSliderWidget.hpp>
#include <MainWindow.hpp>
#include <ProjectNavigatorItemDescriptor.hpp>
#include <RangeSliderWidget.hpp>
#include <QVBoxLayout>
...
...
@@ -32,18 +32,18 @@ ProjectNavigatorItemDescriptor::ProjectNavigatorItemDescriptor(
:
ProjectNavigatorItem
(
mainWindow
,
icon
,
text
)
{
// Input widgets
RangeSliderWidget
::
create
(
descriptorInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Descriptor"
),
tr
(
"Min-max descriptor range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
Double
RangeSliderWidget
::
create
(
descriptorInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Descriptor"
),
tr
(
"Min-max descriptor range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
// Layout
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
...
...
@@ -87,15 +87,15 @@ void ProjectNavigatorItemDescriptor::slotUpdate(
void
ProjectNavigatorItemDescriptor
::
slotRangeIntermediateMinimumValue
()
{
descriptorRange_
.
setMinimumValue
(
descriptorInput_
->
minimumValue
()
*
0.0039216
F
);
descriptorRange_
.
setMinimumValue
(
static_cast
<
float
>
(
descriptorInput_
->
minimumValue
())
*
0.0039216
F
);
descriptorInputChanged
();
}
void
ProjectNavigatorItemDescriptor
::
slotRangeIntermediateMaximumValue
()
{
descriptorRange_
.
setMaximumValue
(
descriptorInput_
->
maximumValue
()
*
0.0039216
F
);
descriptorRange_
.
setMaximumValue
(
static_cast
<
float
>
(
descriptorInput_
->
maximumValue
())
*
0.0039216
F
);
descriptorInputChanged
();
}
...
...
src/plugins/projectnavigator/ProjectNavigatorItemDescriptor.hpp
浏览文件 @
803ed6ea
...
...
@@ -27,7 +27,7 @@
#include <Range.hpp>
class
MainWindow
;
class
RangeSliderWidget
;
class
Double
RangeSliderWidget
;
/** Project Navigator Descriptor. */
class
ProjectNavigatorItemDescriptor
:
public
ProjectNavigatorItem
...
...
@@ -56,7 +56,7 @@ public slots:
void
slotRangeIntermediateMaximumValue
();
protected:
RangeSliderWidget
*
descriptorInput_
;
Double
RangeSliderWidget
*
descriptorInput_
;
Range
<
float
>
descriptorRange_
;
void
descriptorInputChanged
();
...
...
src/plugins/projectnavigator/ProjectNavigatorItemElevation.cpp
浏览文件 @
803ed6ea
...
...
@@ -19,9 +19,9 @@
/** @file ProjectNavigatorItemElevation.cpp */
#include <DoubleRangeSliderWidget.hpp>
#include <MainWindow.hpp>
#include <ProjectNavigatorItemElevation.hpp>
#include <RangeSliderWidget.hpp>
#include <QVBoxLayout>
...
...
@@ -32,18 +32,18 @@ ProjectNavigatorItemElevation::ProjectNavigatorItemElevation(
:
ProjectNavigatorItem
(
mainWindow
,
icon
,
text
)
{
// Input widgets
RangeSliderWidget
::
create
(
rangeInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Elevation"
),
tr
(
"Min-max elevation range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
Double
RangeSliderWidget
::
create
(
rangeInput_
,
this
,
SLOT
(
slotRangeIntermediateMinimumValue
()),
SLOT
(
slotRangeIntermediateMaximumValue
()),
tr
(
"Elevation"
),
tr
(
"Min-max elevation range filter"
),
tr
(
"pt"
),
1
,
0
,
100
,
0
,
100
);
// Layout
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
...
...
src/plugins/projectnavigator/ProjectNavigatorItemElevation.hpp
浏览文件 @
803ed6ea
...
...
@@ -27,7 +27,7 @@
#include <Range.hpp>
class
MainWindow
;
class
RangeSliderWidget
;
class
Double
RangeSliderWidget
;
/** Project Navigator Elevation. */
class
ProjectNavigatorItemElevation
:
public
ProjectNavigatorItem
...
...
@@ -56,7 +56,7 @@ public slots:
void
slotRangeIntermediateMaximumValue
();
protected:
RangeSliderWidget
*
rangeInput_
;
Double
RangeSliderWidget
*
rangeInput_
;
Range
<
double
>
elevationRange_
;
void
elevationInputChanged
();
...
...
src/plugins/segmentationl1/SegmentationL1.cpp
浏览文件 @
803ed6ea
...
...
@@ -23,6 +23,7 @@
#include <SegmentationL1.hpp>
#define LOG_MODULE_NAME "SegmentationL1"
#define LOG_MODULE_DEBUG_ENABLED 1
#include <Log.hpp>
SegmentationL1
::
SegmentationL1
(
Editor
*
editor
)
:
context_
(
editor
)
...
...
@@ -30,9 +31,10 @@ SegmentationL1::SegmentationL1(Editor *editor) : context_(editor)
LOG_DEBUG
(
<<
"Create."
);
// Add individual actions from first to last.
actions_
.
push_back
(
&
actionCount_
);
actions_
.
push_back
(
&
actionRandom_
);
actions_
.
push_back
(
&
actionInitializePoints_
);
tasks_
.
push_back
(
&
taskCount_
);
tasks_
.
push_back
(
&
taskRandom_
);
tasks_
.
push_back
(
&
taskSample_
);
tasks_
.
push_back
(
&
taskMedian_
);
clear
();
}
...
...
@@ -71,7 +73,7 @@ bool SegmentationL1::applyParameters(const SegmentationL1Parameters ¶meters)
newAction
=
0
;
}
if
(
newAction
<
action
s_
.
size
())
if
(
newAction
<
task
s_
.
size
())
{
// Restart algorithm calculation from corresponding action.
currentAction_
=
newAction
;
...
...
@@ -88,13 +90,13 @@ bool SegmentationL1::next()
{
LOG_DEBUG
(
<<
"Compute the next step."
);
if
(
currentAction_
<
action
s_
.
size
())
if
(
currentAction_
<
task
s_
.
size
())
{
// Compute one step in the current action.
action
s_
[
currentAction_
]
->
next
();
task
s_
[
currentAction_
]
->
next
();
// Check if the current action is finished.
if
(
action
s_
[
currentAction_
]
->
end
())
if
(
task
s_
[
currentAction_
]
->
end
())
{
// Yes, move to the next action.
currentAction_
++
;
...
...
@@ -102,19 +104,19 @@ bool SegmentationL1::next()
}
}
return
currentAction_
<
action
s_
.
size
();
return
currentAction_
<
task
s_
.
size
();
}
void
SegmentationL1
::
progress
(
size_t
&
nTasks
,
size_t
&
iTask
,
double
&
percent
)
const
{
nTasks
=
action
s_
.
size
();
nTasks
=
task
s_
.
size
();
if
(
currentAction_
<
action
s_
.
size
())
if
(
currentAction_
<
task
s_
.
size
())
{
iTask
=
currentAction_
;
percent
=
action
s_
[
currentAction_
]
->
percent
();
percent
=
task
s_
[
currentAction_
]
->
percent
();
}
else
{
...
...
@@ -125,8 +127,8 @@ void SegmentationL1::progress(size_t &nTasks,
void
SegmentationL1
::
initializeCurrentAction
()
{
if
(
currentAction_
<
action
s_
.
size
())
if
(
currentAction_
<
task
s_
.
size
())
{
action
s_
[
currentAction_
]
->
initialize
(
&
context_
);
task
s_
[
currentAction_
]
->
initialize
(
&
context_
);
}
}
src/plugins/segmentationl1/SegmentationL1.hpp
浏览文件 @
803ed6ea
...
...
@@ -22,10 +22,11 @@
#ifndef SEGMENTATION_L1_HPP
#define SEGMENTATION_L1_HPP
#include <SegmentationL1ActionCount.hpp>
#include <SegmentationL1ActionInitializePoints.hpp>
#include <SegmentationL1ActionRandom.hpp>
#include <SegmentationL1Context.hpp>
#include <SegmentationL1TaskCount.hpp>
#include <SegmentationL1TaskMedian.hpp>
#include <SegmentationL1TaskRandom.hpp>
#include <SegmentationL1TaskSample.hpp>
class
Editor
;
/** Segmentation L1. */
...
...
@@ -47,11 +48,12 @@ public:
private:
SegmentationL1Context
context_
;
SegmentationL1ActionCount
actionCount_
;
SegmentationL1ActionRandom
actionRandom_
;
SegmentationL1ActionInitializePoints
actionInitializePoints_
;
SegmentationL1TaskCount
taskCount_
;
SegmentationL1TaskRandom
taskRandom_
;
SegmentationL1TaskSample
taskSample_
;
SegmentationL1TaskMedian
taskMedian_
;
std
::
vector
<
SegmentationL1
ActionInterface
*>
action
s_
;
std
::
vector
<
SegmentationL1
TaskInterface
*>
task
s_
;
size_t
currentAction_
;
void
initializeCurrentAction
();
...
...
src/plugins/segmentationl1/SegmentationL1Parameters.hpp
浏览文件 @
803ed6ea
...
...
@@ -34,6 +34,7 @@ public:
int
initialSamplesDensityMaximum
;
int
neighborhoodRadiusMinimum
;
int
neighborhoodRadiusMaximum
;
int
numberOfIterations
;
SegmentationL1Parameters
()
{
setDefault
();
}
...
...
@@ -44,6 +45,7 @@ public:
initialSamplesDensityMaximum
=
0
;
neighborhoodRadiusMinimum
=
0
;
neighborhoodRadiusMaximum
=
0
;
numberOfIterations
=
0
;
}
void
setDefault
()
...
...
@@ -53,19 +55,22 @@ public:
initialSamplesDensityMaximum
=
100
;
neighborhoodRadiusMinimum
=
100
;
neighborhoodRadiusMaximum
=
500
;
numberOfIterations
=
1
;
}
void
set
(
int
initialSamplesCount_
,
int
initialSamplesDensityMinimum_
,
int
initialSamplesDensityMaximum_
,
int
neighborhoodRadiusMinimum_
,
int
neighborhoodRadiusMaximum_
)
int
neighborhoodRadiusMaximum_
,
int
numberOfIterations_
)
{
initialSamplesCount
=
initialSamplesCount_
;
initialSamplesDensityMinimum
=
initialSamplesDensityMinimum_
;
initialSamplesDensityMaximum
=
initialSamplesDensityMaximum_
;
neighborhoodRadiusMinimum
=
neighborhoodRadiusMinimum_
;
neighborhoodRadiusMaximum
=
neighborhoodRadiusMaximum_
;
numberOfIterations
=
numberOfIterations_
;
}
};
...
...
@@ -80,7 +85,8 @@ inline std::ostream &operator<<(std::ostream &os,
<<
"> neighborhoodRadiusMinimum <"
<<
obj
.
neighborhoodRadiusMinimum
<<
"> neighborhoodRadiusMaximum <"
<<
obj
.
neighborhoodRadiusMaximum
<<
">"
;
<<
obj
.
neighborhoodRadiusMaximum
<<
"> numberOfIterations <"
<<
obj
.
numberOfIterations
<<
">"
;
}
#endif
/* SEGMENTATION_L1_PARAMETERS_HPP */
src/plugins/segmentationl1/SegmentationL1
Action
Count.hpp
→
src/plugins/segmentationl1/SegmentationL1
Task
Count.hpp
浏览文件 @
803ed6ea
...
...
@@ -17,16 +17,16 @@
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SegmentationL1
Action
Count.hpp */
/** @file SegmentationL1
Task
Count.hpp */
#ifndef SEGMENTATION_L1_
ACTION
_COUNT_HPP
#define SEGMENTATION_L1_
ACTION
_COUNT_HPP
#ifndef SEGMENTATION_L1_
TASK
_COUNT_HPP
#define SEGMENTATION_L1_
TASK
_COUNT_HPP
#include <Editor.hpp>
#include <SegmentationL1
Action
Interface.hpp>
#include <SegmentationL1
Task
Interface.hpp>
/** Segmentation L1
Action
Count. */
class
SegmentationL1
ActionCount
:
public
SegmentationL1Action
Interface
/** Segmentation L1
Task
Count. */
class
SegmentationL1
TaskCount
:
public
SegmentationL1Task
Interface
{
public:
virtual
void
initialize
(
SegmentationL1Context
*
context
)
...
...
@@ -84,4 +84,4 @@ private:
SegmentationL1Context
*
context_
;
};
#endif
/* SEGMENTATION_L1_
ACTION
_COUNT_HPP */
#endif
/* SEGMENTATION_L1_
TASK
_COUNT_HPP */
src/plugins/segmentationl1/SegmentationL1
Action
Interface.hpp
→
src/plugins/segmentationl1/SegmentationL1
Task
Interface.hpp
浏览文件 @
803ed6ea
...
...
@@ -17,23 +17,23 @@
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SegmentationL1
Action
Interface.hpp */
/** @file SegmentationL1
Task
Interface.hpp */
#ifndef SEGMENTATION_L1_
ACTION
_INTERFACE_HPP
#define SEGMENTATION_L1_
ACTION
_INTERFACE_HPP
#ifndef SEGMENTATION_L1_
TASK
_INTERFACE_HPP
#define SEGMENTATION_L1_
TASK
_INTERFACE_HPP
#include <ProgressActionInterface.hpp>
#include <SegmentationL1Context.hpp>
/** Segmentation L1
Action
Interface. */
class
SegmentationL1
Action
Interface
:
public
ProgressActionInterface
/** Segmentation L1
Task
Interface. */
class
SegmentationL1
Task
Interface
:
public
ProgressActionInterface
{
public:
SegmentationL1
Action
Interface
()
:
ProgressActionInterface
(){};
virtual
~
SegmentationL1
Action
Interface
()
=
default
;
SegmentationL1
Task
Interface
()
:
ProgressActionInterface
(){};
virtual
~
SegmentationL1
Task
Interface
()
=
default
;
virtual
void
initialize
(
SegmentationL1Context
*
context
)
=
0
;
virtual
void
next
()
=
0
;
};
#endif
/* SEGMENTATION_L1_
ACTION
_INTERFACE_HPP */
#endif
/* SEGMENTATION_L1_
TASK
_INTERFACE_HPP */
src/plugins/segmentationl1/SegmentationL1
ActionInitializePoints
.hpp
→
src/plugins/segmentationl1/SegmentationL1
TaskMedian
.hpp
浏览文件 @
803ed6ea
...
...
@@ -17,26 +17,24 @@
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SegmentationL1
ActionInitializePoints
.hpp */
/** @file SegmentationL1
TaskMedian
.hpp */
#ifndef SEGMENTATION_L1_
ACTION_INITIALIZE_POINTS
_HPP
#define SEGMENTATION_L1_
ACTION_INITIALIZE_POINTS
_HPP
#ifndef SEGMENTATION_L1_
TASK_MEDIAN
_HPP
#define SEGMENTATION_L1_
TASK_MEDIAN
_HPP
#include <Editor.hpp>
#include <SegmentationL1
Action
Interface.hpp>
#include <SegmentationL1
Task
Interface.hpp>
/** Segmentation L1 Initialize Points. */
class
SegmentationL1ActionInitializePoints
:
public
SegmentationL1ActionInterface
/** Segmentation L1 Task Median. */
class
SegmentationL1TaskMedian
:
public
SegmentationL1TaskInterface
{
public:
virtual
void
initialize
(
SegmentationL1Context
*
context
)
{
context_
=
context
;
context_
->
query
.
reset
();
index_
=
0
;
ProgressActionInterface
::
initialize
(
context_
->
tot
alSamplesCount
,
ProgressActionInterface
::
initialize
(
context_
->
initi
alSamplesCount
,
1000UL
);
}
...
...
@@ -50,8 +48,6 @@ public:
while
(
i
<
n
)
{
i
++
;
index_
++
;
if
(
timedOut
())
{
break
;
...
...
@@ -63,7 +59,6 @@ public:
private:
SegmentationL1Context
*
context_
;
size_t
index_
;
};
#endif
/* SEGMENTATION_L1_
ACTION_INITIALIZE_POINTS
_HPP */
#endif
/* SEGMENTATION_L1_
TASK_MEDIAN
_HPP */
src/plugins/segmentationl1/SegmentationL1
Action
Random.hpp
→
src/plugins/segmentationl1/SegmentationL1
Task
Random.hpp
浏览文件 @
803ed6ea
...
...
@@ -17,23 +17,22 @@
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SegmentationL1
Action
Random.hpp */
/** @file SegmentationL1
Task
Random.hpp */
#ifndef SEGMENTATION_L1_
ACTION
_RANDOM_HPP
#define SEGMENTATION_L1_
ACTION
_RANDOM_HPP
#ifndef SEGMENTATION_L1_
TASK
_RANDOM_HPP
#define SEGMENTATION_L1_
TASK
_RANDOM_HPP
#include <Editor.hpp>
#include <SegmentationL1
Action
Interface.hpp>
#include <SegmentationL1
Task
Interface.hpp>
/** Segmentation L1
Action
Random. */
class
SegmentationL1
ActionRandom
:
public
SegmentationL1Action
Interface
/** Segmentation L1
Task
Random. */
class
SegmentationL1
TaskRandom
:
public
SegmentationL1Task
Interface
{
public:
virtual
void
initialize
(
SegmentationL1Context
*
context
)
{
context_
=
context
;
context_
->
query
.
reset
();
index_
=
0
;
uint64_t
max
=
context_
->
totalSamplesCount
;
size_t
n
=
0
;
...
...
@@ -50,6 +49,14 @@ public:
context_
->
initialSamplesCount
=
n
;
context_
->
points
.
resize
(
n
);
pointsIndex_
=
0
;
dataFrom_
=
0
;
dataStep_
=
0
;
if
(
n
>
0
)
{
dataStep_
=
context_
->
totalSamplesCount
/
n
;
}
ProgressActionInterface
::
initialize
(
context_
->
initialSamplesCount
,
1000UL
);
}
...
...
@@ -64,12 +71,13 @@ public:
while
(
i
<
n
)
{
uint64_t
r
=
static_cast
<
uint64_t
>
(
rand
());
r
%=
context_
->
totalSamplesCount
;
context_
->
points
[
i
ndex_
].
index
=
r
;
r
=
dataFrom_
+
(
r
%
dataStep_
)
;
context_
->
points
[
pointsI
ndex_
].
index
=
r
;
i
++
;
index_
++
;
pointsIndex_
++
;
dataFrom_
+=
dataStep_
;
i
++
;
if
(
timedOut
())
{
break
;
...
...
@@ -81,7 +89,9 @@ public:
private:
SegmentationL1Context
*
context_
;
size_t
index_
;
size_t
pointsIndex_
;
uint64_t
dataFrom_
;
uint64_t
dataStep_
;
};
#endif
/* SEGMENTATION_L1_
ACTION
_RANDOM_HPP */
#endif
/* SEGMENTATION_L1_
TASK
_RANDOM_HPP */
src/plugins/segmentationl1/SegmentationL1TaskSample.hpp
0 → 100644
浏览文件 @
803ed6ea
/*
Copyright 2020 VUKOZ
This file is part of 3D Forest.
3D Forest is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
3D Forest is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with 3D Forest. If not, see <https://www.gnu.org/licenses/>.
*/
/** @file SegmentationL1TaskSample.hpp */
#ifndef SEGMENTATION_L1_TASK_SAMPLE_HPP
#define SEGMENTATION_L1_TASK_SAMPLE_HPP
#include <Editor.hpp>
#include <SegmentationL1TaskInterface.hpp>
/** Segmentation L1 Task Sample. */
class
SegmentationL1TaskSample
:
public
SegmentationL1TaskInterface
{
public:
virtual
void
initialize
(
SegmentationL1Context
*
context
)
{
context_
=
context
;
context_
->
query
.
reset
();
pointsIndex_
=
0
;
dataIndex_
=
0
;
ProgressActionInterface
::
initialize
(
context_
->
totalSamplesCount
,
1000UL
);
}
virtual
void
next
()
{
uint64_t
n
=
process
();
uint64_t
i
=
0
;
startTimer
();
while
(
i
<
n
)
{
if
(
pointsIndex_
<
context_
->
points
.
size
()
&&
context_
->
query
.
next
()
&&
context_
->
points
[
pointsIndex_
].
index
==
dataIndex_
)
{
context_
->
points
[
pointsIndex_
].
x
=
context_
->
query
.
x
();
context_
->
points
[
pointsIndex_
].
y
=
context_
->
query
.
y
();
context_
->
points
[
pointsIndex_
].
z
=
context_
->
query
.
z
();
pointsIndex_
++
;
}
dataIndex_
++
;
i
++
;
if
(
timedOut
())
{
break
;
}
}
increment
(
i
);
}
private:
SegmentationL1Context
*
context_
;
size_t
pointsIndex_
;
uint64_t
dataIndex_
;
};
#endif
/* SEGMENTATION_L1_TASK_SAMPLE_HPP */
src/plugins/segmentationl1/SegmentationL1Window.cpp
浏览文件 @
803ed6ea
...
...
@@ -41,6 +41,7 @@ SegmentationL1Window::SegmentationL1Window(MainWindow *mainWindow)
initialSamplesCountInput_
(
nullptr
),
initialSamplesDensityInput_
(
nullptr
),
neighborhoodRadiusInput_
(
nullptr
),
numberOfIterationsInput_
(
nullptr
),
segmentationL1_
(
&
mainWindow
->
editor
())
{
LOG_DEBUG
(
<<
"Create."
);
...
...
@@ -49,7 +50,7 @@ SegmentationL1Window::SegmentationL1Window(MainWindow *mainWindow)
SliderWidget
::
create
(
initialSamplesCountInput_
,
this
,
nullptr
,
SLOT
(
slot
InitialSamplesCountFinalValue
()),
SLOT
(
slot
ParametersChanged
()),
tr
(
"Number of initial samples"
),
tr
(
"Number of initial samples"
),
tr
(
"%"
),
...
...
@@ -60,10 +61,11 @@ SegmentationL1Window::SegmentationL1Window(MainWindow *mainWindow)
RangeSliderWidget
::
create
(
initialSamplesDensityInput_
,
this
,
SLOT
(
slotInitialSamplesDensityMinimumValue
()),
SLOT
(
slotInitialSamplesDensityMaximumValue
()),
tr
(
"Density range of initial samples"
),
SLOT
(
slotParametersChanged
()),
SLOT
(
slotParametersChanged
()),
tr
(
"Density range of initial samples"
),
tr
(
"Density range of initial samples"
" to filter out leaves"
),
tr
(
"%"
),
1
,
0
,
...
...
@@ -73,8 +75,8 @@ SegmentationL1Window::SegmentationL1Window(MainWindow *mainWindow)
RangeSliderWidget
::
create
(
neighborhoodRadiusInput_
,
this
,
SLOT
(
slot
NeighborhoodRadiusMinimumValue
()),
SLOT
(
slot
NeighborhoodRadiusMaximumValue
()),
SLOT
(
slot
ParametersChanged
()),
SLOT
(
slot
ParametersChanged
()),
tr
(
"Neighborhood radius range"
),
tr
(
"Neighborhood radius range"
),
tr
(
"pt"
),
...
...
@@ -84,11 +86,24 @@ SegmentationL1Window::SegmentationL1Window(MainWindow *mainWindow)
parameters_
.
neighborhoodRadiusMinimum
,
parameters_
.
neighborhoodRadiusMaximum
);
SliderWidget
::
create
(
numberOfIterationsInput_
,
this
,
nullptr
,
SLOT
(
slotParametersChanged
()),
tr
(
"Number of iterations"
),
tr
(
"Number of iterations"
),
tr
(
"cnt"
),
1
,
1
,
100
,
parameters_
.
numberOfIterations
);
// Create layout with parameters.
QVBoxLayout
*
settingsLayout
=
new
QVBoxLayout
;
settingsLayout
->
addWidget
(
initialSamplesCountInput_
);
settingsLayout
->
addWidget
(
initialSamplesDensityInput_
);
settingsLayout
->
addWidget
(
initialSamplesCountInput_
);
settingsLayout
->
addWidget
(
neighborhoodRadiusInput_
);
settingsLayout
->
addWidget
(
numberOfIterationsInput_
);
// Create widget layout.
QVBoxLayout
*
widgetLayout
=
new
QVBoxLayout
;
...
...
@@ -110,7 +125,8 @@ bool SegmentationL1Window::applyParameters()
initialSamplesDensityInput_
->
minimumValue
(),
initialSamplesDensityInput_
->
maximumValue
(),
neighborhoodRadiusInput_
->
minimumValue
(),
neighborhoodRadiusInput_
->
maximumValue
());
neighborhoodRadiusInput_
->
maximumValue
(),
numberOfIterationsInput_
->
value
());
LOG_DEBUG
(
<<
"Apply parameters <"
<<
parameters_
<<
">."
);
...
...
@@ -136,37 +152,8 @@ void SegmentationL1Window::updateData()
mainWindow_
->
update
({
Editor
::
TYPE_LAYER
});
}
void
SegmentationL1Window
::
slotInitialSamplesCountFinalValue
()
{
LOG_DEBUG
(
<<
"New value for the number of initial samples <"
<<
initialSamplesCountInput_
->
value
()
<<
">."
);
emit
signalParametersChanged
();
}
void
SegmentationL1Window
::
slotInitialSamplesDensityMinimumValue
()
{
LOG_DEBUG
(
<<
"New value for minimum density of initial samples <"
<<
initialSamplesDensityInput_
->
minimumValue
()
<<
">."
);
emit
signalParametersChanged
();
}
void
SegmentationL1Window
::
slotInitialSamplesDensityMaximumValue
()
{
LOG_DEBUG
(
<<
"New value for maximum density of initial samples <"
<<
initialSamplesDensityInput_
->
maximumValue
()
<<
">."
);
emit
signalParametersChanged
();
}
void
SegmentationL1Window
::
slotNeighborhoodRadiusMinimumValue
()
{
LOG_DEBUG
(
<<
"New value for minimum neighborhood radius <"
<<
neighborhoodRadiusInput_
->
minimumValue
()
<<
">."
);
emit
signalParametersChanged
();
}
void
SegmentationL1Window
::
slotNeighborhoodRadiusMaximumValue
()
void
SegmentationL1Window
::
slotParametersChanged
()
{
LOG_DEBUG
(
<<
"New value for maximum neighborhood radius <"
<<
neighborhoodRadiusInput_
->
maximumValue
()
<<
">."
);
LOG_DEBUG
(
<<
"New value for some input parameter."
);
emit
signalParametersChanged
();
}
src/plugins/segmentationl1/SegmentationL1Window.hpp
浏览文件 @
803ed6ea
...
...
@@ -47,11 +47,7 @@ public:
/**@}*/
protected
slots
:
void
slotInitialSamplesCountFinalValue
();
void
slotInitialSamplesDensityMinimumValue
();
void
slotInitialSamplesDensityMaximumValue
();
void
slotNeighborhoodRadiusMinimumValue
();
void
slotNeighborhoodRadiusMaximumValue
();
void
slotParametersChanged
();
private:
MainWindow
*
mainWindow_
;
...
...
@@ -59,6 +55,7 @@ private:
SliderWidget
*
initialSamplesCountInput_
;
RangeSliderWidget
*
initialSamplesDensityInput_
;
RangeSliderWidget
*
neighborhoodRadiusInput_
;
SliderWidget
*
numberOfIterationsInput_
;
SegmentationL1
segmentationL1_
;
SegmentationL1Parameters
parameters_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录