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
01988446
Commit
01988446
authored
Feb 17, 2011
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - removed additional clone method from reichenbach and made WMData to use with new one.
parent
d494805a
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
6 additions
and
99 deletions
+6
-99
src/dataHandler/WDataSet.cpp
src/dataHandler/WDataSet.cpp
+0
-4
src/dataHandler/WDataSet.h
src/dataHandler/WDataSet.h
+0
-9
src/dataHandler/WDataSetDTI.cpp
src/dataHandler/WDataSetDTI.cpp
+0
-5
src/dataHandler/WDataSetDTI.h
src/dataHandler/WDataSetDTI.h
+0
-9
src/dataHandler/WDataSetScalar.cpp
src/dataHandler/WDataSetScalar.cpp
+0
-4
src/dataHandler/WDataSetScalar.h
src/dataHandler/WDataSetScalar.h
+0
-9
src/dataHandler/WDataSetSingle.cpp
src/dataHandler/WDataSetSingle.cpp
+0
-4
src/dataHandler/WDataSetSingle.h
src/dataHandler/WDataSetSingle.h
+0
-9
src/dataHandler/WDataSetSphericalHarmonics.cpp
src/dataHandler/WDataSetSphericalHarmonics.cpp
+0
-4
src/dataHandler/WDataSetSphericalHarmonics.h
src/dataHandler/WDataSetSphericalHarmonics.h
+0
-9
src/dataHandler/WDataSetVector.cpp
src/dataHandler/WDataSetVector.cpp
+0
-4
src/dataHandler/WDataSetVector.h
src/dataHandler/WDataSetVector.h
+0
-9
src/kernel/modules/data/WMData.cpp
src/kernel/modules/data/WMData.cpp
+6
-20
No files found.
src/dataHandler/WDataSet.cpp
View file @
01988446
...
...
@@ -119,7 +119,3 @@ boost::shared_ptr< WProperties > WDataSet::getInformationProperties() const
return
m_infoProperties
;
}
boost
::
shared_ptr
<
WDataSet
>
WDataSet
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
,
boost
::
shared_ptr
<
WGrid
>
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
();
}
src/dataHandler/WDataSet.h
View file @
01988446
...
...
@@ -149,15 +149,6 @@ public:
*/
boost
::
shared_ptr
<
WProperties
>
getInformationProperties
()
const
;
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
...
...
src/dataHandler/WDataSetDTI.cpp
View file @
01988446
...
...
@@ -64,8 +64,3 @@ wmath::WTensorSym< 2, 3, float > WDataSetDTI::getTensor( size_t index ) const
return
wmath
::
WTensorSym
<
2
,
3
,
float
>
(
values
->
getWValue
(
index
)
);
}
boost
::
shared_ptr
<
WDataSet
>
WDataSetDTI
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetDTI
(
vs
,
grid
)
);
}
src/dataHandler/WDataSetDTI.h
View file @
01988446
...
...
@@ -89,15 +89,6 @@ public:
*/
wmath
::
WTensorSym
<
2
,
3
,
float
>
getTensor
(
size_t
index
)
const
;
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
* The prototype as singleton.
...
...
src/dataHandler/WDataSetScalar.cpp
View file @
01988446
...
...
@@ -167,7 +167,3 @@ boost::shared_ptr< const WValueSetHistogram > WDataSetScalar::getHistogram( size
return
m_histograms
[
buckets
];
}
boost
::
shared_ptr
<
WDataSet
>
WDataSetScalar
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetScalar
(
vs
,
grid
)
);
}
src/dataHandler/WDataSetScalar.h
View file @
01988446
...
...
@@ -149,15 +149,6 @@ public:
*/
static
boost
::
shared_ptr
<
WPrototyped
>
getPrototype
();
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
...
...
src/dataHandler/WDataSetSingle.cpp
View file @
01988446
...
...
@@ -170,7 +170,3 @@ double WDataSetSingle::getValueAt( size_t id ) const
return
0.0
;
// should not be reached. Just there to quiet compiler.
}
boost
::
shared_ptr
<
WDataSet
>
WDataSetSingle
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetSingle
(
vs
,
grid
)
);
}
src/dataHandler/WDataSetSingle.h
View file @
01988446
...
...
@@ -176,15 +176,6 @@ public:
*/
static
boost
::
shared_ptr
<
WPrototyped
>
getPrototype
();
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
...
...
src/dataHandler/WDataSetSphericalHarmonics.cpp
View file @
01988446
...
...
@@ -151,7 +151,3 @@ bool WDataSetSphericalHarmonics::isTexture() const
return
false
;
}
boost
::
shared_ptr
<
WDataSet
>
WDataSetSphericalHarmonics
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetSphericalHarmonics
(
vs
,
grid
)
);
}
src/dataHandler/WDataSetSphericalHarmonics.h
View file @
01988446
...
...
@@ -137,15 +137,6 @@ public:
*/
virtual
bool
isTexture
()
const
;
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
...
...
src/dataHandler/WDataSetVector.cpp
View file @
01988446
...
...
@@ -167,7 +167,3 @@ bool WDataSetVector::isTexture() const
return
true
;
}
boost
::
shared_ptr
<
WDataSet
>
WDataSetVector
::
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
{
return
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetVector
(
vs
,
grid
)
);
}
src/dataHandler/WDataSetVector.h
View file @
01988446
...
...
@@ -124,15 +124,6 @@ public:
*/
boost
::
shared_ptr
<
WDataSetVector
>
isVectorDataSet
();
/**
* Returns a new dataset with the given valueset and grid that is of the same type as this dataset.
*
* \param vs The valueset.
* \param grid The grid.
* \return The new dataset.
*/
virtual
boost
::
shared_ptr
<
WDataSet
>
clone
(
boost
::
shared_ptr
<
WValueSetBase
>
vs
,
boost
::
shared_ptr
<
WGrid
>
grid
)
const
;
protected:
/**
...
...
src/kernel/modules/data/WMData.cpp
View file @
01988446
...
...
@@ -317,6 +317,8 @@ void WMData::moduleMain()
m_output
->
updateData
(
m_dataSet
);
ready
();
WDataSetSingle
::
SPtr
dataSetAsSingle
=
boost
::
shared_dynamic_cast
<
WDataSetSingle
>
(
m_dataSet
);
while
(
!
m_shutdownFlag
()
)
{
m_moduleState
.
wait
();
...
...
@@ -325,13 +327,12 @@ void WMData::moduleMain()
break
;
}
// change transform matrix
if
(
m_matrixSelection
->
changed
()
)
// change transform matrix
(only if we have a dataset single which contains the grid)
if
(
m_matrixSelection
->
changed
()
&&
dataSetAsSingle
)
{
// a new grid
boost
::
shared_ptr
<
WGrid
>
newGrid
;
boost
::
shared_ptr
<
WDataSetSingle
>
ds
=
boost
::
shared_dynamic_cast
<
WDataSetSingle
>
(
m_dataSet
);
boost
::
shared_ptr
<
WGridRegular3D
>
oldGrid
=
boost
::
shared_dynamic_cast
<
WGridRegular3D
>
(
ds
->
getGrid
()
);
boost
::
shared_ptr
<
WGridRegular3D
>
oldGrid
=
boost
::
shared_dynamic_cast
<
WGridRegular3D
>
(
dataSetAsSingle
->
getGrid
()
);
switch
(
m_matrixSelection
->
get
(
true
).
getItemIndexOfSelected
(
0
)
)
{
...
...
@@ -349,22 +350,7 @@ void WMData::moduleMain()
break
;
}
if
(
boost
::
shared_dynamic_cast
<
WDataSetRawHARDI
>
(
m_dataSet
)
)
{
typedef
std
::
vector
<
wmath
::
WVector3D
>
OrientationType
;
// hardi datasets are a morre difficult case because of additional parameters
boost
::
shared_ptr
<
WDataSetRawHARDI
>
hardi
=
boost
::
shared_dynamic_cast
<
WDataSetRawHARDI
>
(
m_dataSet
);
m_dataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetRawHARDI
(
hardi
->
getValueSet
(),
newGrid
,
boost
::
shared_ptr
<
OrientationType
>
(
new
OrientationType
(
hardi
->
getOrientations
()
)
),
hardi
->
getDiffusionBValue
()
)
);
// TODO( reichenbach ): remove copying orientations
}
else
{
// this creates a dataset of the same type as m_dataSet without explicit knowledge of the correct type
m_dataSet
=
m_dataSet
->
clone
(
ds
->
getValueSet
(),
newGrid
);
}
m_dataSet
=
dataSetAsSingle
->
clone
(
newGrid
);
// the clone() may have returned a zero-pointer, only update if it hasn't
// this may happen if the clone() operation has not been implemented in the derived dataset class
...
...
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