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
C
CT Input Output Library
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
kulvait
CT Input Output Library
Commits
bd9d9b7a
Commit
bd9d9b7a
authored
Jan 21, 2020
by
kulvait
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: wrong dimensions read in DenFrame2DReader
parent
630e59c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
include/DEN/DenFrame2DReader.hpp
include/DEN/DenFrame2DReader.hpp
+11
-10
No files found.
include/DEN/DenFrame2DReader.hpp
View file @
bd9d9b7a
#pragma once
// External
#include <string>
#include <mutex>
#include <string>
// Internal
#include "BufferedFrame2D.hpp"
...
...
@@ -60,8 +60,8 @@ namespace io {
{
this
->
denFile
=
denFile
;
DenFileInfo
pi
=
DenFileInfo
(
this
->
denFile
);
this
->
size
y
=
pi
.
dimx
();
this
->
size
x
=
pi
.
dimy
();
this
->
size
x
=
pi
.
dimx
();
this
->
size
y
=
pi
.
dimy
();
this
->
sizez
=
pi
.
dimz
();
this
->
dataType
=
pi
.
getDataType
();
this
->
elementByteSize
=
pi
.
elementByteSize
();
...
...
@@ -81,12 +81,12 @@ namespace io {
{
delete
[]
buffer
;
}
buffer
=
nullptr
;
buffer
=
nullptr
;
if
(
buffer_copy
!=
nullptr
)
{
delete
[]
buffer_copy
;
}
buffer_copy
=
nullptr
;
buffer_copy
=
nullptr
;
}
/**Copy constructor of DenFrame2DReader from another element.
...
...
@@ -133,8 +133,8 @@ namespace io {
DenFrame2DReader
<
T
>::
DenFrame2DReader
(
DenFrame2DReader
<
T
>&&
b
)
{
this
->
denFile
=
b
.
denFile
;
this
->
sizey
=
b
.
sizey
;
this
->
sizex
=
b
.
sizex
;
this
->
sizey
=
b
.
sizey
;
this
->
sizez
=
b
.
sizez
;
this
->
dataType
=
b
.
dataType
;
this
->
elementByteSize
=
b
.
elementByteSize
;
...
...
@@ -162,8 +162,8 @@ namespace io {
this
->
buffer_copy
=
other
.
buffer_copy
;
other
.
buffer_copy
=
nullptr
;
this
->
denFile
=
other
.
denFile
;
this
->
sizey
=
other
.
sizey
;
this
->
sizex
=
other
.
sizex
;
this
->
sizey
=
other
.
sizey
;
this
->
sizez
=
other
.
sizez
;
this
->
dataType
=
other
.
dataType
;
this
->
elementByteSize
=
other
.
elementByteSize
;
...
...
@@ -201,9 +201,10 @@ namespace io {
std
::
shared_ptr
<
Frame2DI
<
T
>>
ps
=
readBufferedFrame
(
sliceNum
);
return
ps
;
}
template
<
typename
T
>
std
::
shared_ptr
<
io
::
BufferedFrame2D
<
T
>>
DenFrame2DReader
<
T
>::
readBufferedFrame
(
unsigned
int
sliceNum
)
template
<
typename
T
>
std
::
shared_ptr
<
io
::
BufferedFrame2D
<
T
>>
DenFrame2DReader
<
T
>::
readBufferedFrame
(
unsigned
int
sliceNum
)
{
std
::
lock_guard
<
std
::
mutex
>
guard
(
consistencyMutex
);
// Mutex will be released as this goes out of scope.
...
...
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