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
8743a7b0
Commit
8743a7b0
authored
Feb 28, 2013
by
Sebastian Eichelbaum
Browse files
[FIX
#53
] moved marching cubes algorithm out of GE into common
parent
b7be281a
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
362 additions
and
357 deletions
+362
-357
src/core/common/algorithms/WMarchingCubesAlgorithm.cpp
src/core/common/algorithms/WMarchingCubesAlgorithm.cpp
+0
-0
src/core/common/algorithms/WMarchingCubesAlgorithm.h
src/core/common/algorithms/WMarchingCubesAlgorithm.h
+5
-4
src/core/common/algorithms/WMarchingCubesCaseTables.cpp
src/core/common/algorithms/WMarchingCubesCaseTables.cpp
+1
-1
src/core/common/algorithms/WMarchingCubesCaseTables.h
src/core/common/algorithms/WMarchingCubesCaseTables.h
+324
-0
src/core/common/algorithms/WMarchingLegoAlgorithm.cpp
src/core/common/algorithms/WMarchingLegoAlgorithm.cpp
+0
-0
src/core/common/algorithms/WMarchingLegoAlgorithm.h
src/core/common/algorithms/WMarchingLegoAlgorithm.h
+3
-3
src/core/common/algorithms/test/WMarchingCubesAlgorithm_test.h
...ore/common/algorithms/test/WMarchingCubesAlgorithm_test.h
+0
-0
src/core/graphicsEngine/WROIArbitrary.cpp
src/core/graphicsEngine/WROIArbitrary.cpp
+1
-1
src/core/graphicsEngine/algorithms/marchingCubesCaseTables.h
src/core/graphicsEngine/algorithms/marchingCubesCaseTables.h
+0
-321
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
+21
-17
src/modules/HARDIToSphericalHarmonics/WMHARDIToSphericalHarmonics.cpp
...HARDIToSphericalHarmonics/WMHARDIToSphericalHarmonics.cpp
+0
-2
src/modules/arbitraryROIs/WMArbitraryROIs.cpp
src/modules/arbitraryROIs/WMArbitraryROIs.cpp
+1
-1
src/modules/atlasSurfaces/WCreateSurfaceJob.h
src/modules/atlasSurfaces/WCreateSurfaceJob.h
+1
-1
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
+2
-2
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
+1
-1
src/modules/isosurface/WMIsosurface.cpp
src/modules/isosurface/WMIsosurface.cpp
+2
-2
src/modules/splineSurface/WMSplineSurface.cpp
src/modules/splineSurface/WMSplineSurface.cpp
+0
-1
No files found.
src/core/
graphicsEngine
/algorithms/WMarchingCubesAlgorithm.cpp
→
src/core/
common
/algorithms/WMarchingCubesAlgorithm.cpp
View file @
8743a7b0
File moved
src/core/
graphicsEngine
/algorithms/WMarchingCubesAlgorithm.h
→
src/core/
common
/algorithms/WMarchingCubesAlgorithm.h
View file @
8743a7b0
...
...
@@ -27,11 +27,12 @@
#include <vector>
#include <map>
#include "../../common/math/WMatrix.h"
#include "../../common/WProgressCombiner.h"
#include "../WTriangleMesh.h"
#include "marchingCubesCaseTables.h"
#include "../math/WMatrix.h"
#include "../WProgressCombiner.h"
#include "core/graphicsEngine/WTriangleMesh.h"
#include "WMarchingCubesCaseTables.h"
/**
* A point consisting of its coordinates and ID
...
...
src/core/
graphicsEngine
/algorithms/
m
archingCubesCaseTables.cpp
→
src/core/
common
/algorithms/
WM
archingCubesCaseTables.cpp
View file @
8743a7b0
...
...
@@ -22,4 +22,4 @@
//
//---------------------------------------------------------------------------
#include "
m
archingCubesCaseTables.h"
#include "
WM
archingCubesCaseTables.h"
src/core/common/algorithms/WMarchingCubesCaseTables.h
0 → 100644
View file @
8743a7b0
This diff is collapsed.
Click to expand it.
src/core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.cpp
→
src/core/
common
/algorithms/WMarchingLegoAlgorithm.cpp
View file @
8743a7b0
File moved
src/core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.h
→
src/core/
common
/algorithms/WMarchingLegoAlgorithm.h
View file @
8743a7b0
...
...
@@ -28,10 +28,10 @@
#include <vector>
#include <map>
#include "../../common/math/WMatrix.h"
#include "../../common/WProgressCombiner.h"
#include "../WTriangleMesh.h"
#include "../math/WMatrix.h"
#include "../WProgressCombiner.h"
#include "core/graphicsEngine/WTriangleMesh.h"
/**
* A point consisting of its coordinates and ID
...
...
src/core/
graphicsEngine
/algorithms/test/WMarchingCubesAlgorithm_test.h
→
src/core/
common
/algorithms/test/WMarchingCubesAlgorithm_test.h
View file @
8743a7b0
File moved
src/core/graphicsEngine/WROIArbitrary.cpp
View file @
8743a7b0
...
...
@@ -31,7 +31,7 @@
#include <osg/LightModel>
#include <osg/Geometry>
#include "algorithms/WMarchingLegoAlgorithm.h"
#include "
core/common/
algorithms/WMarchingLegoAlgorithm.h"
#include "callbacks/WGEFunctorCallback.h"
#include "WGraphicsEngine.h"
...
...
src/core/graphicsEngine/algorithms/marchingCubesCaseTables.h
deleted
100644 → 0
View file @
b7be281a
This diff is collapsed.
Click to expand it.
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
View file @
8743a7b0
...
...
@@ -197,23 +197,27 @@ vec4 blueLightBlueColorMap( in float value )
vec4
negative2positive
(
in
float
value
)
{
float
val
=
value
*
2
.
0
-
1
.
0
;
vec4
zeroColor
=
vec4
(
1
.
0
,
1
.
0
,
1
.
0
,
1
.
0
);
vec4
negColor
=
vec4
(
1
.
0
,
1
.
0
,
0
.
0
,
1
.
0
);
vec4
posColor
=
vec4
(
0
.
0
,
1
.
0
,
1
.
0
,
1
.
0
);
if
(
val
<
0
.
0
)
{
return
(
zeroColor
+
negColor
*
val
);
}
else
if
(
val
>=
0
.
0
)
{
return
(
zeroColor
-
posColor
*
val
);
}
else
{
return
vec4
(
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
);
}
float
valueDescaled
=
value
;
float
minV
=
0
.
0
;
float
scaleV
=
1
.
0
;
const
vec3
zeroColor
=
vec3
(
1
.
0
,
1
.
0
,
1
.
0
);
const
vec3
negColor
=
vec3
(
1
.
0
,
1
.
0
,
0
.
0
);
const
vec3
posColor
=
vec3
(
0
.
0
,
1
.
0
,
1
.
0
);
// the descaled value can be in interval [minV,minV+Scale]. But as we want linear scaling where the pos and neg colors are scaled linearly
// agains each other, and we want to handle real negative values correctly. For only positive values, use their interval mid-point.
float
isNegative
=
1
.
0
-
(
-
1
.
0
*
clamp
(
sign
(
minV
),
-
1
.
0
,
0
.
0
)
);
// this is 1.0 if minV is smaller than zero
float
mid
=
(
1
.
0
-
isNegative
)
*
0
.
5
*
scaleV
;
// if negative, the mid point always is 0.0
// the width of the interval is its original width/2 if there are no negative values in the dataset
float
width
=
(
isNegative
*
max
(
abs
(
minV
),
abs
(
minV
+
scaleV
)
)
)
+
(
(
1
.
0
-
isNegative
)
*
mid
);
// pos-neg mix factor
float
share
=
(
valueDescaled
-
mid
)
/
width
;
// use neg color for shares < 0.0 and pos color for the others
return
vec4
(
zeroColor
-
(
abs
(
clamp
(
share
,
-
1
.
0
,
0
.
0
)
*
negColor
)
+
(
clamp
(
share
,
0
.
0
,
1
.
0
)
*
posColor
)
),
1
.
0
);
// clip zeros is done in colormapping function
}
// TODO(math): Remove this function and replace its calls with bitwise operations as soon as there
...
...
src/modules/HARDIToSphericalHarmonics/WMHARDIToSphericalHarmonics.cpp
View file @
8743a7b0
...
...
@@ -45,8 +45,6 @@
#include "core/dataHandler/WSubject.h"
#include "core/kernel/WKernel.h"
#include "core/graphicsEngine/algorithms/WMarchingCubesAlgorithm.h"
#include "WSphericalHarmonicsCoefficientsThread.h"
#include "WMHARDIToSphericalHarmonics.h"
...
...
src/modules/arbitraryROIs/WMArbitraryROIs.cpp
View file @
8743a7b0
...
...
@@ -35,7 +35,7 @@
#include "core/common/WAssert.h"
#include "core/dataHandler/WDataSetScalar.h"
#include "core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/
common
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/graphicsEngine/WROIArbitrary.h"
#include "core/graphicsEngine/WROIBox.h"
#include "core/kernel/WKernel.h"
...
...
src/modules/atlasSurfaces/WCreateSurfaceJob.h
View file @
8743a7b0
...
...
@@ -33,7 +33,7 @@
#include "core/dataHandler/WDataSetScalar.h"
#include "core/
graphicsEngine
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/
common
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/graphicsEngine/WTriangleMesh.h"
...
...
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
View file @
8743a7b0
...
...
@@ -42,8 +42,8 @@
#include "core/common/WThreadedFunction.h"
#include "core/common/WStringUtils.h"
#include "core/dataHandler/WDataSetScalar.h"
#include "core/
graphicsEngine
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/
common
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/
common
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/graphicsEngine/WGEGroupNode.h"
#include "core/graphicsEngine/WGEUtils.h"
#include "core/graphicsEngine/WROI.h"
...
...
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
View file @
8743a7b0
...
...
@@ -37,7 +37,7 @@
#include "core/common/WStringUtils.h"
#include "core/common/WPathHelper.h"
#include "core/common/WPropertyHelper.h"
#include "core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/
common
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/graphicsEngine/WGEColormapping.h"
#include "core/graphicsEngine/WGEUtils.h"
#include "core/kernel/WKernel.h"
...
...
src/modules/isosurface/WMIsosurface.cpp
View file @
8743a7b0
...
...
@@ -46,8 +46,8 @@
#include "core/common/WProgress.h"
#include "core/dataHandler/WDataHandler.h"
#include "core/dataHandler/WSubject.h"
#include "core/
graphicsEngine
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/
graphicsEngine
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/
common
/algorithms/WMarchingCubesAlgorithm.h"
#include "core/
common
/algorithms/WMarchingLegoAlgorithm.h"
#include "core/graphicsEngine/callbacks/WGEFunctorCallback.h"
#include "core/graphicsEngine/shaders/WGEPropertyUniform.h"
#include "core/graphicsEngine/shaders/WGEShaderPropertyDefineOptions.h"
...
...
src/modules/splineSurface/WMSplineSurface.cpp
View file @
8743a7b0
...
...
@@ -53,7 +53,6 @@
#include "core/graphicsEngine/shaders/WGEShaderPropertyDefineOptions.h"
#include "core/kernel/WKernel.h"
#include "core/graphicsEngine/algorithms/WMarchingCubesAlgorithm.h"
#include "WSurface.h"
#include "WMSplineSurface.h"
...
...
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