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
25ca1db0
Commit
25ca1db0
authored
Dec 06, 2013
by
Alexander Wiebel
Browse files
[MERGE]
parents
d2c185ae
cc878456
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
54 additions
and
59 deletions
+54
-59
src/core/common/algorithms/WMarchingCubesAlgorithm.h
src/core/common/algorithms/WMarchingCubesAlgorithm.h
+1
-1
src/core/common/test/WConditionSet_test.h
src/core/common/test/WConditionSet_test.h
+7
-7
src/core/common/test/WFlagForwarder_test.h
src/core/common/test/WFlagForwarder_test.h
+3
-3
src/core/common/test/WProgressCombiner_test.h
src/core/common/test/WProgressCombiner_test.h
+3
-3
src/core/common/test/WProperties_test.h
src/core/common/test/WProperties_test.h
+8
-8
src/core/dataHandler/WDataSetFiberVector.cpp
src/core/dataHandler/WDataSetFiberVector.cpp
+5
-5
src/core/dataHandler/WDataSetFibers.cpp
src/core/dataHandler/WDataSetFibers.cpp
+3
-3
src/core/dataHandler/WDataSetTimeSeries.h
src/core/dataHandler/WDataSetTimeSeries.h
+1
-1
src/core/dataHandler/WFiberAccumulator.cpp
src/core/dataHandler/WFiberAccumulator.cpp
+1
-2
src/core/dataHandler/WITKImageConversion.h
src/core/dataHandler/WITKImageConversion.h
+1
-1
src/core/dataHandler/test/WDataHandler_test.h
src/core/dataHandler/test/WDataHandler_test.h
+1
-1
src/core/dataHandler/test/WDataSetScalar_test.h
src/core/dataHandler/test/WDataSetScalar_test.h
+3
-3
src/core/dataHandler/test/WDataSetSingle_test.h
src/core/dataHandler/test/WDataSetSingle_test.h
+2
-2
src/core/dataHandler/test/WDataSetTimeSeries_test.h
src/core/dataHandler/test/WDataSetTimeSeries_test.h
+5
-5
src/core/dataHandler/test/WDataSetVector_test.h
src/core/dataHandler/test/WDataSetVector_test.h
+3
-3
src/core/dataHandler/test/WThreadedPerVoxelOperation_test.h
src/core/dataHandler/test/WThreadedPerVoxelOperation_test.h
+1
-1
src/core/dataHandler/test/WThreadedTrackingFunction_test.h
src/core/dataHandler/test/WThreadedTrackingFunction_test.h
+2
-2
src/core/graphicsEngine/postprocessing/WGEPostprocessingNode.cpp
...e/graphicsEngine/postprocessing/WGEPostprocessingNode.cpp
+1
-1
src/core/kernel/WFiberSelector.cpp
src/core/kernel/WFiberSelector.cpp
+1
-1
src/core/kernel/WModuleContainer.cpp
src/core/kernel/WModuleContainer.cpp
+2
-6
No files found.
src/core/common/algorithms/WMarchingCubesAlgorithm.h
View file @
25ca1db0
...
...
@@ -212,7 +212,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingCubesAlgorithm::g
unsigned
int
nPointsInSlice
=
nX
*
nY
;
boost
::
shared_ptr
<
WProgress
>
progress
=
boost
::
shared_ptr
<
WProgress
>
(
new
WProgress
(
"Marching Cubes"
,
m_nCellsZ
)
);
boost
::
shared_ptr
<
WProgress
>
progress
(
new
WProgress
(
"Marching Cubes"
,
m_nCellsZ
)
);
mainProgress
->
addSubProgress
(
progress
);
// Generate isosurface.
for
(
unsigned
int
z
=
0
;
z
<
m_nCellsZ
;
z
++
)
...
...
src/core/common/test/WConditionSet_test.h
View file @
25ca1db0
...
...
@@ -87,9 +87,9 @@ public:
WConditionSet
*
cs
=
new
WConditionSet
();
// create some conditions
boost
::
shared_ptr
<
WCondition
>
c1
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c3
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c1
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c3
(
new
WCondition
()
);
// add them
TS_ASSERT_THROWS_NOTHING
(
cs
->
add
(
c1
)
);
...
...
@@ -123,8 +123,8 @@ public:
WConditionSet
*
cs
=
new
WConditionSet
();
// create some conditions
boost
::
shared_ptr
<
WCondition
>
c1
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c1
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
(
new
WCondition
()
);
// disable resetable feature
cs
->
setResetable
(
false
,
false
);
...
...
@@ -169,8 +169,8 @@ public:
WConditionSet
*
cs
=
new
WConditionSet
();
// create some conditions
boost
::
shared_ptr
<
WCondition
>
c1
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c1
(
new
WCondition
()
);
boost
::
shared_ptr
<
WCondition
>
c2
(
new
WCondition
()
);
// disable resetable feature
cs
->
setResetable
(
true
,
true
);
...
...
src/core/common/test/WFlagForwarder_test.h
View file @
25ca1db0
...
...
@@ -43,9 +43,9 @@ public:
void
testPropagation
(
void
)
{
// create some flags
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagSource
=
boost
::
shared_ptr
<
WFlag
<
int
>
>
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
5
)
);
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagTarget1
=
boost
::
shared_ptr
<
WFlag
<
int
>
>
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
10
)
);
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagTarget2
=
boost
::
shared_ptr
<
WFlag
<
int
>
>
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
15
)
);
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagSource
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
5
)
);
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagTarget1
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
10
)
);
boost
::
shared_ptr
<
WFlag
<
int
>
>
flagTarget2
(
new
WFlag
<
int
>
(
new
WConditionOneShot
(),
15
)
);
// create the forwarder
WFlagForwarder
<
int
>*
f
=
new
WFlagForwarder
<
int
>
(
flagSource
);
...
...
src/core/common/test/WProgressCombiner_test.h
View file @
25ca1db0
...
...
@@ -74,9 +74,9 @@ public:
WProgressCombiner
p
(
"Test"
);
// create some children
boost
::
shared_ptr
<
WProgress
>
p1
=
boost
::
shared_ptr
<
WProgress
>
(
new
WProgress
(
"TestP1"
,
11
)
);
boost
::
shared_ptr
<
WProgress
>
p2
=
boost
::
shared_ptr
<
WProgress
>
(
new
WProgress
(
"TestP2"
,
11
)
);
boost
::
shared_ptr
<
WProgress
>
p3
=
boost
::
shared_ptr
<
WProgress
>
(
new
WProgress
(
"TestP3"
)
);
boost
::
shared_ptr
<
WProgress
>
p1
(
new
WProgress
(
"TestP1"
,
11
)
);
boost
::
shared_ptr
<
WProgress
>
p2
(
new
WProgress
(
"TestP2"
,
11
)
);
boost
::
shared_ptr
<
WProgress
>
p3
(
new
WProgress
(
"TestP3"
)
);
// as the first and only child is determined (has a known end point) -> the combiner is determined
TS_ASSERT_THROWS_NOTHING
(
p
.
addSubProgress
(
p1
)
);
...
...
src/core/common/test/WProperties_test.h
View file @
25ca1db0
...
...
@@ -89,7 +89,7 @@ public:
{
WException
::
disableBacktrace
();
// in tests, turn of backtrace globally
boost
::
shared_ptr
<
WProperties
>
p
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
p
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
boost
::
shared_ptr
<
WPropertyBase
>
p1
=
p
->
addProperty
(
"1"
,
"test1"
,
true
);
...
...
@@ -119,7 +119,7 @@ public:
{
WException
::
disableBacktrace
();
// in tests, turn of backtrace globally
boost
::
shared_ptr
<
WProperties
>
p
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
p
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
boost
::
shared_ptr
<
WPropertyBase
>
p1
=
p
->
addProperty
(
"1"
,
"test1"
,
true
);
...
...
@@ -144,7 +144,7 @@ public:
{
WException
::
disableBacktrace
();
// in tests, turn of backtrace globally
boost
::
shared_ptr
<
WProperties
>
p
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
p
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
boost
::
shared_ptr
<
WPropertyBase
>
p1
=
p
->
addProperty
(
"1"
,
"test1"
,
true
);
...
...
@@ -171,7 +171,7 @@ public:
WException
::
disableBacktrace
();
// in tests, turn of backtrace globally
// some props we can use as target
boost
::
shared_ptr
<
WProperties
>
t
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
t
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
WPropBool
tp1
=
t
->
addProperty
(
"p1"
,
""
,
true
);
...
...
@@ -181,7 +181,7 @@ public:
WPropDouble
tp4
=
t
->
addProperty
(
"p4"
,
""
,
10.0
);
// create a group we can use as source
boost
::
shared_ptr
<
WProperties
>
s
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
s
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
WPropBool
sp1
=
s
->
addProperty
(
"p1"
,
""
,
false
);
...
...
@@ -211,7 +211,7 @@ public:
{
WException
::
disableBacktrace
();
// in tests, turn of backtrace globally
boost
::
shared_ptr
<
WProperties
>
p
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
p
(
new
WProperties
(
"hey"
,
"you"
)
);
// add some new properties
boost
::
shared_ptr
<
WPropertyBase
>
p1
=
p
->
addProperty
(
"1"
,
"test1"
,
true
);
...
...
@@ -257,7 +257,7 @@ public:
*/
void
testGetAndExistsAndFindRecursive
(
void
)
{
boost
::
shared_ptr
<
WProperties
>
p
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
p
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
psub
=
p
->
addPropertyGroup
(
"heySub"
,
"you"
);
// add some new properties
...
...
@@ -312,7 +312,7 @@ public:
/////////////////////
// Clone
boost
::
shared_ptr
<
WProperties
>
orig
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
orig
(
new
WProperties
(
"hey"
,
"you"
)
);
boost
::
shared_ptr
<
WProperties
>
clone
=
orig
->
clone
()
->
toPropGroup
();
// test that toPropGroup worked and both are different
...
...
src/core/dataHandler/WDataSetFiberVector.cpp
View file @
25ca1db0
...
...
@@ -103,7 +103,7 @@ void WDataSetFiberVector::sortDescLength()
boost
::
shared_ptr
<
WDataSetFiberVector
>
WDataSetFiberVector
::
generateDataSetOutOfUsedFibers
(
const
std
::
vector
<
bool
>
&
unused
)
const
{
boost
::
shared_ptr
<
WDataSetFiberVector
>
result
=
boost
::
shared_ptr
<
WDataSetFiberVector
>
(
new
WDataSetFiberVector
()
);
boost
::
shared_ptr
<
WDataSetFiberVector
>
result
(
new
WDataSetFiberVector
()
);
assert
(
unused
.
size
()
==
size
()
);
for
(
size_t
i
=
0
;
i
<
unused
.
size
();
++
i
)
{
...
...
@@ -142,10 +142,10 @@ boost::shared_ptr< WPrototyped > WDataSetFiberVector::getPrototype()
boost
::
shared_ptr
<
WDataSetFibers
>
WDataSetFiberVector
::
toWDataSetFibers
()
const
{
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
points
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
fiberStartIndices
=
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
(
new
std
::
vector
<
size_t
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
fiberLengths
=
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
(
new
std
::
vector
<
size_t
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
pointFiberMapping
=
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
(
new
std
::
vector
<
size_t
>
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
points
(
new
std
::
vector
<
float
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
fiberStartIndices
(
new
std
::
vector
<
size_t
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
fiberLengths
(
new
std
::
vector
<
size_t
>
);
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
pointFiberMapping
(
new
std
::
vector
<
size_t
>
);
fiberStartIndices
->
reserve
(
size
()
);
fiberLengths
->
reserve
(
size
()
);
...
...
src/core/dataHandler/WDataSetFibers.cpp
View file @
25ca1db0
...
...
@@ -129,9 +129,9 @@ void WDataSetFibers::init()
size_t
size
=
m_vertices
->
size
();
m_tangents
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
globalColors
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
localColors
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
customColors
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
globalColors
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
localColors
(
new
std
::
vector
<
float
>
(
size
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
customColors
(
new
std
::
vector
<
float
>
(
size
)
);
// TODO(all): use the new WThreadedJobs functionality
WCreateColorArraysThread
*
t1
=
new
WCreateColorArraysThread
(
0
,
m_lineLengths
->
size
()
/
4
,
m_vertices
,
...
...
src/core/dataHandler/WDataSetTimeSeries.h
View file @
25ca1db0
...
...
@@ -298,7 +298,7 @@ boost::shared_ptr< WValueSetBase > WDataSetTimeSeries::calcInterpolatedValueSet(
boost
::
shared_ptr
<
WValueSet
<
Data_T
>
>
vf
=
boost
::
dynamic_pointer_cast
<
WValueSet
<
Data_T
>
>
(
f
->
getValueSet
()
);
boost
::
shared_ptr
<
WValueSet
<
Data_T
>
>
vg
=
boost
::
dynamic_pointer_cast
<
WValueSet
<
Data_T
>
>
(
g
->
getValueSet
()
);
WAssert
(
vf
&&
vg
,
""
);
boost
::
shared_ptr
<
std
::
vector
<
Data_T
>
>
values
=
boost
::
shared_ptr
<
std
::
vector
<
Data_T
>
>
(
new
std
::
vector
<
Data_T
>
(
vf
->
size
()
)
);
boost
::
shared_ptr
<
std
::
vector
<
Data_T
>
>
values
(
new
std
::
vector
<
Data_T
>
(
vf
->
size
()
)
);
float
ml
=
(
ub
-
time
)
/
(
ub
-
lb
);
float
mu
=
(
time
-
lb
)
/
(
ub
-
lb
);
for
(
std
::
size_t
k
=
0
;
k
<
values
->
size
();
++
k
)
...
...
src/core/dataHandler/WFiberAccumulator.cpp
View file @
25ca1db0
...
...
@@ -67,8 +67,7 @@ boost::shared_ptr< WDataSetFibers > WFiberAccumulator::buildDataSet()
{
boost
::
unique_lock
<
boost
::
mutex
>
lock
(
m_fiberMutex
);
boost
::
shared_ptr
<
WDataSetFibers
>
res
=
boost
::
shared_ptr
<
WDataSetFibers
>
(
new
WDataSetFibers
(
m_points
,
m_fiberIndices
,
m_fiberLengths
,
m_pointToFiber
)
);
boost
::
shared_ptr
<
WDataSetFibers
>
res
(
new
WDataSetFibers
(
m_points
,
m_fiberIndices
,
m_fiberLengths
,
m_pointToFiber
)
);
m_points
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
()
);
m_fiberIndices
=
boost
::
shared_ptr
<
std
::
vector
<
size_t
>
>
(
new
std
::
vector
<
size_t
>
()
);
...
...
src/core/dataHandler/WITKImageConversion.h
View file @
25ca1db0
...
...
@@ -140,7 +140,7 @@ boost::shared_ptr< WDataSetScalar > makeDataSetFromImage( typename itk::Image< T
WGridTransformOrtho
t
(
smat
);
boost
::
shared_ptr
<
WGrid
>
grid
(
new
WGridRegular3D
(
s
[
0
],
s
[
1
],
s
[
2
],
t
)
);
boost
::
shared_ptr
<
std
::
vector
<
T
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
T
>
>
(
new
std
::
vector
<
T
>
(
s
[
0
]
*
s
[
1
]
*
s
[
2
]
)
);
boost
::
shared_ptr
<
std
::
vector
<
T
>
>
v
(
new
std
::
vector
<
T
>
(
s
[
0
]
*
s
[
1
]
*
s
[
2
]
)
);
typename
itk
::
Image
<
T
,
3
>::
IndexType
i
;
...
...
src/core/dataHandler/test/WDataHandler_test.h
View file @
25ca1db0
...
...
@@ -106,7 +106,7 @@ public:
testInfo
.
setSubjectID
(
2
);
testInfo
.
setLastName
(
"Testname2"
);
boost
::
shared_ptr
<
WSubject
>
s
=
boost
::
shared_ptr
<
WSubject
>
(
new
WSubject
(
testInfo
)
);
boost
::
shared_ptr
<
WSubject
>
s
(
new
WSubject
(
testInfo
)
);
dh
->
addSubject
(
s
);
// now there should be 3 subjects (one from testAddSubjects, the above added one and the default subject)
...
...
src/core/dataHandler/test/WDataSetScalar_test.h
View file @
25ca1db0
...
...
@@ -53,8 +53,8 @@ public:
void
testInterpolate
(
void
)
{
// create dummies, since they are needed in almost every test
boost
::
shared_ptr
<
WGrid
>
grid
=
boost
::
shared_ptr
<
WGrid
>
(
new
WGridRegular3D
(
5
,
3
,
3
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
grid
->
size
()
)
);
boost
::
shared_ptr
<
WGrid
>
grid
(
new
WGridRegular3D
(
5
,
3
,
3
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
(
new
std
::
vector
<
double
>
(
grid
->
size
()
)
);
for
(
size_t
i
=
0
;
i
<
grid
->
size
();
++
i
)
{
(
*
data
)[
i
]
=
i
;
...
...
@@ -103,7 +103,7 @@ public:
WGridTransformOrtho
v
(
mat
);
boost
::
shared_ptr
<
WGridRegular3D
>
grid
(
new
WGridRegular3D
(
5
,
3
,
3
,
v
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
grid
->
size
()
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
(
new
std
::
vector
<
double
>
(
grid
->
size
()
)
);
for
(
size_t
i
=
0
;
i
<
grid
->
size
();
++
i
)
{
(
*
data
)[
i
]
=
i
;
...
...
src/core/dataHandler/test/WDataSetSingle_test.h
View file @
25ca1db0
...
...
@@ -55,7 +55,7 @@ public:
// create dummies, since they are needed in almost every test
gridDummy
=
boost
::
shared_ptr
<
WGrid
>
(
new
WGridRegular3D
(
1
,
1
,
1
)
);
boost
::
shared_ptr
<
std
::
vector
<
int8_t
>
>
data
=
boost
::
shared_ptr
<
std
::
vector
<
int8_t
>
>
(
new
std
::
vector
<
int8_t
>
(
1
,
1
)
);
boost
::
shared_ptr
<
std
::
vector
<
int8_t
>
>
data
(
new
std
::
vector
<
int8_t
>
(
1
,
1
)
);
valueSetDummy
=
boost
::
shared_ptr
<
WValueSet
<
int8_t
>
>
(
new
WValueSet
<
int8_t
>
(
0
,
1
,
data
,
W_DT_INT8
)
);
}
...
...
@@ -72,7 +72,7 @@ public:
*/
void
testGetValueSet
(
void
)
{
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
1
,
3.1415
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
(
new
std
::
vector
<
double
>
(
1
,
3.1415
)
);
boost
::
shared_ptr
<
WValueSet
<
double
>
>
other
;
other
=
boost
::
shared_ptr
<
WValueSet
<
double
>
>
(
new
WValueSet
<
double
>
(
0
,
1
,
data
,
W_DT_DOUBLE
)
);
WDataSetSingle
dataSetSingle
(
valueSetDummy
,
gridDummy
);
...
...
src/core/dataHandler/test/WDataSetTimeSeries_test.h
View file @
25ca1db0
...
...
@@ -89,7 +89,7 @@ public:
t
.
push_back
(
4.0
f
);
WMatrix
<
double
>
mat
(
4
,
4
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
27
,
4
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
(
new
std
::
vector
<
double
>
(
27
,
4
)
);
mat
.
makeIdentity
();
mat
(
0
,
0
)
=
1.0
;
mat
(
1
,
1
)
=
0.5
;
...
...
@@ -108,7 +108,7 @@ public:
TS_ASSERT_THROWS_NOTHING
(
WDataSetTimeSeries
(
d
,
t
)
);
t
.
push_back
(
4.0
f
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
v2
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
27
,
4
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
v2
(
new
std
::
vector
<
float
>
(
27
,
4
)
);
boost
::
shared_ptr
<
WValueSet
<
float
>
>
vs2
(
new
WValueSet
<
float
>
(
0
,
1
,
v2
,
W_DT_FLOAT
)
);
d
.
push_back
(
boost
::
shared_ptr
<
WDataSetScalar
const
>
(
new
WDataSetScalar
(
vs2
,
d
.
front
()
->
getGrid
()
)
)
);
TS_ASSERT_THROWS
(
WDataSetTimeSeries
(
d
,
t
),
WException
);
...
...
@@ -146,7 +146,7 @@ public:
t
.
push_back
(
4.0
f
);
WMatrix
<
double
>
mat
(
4
,
4
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
27
,
4
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
(
new
std
::
vector
<
double
>
(
27
,
4
)
);
mat
.
makeIdentity
();
mat
(
0
,
0
)
=
1.0
;
mat
(
1
,
1
)
=
0.5
;
...
...
@@ -165,7 +165,7 @@ public:
TS_ASSERT_THROWS_NOTHING
(
WDataSetTimeSeries
(
d
,
t
)
);
t
.
push_back
(
4.0
f
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
v2
=
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
(
new
std
::
vector
<
float
>
(
27
,
4
)
);
boost
::
shared_ptr
<
std
::
vector
<
float
>
>
v2
(
new
std
::
vector
<
float
>
(
27
,
4
)
);
boost
::
shared_ptr
<
WValueSet
<
float
>
>
vs2
(
new
WValueSet
<
float
>
(
0
,
1
,
v2
,
W_DT_FLOAT
)
);
d
.
push_back
(
boost
::
shared_ptr
<
WDataSetScalar
const
>
(
new
WDataSetScalar
(
vs2
,
d
.
front
()
->
getGrid
()
)
)
);
TS_ASSERT_THROWS
(
WDataSetTimeSeries
(
d
,
t
),
WException
);
...
...
@@ -559,7 +559,7 @@ private:
for
(
int
i
=
0
;
i
<
number
;
++
i
)
{
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
27
,
data
[
i
]
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
(
new
std
::
vector
<
double
>
(
27
,
data
[
i
]
)
);
boost
::
shared_ptr
<
WValueSet
<
double
>
>
vs
(
new
WValueSet
<
double
>
(
0
,
1
,
v
,
W_DT_DOUBLE
)
);
dsets
.
push_back
(
boost
::
shared_ptr
<
WDataSetScalar
const
>
(
new
WDataSetScalar
(
vs
,
g
)
)
);
times
.
push_back
(
static_cast
<
float
>
(
i
)
);
...
...
src/core/dataHandler/test/WDataSetVector_test.h
View file @
25ca1db0
...
...
@@ -119,7 +119,7 @@ public:
*/
void
testEigenVectorInterpolate
(
void
)
{
boost
::
shared_ptr
<
WGrid
>
grid
=
boost
::
shared_ptr
<
WGrid
>
(
new
WGridRegular3D
(
2
,
2
,
2
)
);
boost
::
shared_ptr
<
WGrid
>
grid
(
new
WGridRegular3D
(
2
,
2
,
2
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
(
new
std
::
vector
<
double
>
);
boost
::
array
<
WPosition
,
8
>
d
=
{
{
WPosition
(
-
1
,
0
,
0
),
// NOLINT braces
WPosition
(
1
,
0
,
0
),
...
...
@@ -160,9 +160,9 @@ public:
*/
void
testBoundary_ticket313
(
void
)
{
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
boost
::
shared_ptr
<
WGridRegular3D
>
(
new
WGridRegular3D
(
3
,
4
,
5
)
);
boost
::
shared_ptr
<
WGridRegular3D
>
grid
(
new
WGridRegular3D
(
3
,
4
,
5
)
);
bool
success
=
false
;
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
grid
->
size
()
*
3
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
data
(
new
std
::
vector
<
double
>
(
grid
->
size
()
*
3
)
);
for
(
size_t
i
=
0
;
i
<
grid
->
size
()
*
3
;
++
i
)
{
(
*
data
)[
i
]
=
i
;
...
...
src/core/dataHandler/test/WThreadedPerVoxelOperation_test.h
View file @
25ca1db0
...
...
@@ -160,7 +160,7 @@ private:
boost
::
shared_ptr
<
WDataSetSingle
>
buildTestData
()
{
int
a
[]
=
{
1
,
2
,
3
,
-
5
,
7
,
8
,
2
,
-
4
,
12
,
-
28
,
3
,
3
,
4
,
-
4
,
-
5
,
2
};
boost
::
shared_ptr
<
std
::
vector
<
int
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
int
>
>
(
new
std
::
vector
<
int
>
(
a
,
a
+
16
)
);
boost
::
shared_ptr
<
std
::
vector
<
int
>
>
v
(
new
std
::
vector
<
int
>
(
a
,
a
+
16
)
);
dataType
r
=
DataType
<
int
>::
type
;
boost
::
shared_ptr
<
ValueSetType
>
vs
(
new
ValueSetType
(
1
,
2
,
v
,
r
)
);
boost
::
shared_ptr
<
WGridRegular3D
>
g
(
new
WGridRegular3D
(
2
,
2
,
2
)
);
...
...
src/core/dataHandler/test/WThreadedTrackingFunction_test.h
View file @
25ca1db0
...
...
@@ -237,7 +237,7 @@ private:
data
=
normalize
(
data
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
5
*
5
*
5
*
3
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
(
new
std
::
vector
<
double
>
(
5
*
5
*
5
*
3
)
);
for
(
std
::
size_t
k
=
0
;
k
<
5
*
5
*
5
;
++
k
)
{
v
->
at
(
3
*
k
+
0
)
=
data
[
0
];
...
...
@@ -602,7 +602,7 @@ private:
data
=
normalize
(
data
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
=
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
(
new
std
::
vector
<
double
>
(
n
*
n
*
n
*
3
)
);
boost
::
shared_ptr
<
std
::
vector
<
double
>
>
v
(
new
std
::
vector
<
double
>
(
n
*
n
*
n
*
3
)
);
for
(
std
::
size_t
k
=
0
;
k
<
static_cast
<
std
::
size_t
>
(
n
*
n
*
n
);
++
k
)
{
v
->
at
(
3
*
k
+
0
)
=
data
[
0
];
...
...
src/core/graphicsEngine/postprocessing/WGEPostprocessingNode.cpp
View file @
25ca1db0
...
...
@@ -42,7 +42,7 @@ WGEPostprocessingNode::WGEPostprocessingNode( osg::ref_ptr< osg::Camera > refere
addChild
(
m_childs
);
// this node has some properties:
boost
::
shared_ptr
<
WItemSelection
>
m_possibleSelections
=
boost
::
shared_ptr
<
WItemSelection
>
(
new
WItemSelection
()
);
boost
::
shared_ptr
<
WItemSelection
>
m_possibleSelections
(
new
WItemSelection
()
);
m_possibleSelections
->
addItem
(
"None"
,
"No postprocessing."
);
m_showHud
=
m_properties
->
addProperty
(
"Texture Debug"
,
"If set, all intermediate texture are shown on screen for debugging."
,
false
);
...
...
src/core/kernel/WFiberSelector.cpp
View file @
25ca1db0
...
...
@@ -111,7 +111,7 @@ void WFiberSelector::slotAddRoi( osg::ref_ptr< WROI > roi )
m_branches
.
push_back
(
branch
);
}
boost
::
shared_ptr
<
WSelectorRoi
>
sroi
=
boost
::
shared_ptr
<
WSelectorRoi
>
(
new
WSelectorRoi
(
roi
,
m_fibers
,
m_kdTree
)
);
boost
::
shared_ptr
<
WSelectorRoi
>
sroi
(
new
WSelectorRoi
(
roi
,
m_fibers
,
m_kdTree
)
);
branch
->
addRoi
(
sroi
);
sroi
->
getRoi
()
->
addROIChangeNotifier
(
m_changeRoiSignal
);
...
...
src/core/kernel/WModuleContainer.cpp
View file @
25ca1db0
...
...
@@ -466,9 +466,7 @@ boost::shared_ptr< WModule > WModuleContainer::applyModule( boost::shared_ptr< W
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSets
(
std
::
vector
<
std
::
string
>
filenames
,
bool
suppressColormaps
)
{
// create thread which actually loads the data
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
filenames
,
boost
::
static_pointer_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
boost
::
shared_ptr
<
WBatchLoader
>
t
(
new
WBatchLoader
(
filenames
,
boost
::
static_pointer_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
t
->
setSuppressColormaps
(
suppressColormaps
);
t
->
run
();
return
t
;
...
...
@@ -477,9 +475,7 @@ WBatchLoader::SPtr WModuleContainer::loadDataSets( std::vector< std::string > fi
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
filenames
,
bool
suppressColormaps
)
{
// create thread which actually loads the data
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
filenames
,
boost
::
static_pointer_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
boost
::
shared_ptr
<
WBatchLoader
>
t
(
new
WBatchLoader
(
filenames
,
boost
::
static_pointer_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
t
->
setSuppressColormaps
(
suppressColormaps
);
t
->
run
();
t
->
wait
();
...
...
Prev
1
2
3
4
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