Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
c48c67f5
Commit
c48c67f5
authored
Jul 09, 2010
by
Sebastian Eichelbaum
Browse files
[CHANGE] - moved some modules to the kernel as they can't be build separately yet.
parent
37142ba4
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
149 additions
and
37 deletions
+149
-37
src/kernel/modules/data/WMData.cpp
src/kernel/modules/data/WMData.cpp
+66
-9
src/kernel/modules/data/WMData.h
src/kernel/modules/data/WMData.h
+55
-0
src/kernel/modules/data/data.png
src/kernel/modules/data/data.png
+0
-0
src/kernel/modules/data/data.xpm
src/kernel/modules/data/data.xpm
+0
-0
src/kernel/modules/fiberDisplay/CMakeLists.txt
src/kernel/modules/fiberDisplay/CMakeLists.txt
+0
-0
src/kernel/modules/fiberDisplay/WKdTree.cpp
src/kernel/modules/fiberDisplay/WKdTree.cpp
+2
-2
src/kernel/modules/fiberDisplay/WKdTree.h
src/kernel/modules/fiberDisplay/WKdTree.h
+1
-1
src/kernel/modules/fiberDisplay/WMFiberDisplay.cpp
src/kernel/modules/fiberDisplay/WMFiberDisplay.cpp
+7
-7
src/kernel/modules/fiberDisplay/WMFiberDisplay.h
src/kernel/modules/fiberDisplay/WMFiberDisplay.h
+5
-5
src/kernel/modules/fiberDisplay/WRMBranch.cpp
src/kernel/modules/fiberDisplay/WRMBranch.cpp
+0
-0
src/kernel/modules/fiberDisplay/WRMBranch.h
src/kernel/modules/fiberDisplay/WRMBranch.h
+1
-1
src/kernel/modules/fiberDisplay/WRMROIRepresentation.cpp
src/kernel/modules/fiberDisplay/WRMROIRepresentation.cpp
+4
-4
src/kernel/modules/fiberDisplay/WRMROIRepresentation.h
src/kernel/modules/fiberDisplay/WRMROIRepresentation.h
+2
-2
src/kernel/modules/fiberDisplay/WROIManagerFibers.cpp
src/kernel/modules/fiberDisplay/WROIManagerFibers.cpp
+2
-2
src/kernel/modules/fiberDisplay/WROIManagerFibers.h
src/kernel/modules/fiberDisplay/WROIManagerFibers.h
+0
-0
src/kernel/modules/fiberDisplay/WRoiProjectFileIO.cpp
src/kernel/modules/fiberDisplay/WRoiProjectFileIO.cpp
+1
-1
src/kernel/modules/fiberDisplay/WRoiProjectFileIO.h
src/kernel/modules/fiberDisplay/WRoiProjectFileIO.h
+1
-1
src/kernel/modules/fiberDisplay/WTubeDrawable.cpp
src/kernel/modules/fiberDisplay/WTubeDrawable.cpp
+2
-2
src/kernel/modules/fiberDisplay/WTubeDrawable.h
src/kernel/modules/fiberDisplay/WTubeDrawable.h
+0
-0
src/kernel/modules/fiberDisplay/WUpdateThread.cpp
src/kernel/modules/fiberDisplay/WUpdateThread.cpp
+0
-0
No files found.
src/kernel/modules/data/WMData.cpp
View file @
c48c67f5
...
...
@@ -126,16 +126,20 @@ void WMData::properties()
// use this callback for the other properties
WPropertyBase
::
PropertyChangeNotifierType
propertyCallback
=
boost
::
bind
(
&
WMData
::
propertyChanged
,
this
,
_1
);
m_groupTex
=
m_properties
->
addPropertyGroup
(
"Texture Properties"
,
"Properties only related to the texture representation."
);
m_groupTexManip
=
m_properties
->
addPropertyGroup
(
"Texture Manipulation"
,
"Properties only related to the texture manipulation."
);
// several other properties
m_interpolation
=
m_
p
ro
perties
->
addProperty
(
"Interpolation"
,
m_interpolation
=
m_
g
ro
upTex
->
addProperty
(
"Interpolation"
,
"If active, the boundaries of single voxels"
" will not be visible in colormaps. The transition between"
" them will be smooth by using interpolation then."
,
true
,
propertyCallback
);
m_threshold
=
m_
p
ro
perties
->
addProperty
(
"Threshold"
,
"Values below this threshold will not be "
m_threshold
=
m_
g
ro
upTex
->
addProperty
(
"Threshold"
,
"Values below this threshold will not be "
"shown in colormaps."
,
0.
,
propertyCallback
);
m_opacity
=
m_
p
ro
perties
->
addProperty
(
"Opacity %"
,
"The opacity of this data in colormaps combining"
m_opacity
=
m_
g
ro
upTex
->
addProperty
(
"Opacity %"
,
"The opacity of this data in colormaps combining"
" values from several data sets."
,
100
,
propertyCallback
);
m_opacity
->
setMax
(
100
);
m_opacity
->
setMin
(
0
);
...
...
@@ -148,8 +152,38 @@ void WMData::properties()
m_colorMapSelectionsList
->
addItem
(
"Atlas"
,
""
);
m_colorMapSelectionsList
->
addItem
(
"Blue-Green-Purple"
,
""
);
m_colorMapSelection
=
m_
p
ro
perties
->
addProperty
(
"Colormap"
,
"Colormap type."
,
m_colorMapSelectionsList
->
getSelectorFirst
(),
propertyCallback
);
m_colorMapSelection
=
m_
g
ro
upTex
->
addProperty
(
"Colormap"
,
"Colormap type."
,
m_colorMapSelectionsList
->
getSelectorFirst
(),
propertyCallback
);
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_colorMapSelection
);
m_translationX
=
m_groupTexManip
->
addProperty
(
"X translation"
,
""
,
0
,
propertyCallback
);
m_translationX
->
setMax
(
300
);
m_translationX
->
setMin
(
-
300
);
m_translationY
=
m_groupTexManip
->
addProperty
(
"Y translation"
,
""
,
0
,
propertyCallback
);
m_translationY
->
setMax
(
300
);
m_translationY
->
setMin
(
-
300
);
m_translationZ
=
m_groupTexManip
->
addProperty
(
"Z translation"
,
""
,
0
,
propertyCallback
);
m_translationZ
->
setMax
(
300
);
m_translationZ
->
setMin
(
-
300
);
m_stretchX
=
m_groupTexManip
->
addProperty
(
"voxel size X"
,
""
,
1.0
,
propertyCallback
);
m_stretchX
->
setMax
(
10.
);
m_stretchX
->
setMin
(
0.1
);
m_stretchY
=
m_groupTexManip
->
addProperty
(
"voxel size Y"
,
""
,
1.0
,
propertyCallback
);
m_stretchY
->
setMax
(
10.
);
m_stretchY
->
setMin
(
0.1
);
m_stretchZ
=
m_groupTexManip
->
addProperty
(
"voxel size Z"
,
""
,
1.0
,
propertyCallback
);
m_stretchZ
->
setMax
(
10.
);
m_stretchZ
->
setMin
(
0.1
);
m_rotationX
=
m_groupTexManip
->
addProperty
(
"X rotation"
,
""
,
0
,
propertyCallback
);
m_rotationX
->
setMax
(
180
);
m_rotationX
->
setMin
(
-
180
);
m_rotationY
=
m_groupTexManip
->
addProperty
(
"Y rotation"
,
""
,
0
,
propertyCallback
);
m_rotationY
->
setMax
(
180
);
m_rotationY
->
setMin
(
-
180
);
m_rotationZ
=
m_groupTexManip
->
addProperty
(
"Z rotation"
,
""
,
0
,
propertyCallback
);
m_rotationZ
->
setMax
(
180
);
m_rotationZ
->
setMin
(
-
180
);
}
void
WMData
::
propertyChanged
(
boost
::
shared_ptr
<
WPropertyBase
>
property
)
...
...
@@ -176,6 +210,32 @@ void WMData::propertyChanged( boost::shared_ptr< WPropertyBase > property )
{
m_dataSet
->
getTexture
()
->
setSelectedColormap
(
m_colorMapSelection
->
get
(
true
).
getItemIndexOfSelected
(
0
)
);
}
else
if
(
property
==
m_translationX
||
property
==
m_translationY
||
property
==
m_translationZ
)
{
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
m_dataSet
->
getTexture
()
->
getGrid
();
wmath
::
WPosition
pos
(
m_translationX
->
get
(),
m_translationY
->
get
(),
m_translationZ
->
get
()
);
grid
->
translate
(
pos
);
WDataHandler
::
getDefaultSubject
()
->
getChangeCondition
()
->
notify
();
}
else
if
(
property
==
m_stretchX
||
property
==
m_stretchY
||
property
==
m_stretchZ
)
{
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
m_dataSet
->
getTexture
()
->
getGrid
();
wmath
::
WPosition
str
(
m_stretchX
->
get
(),
m_stretchY
->
get
(),
m_stretchZ
->
get
()
);
grid
->
stretch
(
str
);
WDataHandler
::
getDefaultSubject
()
->
getChangeCondition
()
->
notify
();
}
else
if
(
property
==
m_rotationX
||
property
==
m_rotationY
||
property
==
m_rotationZ
)
{
float
pi
=
3.14159265
;
float
rotx
=
static_cast
<
float
>
(
m_rotationX
->
get
()
)
/
180.
*
pi
;
float
roty
=
static_cast
<
float
>
(
m_rotationY
->
get
()
)
/
180.
*
pi
;
float
rotz
=
static_cast
<
float
>
(
m_rotationZ
->
get
()
)
/
180.
*
pi
;
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
m_dataSet
->
getTexture
()
->
getGrid
();
wmath
::
WPosition
rot
(
rotx
,
roty
,
rotz
);
grid
->
rotate
(
rot
);
WDataHandler
::
getDefaultSubject
()
->
getChangeCondition
()
->
notify
();
}
}
else
{
...
...
@@ -236,11 +296,8 @@ void WMData::moduleMain()
||
suffix
==
".edf"
)
{
// hide other properties since they make no sense fo these data set types.
m_interpolation
->
setHidden
();
m_threshold
->
setHidden
();
m_opacity
->
setHidden
();
m_active
->
setHidden
();
m_colorMapSelection
->
setHidden
();
m_groupTex
->
setHidden
();
m_groupTexManip
->
setHidden
();
}
if
(
suffix
==
".nii"
...
...
src/kernel/modules/data/WMData.h
View file @
c48c67f5
...
...
@@ -171,6 +171,16 @@ protected:
*/
WPropString
m_dataName
;
/**
* grouping the texture display properties
*/
WPropGroup
m_groupTex
;
/**
* grouping the texture manipulation properties
*/
WPropGroup
m_groupTexManip
;
/**
* Interpolation?
*/
...
...
@@ -196,6 +206,51 @@ protected:
*/
WPropInt
m_opacity
;
/**
* translation of the texture
*/
WPropInt
m_translationX
;
/**
* translation of the texture
*/
WPropInt
m_translationY
;
/**
* translation of the texture
*/
WPropInt
m_translationZ
;
/**
* voxel size in x direction
*/
WPropDouble
m_stretchX
;
/**
* voxel size in y direction
*/
WPropDouble
m_stretchY
;
/**
* voxel size in z direction
*/
WPropDouble
m_stretchZ
;
/**
* rotation around the x axis
*/
WPropInt
m_rotationX
;
/**
* rotation around the y axis
*/
WPropInt
m_rotationY
;
/**
* rotation around the z axis
*/
WPropInt
m_rotationZ
;
bool
m_isTexture
;
//!< Indicates whether the loaded dataSet will be available as texture.
/**
...
...
src/modules/data/data.png
→
src/
kernel/
modules/data/data.png
View file @
c48c67f5
File moved
src/modules/data/data.xpm
→
src/
kernel/
modules/data/data.xpm
View file @
c48c67f5
File moved
src/modules/fiberDisplay/CMakeLists.txt
→
src/
kernel/
modules/fiberDisplay/CMakeLists.txt
View file @
c48c67f5
File moved
src/modules/fiberDisplay/WKdTree.cpp
→
src/
kernel/
modules/fiberDisplay/WKdTree.cpp
View file @
c48c67f5
...
...
@@ -25,8 +25,8 @@
#include <algorithm>
#include <vector>
#include "../../common/WAssert.h"
#include "../../common/WLogger.h"
#include "../../
../
common/WAssert.h"
#include "../../
../
common/WLogger.h"
#include "WKdTree.h"
...
...
src/modules/fiberDisplay/WKdTree.h
→
src/
kernel/
modules/fiberDisplay/WKdTree.h
View file @
c48c67f5
...
...
@@ -28,7 +28,7 @@
#include <algorithm>
#include <vector>
#include "../../common/WThreadedRunner.h"
#include "../../
../
common/WThreadedRunner.h"
/**
* implements the compare function for std::nth_element on a point array
...
...
src/modules/fiberDisplay/WMFiberDisplay.cpp
→
src/
kernel/
modules/fiberDisplay/WMFiberDisplay.cpp
View file @
c48c67f5
...
...
@@ -31,13 +31,13 @@
#include <osg/Geode>
#include <osg/Geometry>
#include "../../common/WColor.h"
#include "../../common/WLogger.h"
#include "../../dataHandler/WDataHandler.h"
#include "../../dataHandler/WDataTexture3D.h"
#include "../../dataHandler/WSubject.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../kernel/WKernel.h"
#include "../../
../
common/WColor.h"
#include "../../
../
common/WLogger.h"
#include "../../
../
dataHandler/WDataHandler.h"
#include "../../
../
dataHandler/WDataTexture3D.h"
#include "../../
../
dataHandler/WSubject.h"
#include "../../
../
graphicsEngine/WGEUtils.h"
#include "../../
../
kernel/WKernel.h"
#include "fiberdisplay.xpm"
#include "WMFiberDisplay.h"
...
...
src/modules/fiberDisplay/WMFiberDisplay.h
→
src/
kernel/
modules/fiberDisplay/WMFiberDisplay.h
View file @
c48c67f5
...
...
@@ -29,11 +29,11 @@
#include <osg/Geode>
#include "../../dataHandler/datastructures/WFiberCluster.h"
#include "../../dataHandler/WDataSetFibers.h"
#include "../../graphicsEngine/WShader.h"
#include "../../
kernel/
WModule.h"
#include "../../
kernel/
WModuleInputData.h"
#include "../../
../
dataHandler/datastructures/WFiberCluster.h"
#include "../../
../
dataHandler/WDataSetFibers.h"
#include "../../
../
graphicsEngine/WShader.h"
#include "../../WModule.h"
#include "../../WModuleInputData.h"
#include "WTubeDrawable.h"
/**
...
...
src/modules/fiberDisplay/WRMBranch.cpp
→
src/
kernel/
modules/fiberDisplay/WRMBranch.cpp
View file @
c48c67f5
File moved
src/modules/fiberDisplay/WRMBranch.h
→
src/
kernel/
modules/fiberDisplay/WRMBranch.h
View file @
c48c67f5
...
...
@@ -31,7 +31,7 @@
#include <boost/enable_shared_from_this.hpp>
#include "./../../common/WProperties.h"
#include "./../../
../
common/WProperties.h"
#include "WRMROIRepresentation.h"
class
WROIManagerFibers
;
...
...
src/modules/fiberDisplay/WRMROIRepresentation.cpp
→
src/
kernel/
modules/fiberDisplay/WRMROIRepresentation.cpp
View file @
c48c67f5
...
...
@@ -26,11 +26,11 @@
#include <string>
#include <vector>
#include "../../dataHandler/WDataSetScalar.h"
#include "../../
../
dataHandler/WDataSetScalar.h"
#include "../../graphicsEngine/WGraphicsEngine.h"
#include "../../graphicsEngine/WROIBox.h"
#include "../../graphicsEngine/WROIArbitrary.h"
#include "../../
../
graphicsEngine/WGraphicsEngine.h"
#include "../../
../
graphicsEngine/WROIBox.h"
#include "../../
../
graphicsEngine/WROIArbitrary.h"
#include "WRMBranch.h"
#include "WROIManagerFibers.h"
...
...
src/modules/fiberDisplay/WRMROIRepresentation.h
→
src/
kernel/
modules/fiberDisplay/WRMROIRepresentation.h
View file @
c48c67f5
...
...
@@ -34,8 +34,8 @@
#include <boost/thread/thread.hpp>
#include "WKdTree.h"
#include "./../../common/WProperties.h"
#include "../../graphicsEngine/WROI.h"
#include ".
.
/../../common/WProperties.h"
#include "../../
../
graphicsEngine/WROI.h"
class
WRMBranch
;
/**
* class encapsulates rois for the roi manager class
...
...
src/modules/fiberDisplay/WROIManagerFibers.cpp
→
src/
kernel/
modules/fiberDisplay/WROIManagerFibers.cpp
View file @
c48c67f5
...
...
@@ -25,10 +25,10 @@
#include <list>
#include <vector>
#include "../../common/WAssert.h"
#include "../../
../
common/WAssert.h"
#include "WUpdateThread.h"
#include "WROIManagerFibers.h"
#include "../../graphicsEngine/WROIBox.h"
#include "../../
../
graphicsEngine/WROIBox.h"
WROIManagerFibers
::
WROIManagerFibers
()
{
...
...
src/modules/fiberDisplay/WROIManagerFibers.h
→
src/
kernel/
modules/fiberDisplay/WROIManagerFibers.h
View file @
c48c67f5
File moved
src/modules/fiberDisplay/WRoiProjectFileIO.cpp
→
src/
kernel/
modules/fiberDisplay/WRoiProjectFileIO.cpp
View file @
c48c67f5
...
...
@@ -24,7 +24,7 @@
#include <string>
#include "../../common/WLogger.h"
#include "../../
../
common/WLogger.h"
#include "WRoiProjectFileIO.h"
...
...
src/modules/fiberDisplay/WRoiProjectFileIO.h
→
src/
kernel/
modules/fiberDisplay/WRoiProjectFileIO.h
View file @
c48c67f5
...
...
@@ -27,7 +27,7 @@
#include <string>
#include "../../common/WProjectFileIO.h"
#include "../../
../
common/WProjectFileIO.h"
/**
* IO Class for writing the ROI structure to a project file.
...
...
src/modules/fiberDisplay/WTubeDrawable.cpp
→
src/
kernel/
modules/fiberDisplay/WTubeDrawable.cpp
View file @
c48c67f5
...
...
@@ -24,8 +24,8 @@
#include <vector>
#include "../../dataHandler/WDataSetFibers.h"
#include "../../kernel/WKernel.h"
#include "../../
../
dataHandler/WDataSetFibers.h"
#include "../../
../
kernel/WKernel.h"
#include "WTubeDrawable.h"
// The constructor here does nothing. One thing that may be necessary is
...
...
src/modules/fiberDisplay/WTubeDrawable.h
→
src/
kernel/
modules/fiberDisplay/WTubeDrawable.h
View file @
c48c67f5
File moved
src/modules/fiberDisplay/WUpdateThread.cpp
→
src/
kernel/
modules/fiberDisplay/WUpdateThread.cpp
View file @
c48c67f5
File moved
Prev
1
2
Next
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