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
bdd5c49f
Commit
bdd5c49f
authored
Oct 08, 2010
by
schurade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLEAN] further clean up of the fiber display module
parent
9e451ce0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
52 deletions
+9
-52
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+9
-40
src/modules/fiberDisplay/WMFiberDisplay.h
src/modules/fiberDisplay/WMFiberDisplay.h
+0
-12
No files found.
src/modules/fiberDisplay/WMFiberDisplay.cpp
View file @
bdd5c49f
...
...
@@ -165,9 +165,6 @@ void WMFiberDisplay::properties()
{
m_propCondition
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
m_customColoring
=
m_properties
->
addProperty
(
"Custom coloring"
,
"Switches the coloring between custom and predefined."
,
false
,
m_propCondition
);
m_coloring
=
m_properties
->
addProperty
(
"Global or local coloring"
,
"Switches the coloring between global and local."
,
true
,
m_propCondition
);
m_useTubesProp
=
m_properties
->
addProperty
(
"Use tubes"
,
"Draw fiber tracts as fake tubes."
,
false
,
m_propCondition
);
m_useTextureProp
=
m_properties
->
addProperty
(
"Use texture"
,
"Texture fibers with the texture on top of the list."
,
false
,
m_propCondition
);
m_tubeThickness
=
m_properties
->
addProperty
(
"Tube thickness"
,
"Adjusts the thickness of the tubes."
,
50.
,
m_propCondition
);
...
...
@@ -217,11 +214,6 @@ void WMFiberDisplay::moduleMain()
inputUpdated
();
}
if
(
m_tubeThickness
->
changed
()
)
{
adjustTubes
();
}
if
(
m_showCullBox
->
changed
()
)
{
if
(
m_showCullBox
->
get
()
)
...
...
@@ -394,39 +386,9 @@ void WMFiberDisplay::updateRenderModes()
}
}
void
WMFiberDisplay
::
toggleColoring
()
{
if
(
m_coloring
->
changed
()
||
m_customColoring
->
changed
()
)
{
if
(
m_customColoring
->
get
(
true
)
)
{
m_fiberDrawable
->
setColor
(
m_dataset
->
getColorScheme
(
"Custom Color"
)
->
getColor
()
);
}
else
{
if
(
m_coloring
->
get
(
true
)
)
{
m_fiberDrawable
->
setColor
(
m_dataset
->
getGlobalColors
()
);
}
else
{
m_fiberDrawable
->
setColor
(
m_dataset
->
getLocalColors
()
);
}
}
}
}
void
WMFiberDisplay
::
adjustTubes
()
{
if
(
m_tubeThickness
->
changed
()
&&
m_useTubesProp
->
get
()
)
{
m_uniformTubeThickness
->
set
(
static_cast
<
float
>
(
m_tubeThickness
->
get
(
true
)
)
);
}
}
void
WMFiberDisplay
::
saveSelected
()
{
boost
::
shared_ptr
<
std
::
vector
<
bool
>
>
active
=
WKernel
::
getRunningKernel
()
->
getSelectionManager
()
->
getBitF
ield
();
boost
::
shared_ptr
<
std
::
vector
<
bool
>
>
active
=
m_fiberSelector
->
getBitf
ield
();
m_dataset
->
saveSelected
(
m_saveFileName
->
getAsString
(),
active
);
}
...
...
@@ -476,6 +438,13 @@ void WMFiberDisplay::notifyTextureChange()
void
WMFiberDisplay
::
updateCallback
()
{
update
();
toggleColoring
();
m_fiberDrawable
->
setColor
(
m_dataset
->
getColorScheme
()
->
getColor
()
);
if
(
m_tubeThickness
->
changed
()
&&
m_useTubesProp
->
get
()
)
{
m_uniformTubeThickness
->
set
(
static_cast
<
float
>
(
m_tubeThickness
->
get
(
true
)
)
);
}
updateRenderModes
();
}
src/modules/fiberDisplay/WMFiberDisplay.h
View file @
bdd5c49f
...
...
@@ -129,11 +129,6 @@ protected:
*/
void
updateRenderModes
();
/**
* Enable disable global or local coloring
*/
void
toggleColoring
();
private:
/**
* function gets called when the input connector has been updated
...
...
@@ -150,8 +145,6 @@ private:
*/
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
WPropBool
m_coloring
;
//!< Enable/Disable global (true) or local (false) coloring of the fiber tracts
WPropBool
m_customColoring
;
//!< Enable/Disable custom colors
WPropBool
m_useTubesProp
;
//!< Property indicating whether to use tubes for the fibers tracts.
WPropBool
m_useTextureProp
;
//!< Property indicating whether to use tubes for the fibers tracts.
WPropDouble
m_tubeThickness
;
//!< Property determining the thickness of tubes .
...
...
@@ -256,11 +249,6 @@ private:
osg
::
ref_ptr
<
WROIBox
>
m_cullBox
;
//!< stores a pointer to the cull box
/**
* changes tube parameters
*/
void
adjustTubes
();
/**
* saves the currently selected (active field from roi manager) fibers to a file
*/
...
...
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