Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
e2b935f7
Commit
e2b935f7
authored
Dec 06, 2010
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE]
parents
e92b428a
0409804b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
22 deletions
+66
-22
doc/user/walnut.cfg.devel
doc/user/walnut.cfg.devel
+8
-0
doc/user/walnut.cfg.mpi
doc/user/walnut.cfg.mpi
+8
-0
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+2
-2
src/gui/qt4/controlPanel/WQtControlPanel.cpp
src/gui/qt4/controlPanel/WQtControlPanel.cpp
+23
-4
src/modules/teemGlyphs/WMTeemGlyphs.cpp
src/modules/teemGlyphs/WMTeemGlyphs.cpp
+18
-13
src/modules/teemGlyphs/WMTeemGlyphs.h
src/modules/teemGlyphs/WMTeemGlyphs.h
+7
-3
No files found.
doc/user/walnut.cfg.devel
View file @
e2b935f7
...
...
@@ -55,6 +55,14 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
...
...
doc/user/walnut.cfg.mpi
View file @
e2b935f7
...
...
@@ -58,6 +58,14 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
...
...
src/gui/qt4/WMainWindow.cpp
View file @
e2b935f7
...
...
@@ -579,7 +579,7 @@ void WMainWindow::projectSave( const std::vector< boost::shared_ptr< WProjectFil
fd
.
setAcceptMode
(
QFileDialog
::
AcceptSave
);
QStringList
filters
;
filters
<<
"Project File (*.owproj)"
filters
<<
"Project File (*.owproj
*.owp
)"
<<
"Any files (*)"
;
fd
.
setNameFilters
(
filters
);
fd
.
setViewMode
(
QFileDialog
::
Detail
);
...
...
@@ -652,7 +652,7 @@ void WMainWindow::projectLoad()
fd
.
setFileMode
(
QFileDialog
::
ExistingFiles
);
QStringList
filters
;
filters
<<
"Simple Project File (*.owproj)"
filters
<<
"Simple Project File (*.owproj
*.owp
)"
<<
"Any files (*)"
;
fd
.
setNameFilters
(
filters
);
fd
.
setViewMode
(
QFileDialog
::
Detail
);
...
...
src/gui/qt4/controlPanel/WQtControlPanel.cpp
View file @
e2b935f7
...
...
@@ -91,7 +91,17 @@ WQtControlPanel::WQtControlPanel( WMainWindow* parent )
m_moduleTreeWidget
->
addAction
(
separator
);
m_deleteModuleAction
=
new
QAction
(
WQt4Gui
::
getMainWindow
()
->
getIconManager
()
->
getIcon
(
"remove"
),
"Remove Module"
,
m_moduleTreeWidget
);
m_deleteModuleAction
->
setShortcut
(
QKeySequence
(
Qt
::
Key_Backspace
)
);
{
// Set the key for removing modules
std
::
string
deleteKey
=
""
;
WPreferences
::
getPreference
(
"qt4gui.deleteModuleKey"
,
&
deleteKey
);
if
(
deleteKey
==
""
)
{
deleteKey
=
"Backspace"
;
}
m_deleteModuleAction
->
setShortcut
(
QKeySequence
(
QString
::
fromStdString
(
deleteKey
)
)
);
}
connect
(
m_deleteModuleAction
,
SIGNAL
(
triggered
()
),
this
,
SLOT
(
deleteModuleTreeItem
()
)
);
m_moduleTreeWidget
->
addAction
(
m_deleteModuleAction
);
...
...
@@ -147,8 +157,17 @@ WQtControlPanel::WQtControlPanel( WMainWindow* parent )
connectSlots
();
QShortcut
*
shortcut
=
new
QShortcut
(
QKeySequence
(
Qt
::
Key_Delete
),
m_roiTreeWidget
);
connect
(
shortcut
,
SIGNAL
(
activated
()
),
this
,
SLOT
(
deleteROITreeItem
()
)
);
{
// Set the key for removing ROIs and connect the event
std
::
string
deleteKey
=
""
;
WPreferences
::
getPreference
(
"qt4gui.deleteROIKey"
,
&
deleteKey
);
if
(
deleteKey
==
""
)
{
deleteKey
=
"Delete"
;
}
QShortcut
*
shortcut
=
new
QShortcut
(
QKeySequence
(
QString
::
fromStdString
(
deleteKey
)
),
m_roiTreeWidget
);
connect
(
shortcut
,
SIGNAL
(
activated
()
),
this
,
SLOT
(
deleteROITreeItem
()
)
);
}
}
WQtControlPanel
::~
WQtControlPanel
()
...
...
@@ -1034,5 +1053,5 @@ void WQtControlPanel::selectUpperMostEntry()
void
WQtControlPanel
::
handleDragDrop
()
{
std
::
cout
<<
"huhu"
<<
std
::
endl
;
WLogger
::
getLogger
()
->
addLogMessage
(
"Drag and drop handler not implemented yet!"
,
"ControlPanel"
,
LL_DEBUG
)
;
}
src/modules/teemGlyphs/WMTeemGlyphs.cpp
View file @
e2b935f7
...
...
@@ -158,19 +158,27 @@ void WMTeemGlyphs::properties()
m_sliceOrientations
->
addItem
(
"x"
,
"x-slice"
);
m_sliceOrientations
->
addItem
(
"y"
,
"y-slice"
);
m_sliceOrientations
->
addItem
(
"z"
,
"z-slice"
);
m_sliceOrientationSelection
=
m_properties
->
addProperty
(
"Slice orientation"
,
m_sliceOrientationSelection
Prop
=
m_properties
->
addProperty
(
"Slice orientation"
,
"Which slice will be shown?"
,
m_sliceOrientations
->
getSelector
(
1
),
m_recompute
);
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_sliceOrientationSelection
);
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_sliceOrientationSelection
Prop
);
m_sliceIdProp
=
m_properties
->
addProperty
(
"Slice ID"
,
"Number of the slice to display"
,
100
,
m_recompute
);
m_sliceIdProp
->
setMin
(
0
);
m_sliceIdProp
->
setMax
(
128
);
m_orderProp
=
m_properties
->
addProperty
(
"Order"
,
"Will be rounded to the next even order"
,
4
,
m_recompute
);
m_orderProp
->
setMin
(
2
);
m_orderProp
->
setMax
(
6
);
m_orders
=
boost
::
shared_ptr
<
WItemSelection
>
(
new
WItemSelection
()
);
m_orders
->
addItem
(
"2"
,
"Order 2"
);
m_orders
->
addItem
(
"4"
,
"Order 4"
);
m_orders
->
addItem
(
"6"
,
"Order 6"
);
m_orderProp
=
m_properties
->
addProperty
(
"Order"
,
"Order of the displayed spherical harmonics."
" If actual order is higer, the additional coefficients are ignored."
,
m_orders
->
getSelector
(
1
),
m_recompute
);
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_orderProp
);
m_GFAThresholdProp
=
m_properties
->
addProperty
(
"GFA threshold"
,
"Show only glyphs at voxels above the given generalized fractional"
" anisotropy (GFA) threshold"
...
...
@@ -222,6 +230,7 @@ void WMTeemGlyphs::moduleMain()
m_moduleState
.
wait
();
continue
;
}
// std::cout << "FA: " << m_GFAThresholdProp->get( true ) << std::endl;
if
(
m_input
->
getData
().
get
()
)
{
bool
dataChanged
=
false
;
...
...
@@ -233,7 +242,7 @@ void WMTeemGlyphs::moduleMain()
}
boost
::
shared_ptr
<
WGridRegular3D
>
gridReg
=
boost
::
shared_dynamic_cast
<
WGridRegular3D
>
(
m_input
->
getData
().
get
()
->
getGrid
()
);
switch
(
m_sliceOrientationSelection
->
get
(
true
).
getItemIndexOfSelected
(
0
)
)
switch
(
m_sliceOrientationSelection
Prop
->
get
(
true
).
getItemIndexOfSelected
(
0
)
)
{
case
0
:
m_sliceIdProp
->
setMax
(
gridReg
->
getNbCoordsX
()
-
1
);
...
...
@@ -258,11 +267,6 @@ void WMTeemGlyphs::moduleMain()
m_GFAThresholdProp
->
setMin
(
gfa
->
getMin
()
);
}
if
(
m_orderProp
->
get
()
%
2
!=
0
)
{
m_orderProp
->
set
(
m_orderProp
->
get
()
+
1
);
}
renderSlice
(
m_sliceIdProp
->
get
()
);
}
...
...
@@ -277,7 +281,8 @@ void WMTeemGlyphs::renderSlice( size_t sliceId )
progress
=
boost
::
shared_ptr
<
WProgress
>
(
new
WProgress
(
"Glyph Generation"
,
2
)
);
m_progress
->
addSubProgress
(
progress
);
size_t
sliceType
=
m_sliceOrientationSelection
->
get
(
true
).
getItemIndexOfSelected
(
0
);
size_t
sliceType
=
m_sliceOrientationSelectionProp
->
get
(
true
).
getItemIndexOfSelected
(
0
);
size_t
order
=
boost
::
lexical_cast
<
float
>
(
m_orders
->
getSelector
(
m_orderProp
->
get
().
getItemIndexOfSelected
(
0
)
)
.
at
(
0
)
->
getName
()
);
// Please look here http://www.ci.uchicago.edu/~schultz/sphinx/home-glyph.htm
if
(
m_moduleNode
)
...
...
@@ -293,7 +298,7 @@ void WMTeemGlyphs::renderSlice( size_t sliceId )
boost
::
shared_dynamic_cast
<
WDataSetScalar
>
(
m_inputGFA
->
getData
()
),
m_GFAThresholdProp
->
get
(),
sliceId
,
m_orderProp
->
get
()
,
order
,
m_subdivisionLevelProp
->
get
(),
m_moduloProp
->
get
(),
sliceType
,
...
...
src/modules/teemGlyphs/WMTeemGlyphs.h
View file @
e2b935f7
...
...
@@ -29,8 +29,10 @@
#include <osg/Geode>
#include "../../dataHandler/WDataSetSphericalHarmonics.h"
#include "../../common/WItemSelection.h"
#include "../../common/WItemSelector.h"
#include "../../dataHandler/WDataSetScalar.h"
#include "../../dataHandler/WDataSetSphericalHarmonics.h"
#include "../../graphicsEngine/WShader.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
...
...
@@ -134,13 +136,15 @@ private:
boost
::
shared_ptr
<
WModuleInputData
<
WDataSetScalar
>
>
m_inputGFA
;
//!< The input for the GFA.
osg
::
ref_ptr
<
WShader
>
m_shader
;
//!< The shader used for the glyph surfaces
boost
::
shared_ptr
<
WItemSelection
>
m_sliceOrientations
;
//!< A list of the selectable slice orientations, i.e x, y and z.
WPropSelection
m_sliceOrientationSelection
;
//!< To choose whether to x, y or z slice.
WPropSelection
m_sliceOrientationSelection
Prop
;
//!< To choose whether to x, y or z slice.
WPropBool
m_usePolarPlotProp
;
//!< Property indicating whether to use polar plot instead of HOME glyph
WPropBool
m_useNormalizationProp
;
//!< Indicates whether to us radius normalization.
WPropDouble
m_GFAThresholdProp
;
//!< Property holding the threshold of GFA above which glyphs should be drawn.
WPropDouble
m_glyphSizeProp
;
//!< Property holding the size of the displayed glyphs
WPropInt
m_sliceIdProp
;
//!< Property holding the slice ID
WPropInt
m_orderProp
;
//!< Property holding the order of the SH to show.
boost
::
shared_ptr
<
WItemSelection
>
m_orders
;
//!< A list of the selectable orders
WPropSelection
m_orderProp
;
//!< Property holding the order of the SH to show.
WPropInt
m_moduloProp
;
//!< Property holding information on how many glyphs will be omited between two glyphs (modulo-1).
WPropInt
m_subdivisionLevelProp
;
//!< Property holding information on the subdivision level of the spheres (resolution).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment