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
2e9a42df
Commit
2e9a42df
authored
Sep 22, 2010
by
reichenbach
Browse files
[FIX] fixed a problem with loading of HARDI datasets and added some debug output
parent
0d972c53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/dataHandler/io/WReaderNIfTI.cpp
src/dataHandler/io/WReaderNIfTI.cpp
+8
-2
No files found.
src/dataHandler/io/WReaderNIfTI.cpp
View file @
2e9a42df
...
...
@@ -190,7 +190,7 @@ boost::shared_ptr< WDataSet > WReaderNIfTI::load()
else
if
(
header
->
dim
[
5
]
>
1
)
{
WAssert
(
header
->
dim
[
4
]
==
1
,
"Only scalar datasets are supported for time series so far."
);
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as
t
ime
s
eries"
;
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as
WDataSetT
ime
S
eries"
;
std
::
size_t
numTimeSlices
=
header
->
dim
[
5
];
float
tw
=
header
->
pixdim
[
5
];
WAssert
(
tw
!=
0.0
f
,
""
);
...
...
@@ -288,14 +288,18 @@ boost::shared_ptr< WDataSet > WReaderNIfTI::load()
{
if
(
vDim
==
3
)
{
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as WDataSetVector"
;
newDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetVector
(
newValueSet
,
newGrid
)
);
}
else
if
(
vDim
==
1
)
{
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as WDataSetScalar"
;
newDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetScalar
(
newValueSet
,
newGrid
)
);
}
else
if
(
vDim
>
20
&&
header
->
dim
[
5
]
=
=
1
)
// hardi data, order 1
else
if
(
vDim
>
20
&&
header
->
dim
[
5
]
<
=
1
)
// hardi data, order 1
{
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as WDataSetRawHARDI"
;
std
::
string
gradientFileName
=
m_fname
;
using
wiotools
::
getSuffix
;
std
::
string
suffix
=
getSuffix
(
m_fname
);
...
...
@@ -322,6 +326,7 @@ boost::shared_ptr< WDataSet > WReaderNIfTI::load()
}
// cannot find the appropriate gradient vectors, build a dataSetSingle instead of hardi
newDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetSingle
(
newValueSet
,
newGrid
)
);
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Could not find corresponding gradients file, loading as WDataSetSingle instead."
;
}
else
{
...
...
@@ -348,6 +353,7 @@ boost::shared_ptr< WDataSet > WReaderNIfTI::load()
}
else
{
wlog
::
debug
(
"WReaderNIfTI"
)
<<
"Load as WDataSetSingle"
;
newDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSetSingle
(
newValueSet
,
newGrid
)
);
}
}
...
...
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