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
bff68258
Commit
bff68258
authored
Jul 21, 2020
by
kulvait
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DenFileInfo provides getFileName()
parent
cfbc4f6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
include/DEN/DenFileInfo.hpp
include/DEN/DenFileInfo.hpp
+3
-2
src/DenFileInfo.cpp
src/DenFileInfo.cpp
+12
-10
No files found.
include/DEN/DenFileInfo.hpp
View file @
bff68258
...
...
@@ -18,6 +18,7 @@ namespace io {
{
public:
DenFileInfo
(
std
::
string
fileName
);
std
::
string
getFileName
()
const
;
uint32_t
dimx
()
const
;
uint32_t
dimy
()
const
;
uint32_t
dimz
()
const
;
...
...
@@ -291,7 +292,7 @@ namespace io {
uint64_t
dim_z
=
dimz
();
uint64_t
totalSize
=
dim_x
*
dim_y
*
dim_z
;
uint64_t
currentPosition
;
uint32_t
elementSize
=
elementByteSize
();
uint32_t
elementSize
=
elementByteSize
();
double
sum
=
0.0
;
double
val
;
uint8_t
*
buffer
=
new
uint8_t
[
dim_x
*
dim_y
*
elementByteSize
()];
...
...
@@ -313,7 +314,7 @@ namespace io {
double
DenFileInfo
::
getVariance
()
const
{
DenSupportedType
dataType
=
getDataType
();
uint32_t
elementSize
=
elementByteSize
();
uint32_t
elementSize
=
elementByteSize
();
uint64_t
dim_x
=
dimx
();
uint64_t
dim_y
=
dimy
();
uint64_t
dim_z
=
dimz
();
...
...
src/DenFileInfo.cpp
View file @
bff68258
...
...
@@ -20,6 +20,8 @@ namespace io {
}
}
std
::
string
DenFileInfo
::
getFileName
()
const
{
return
this
->
fileName
;
}
uint64_t
DenFileInfo
::
getOffset
()
const
{
return
offset
;
}
bool
DenFileInfo
::
isExtended
()
const
{
return
extended
;
}
bool
DenFileInfo
::
isValid
()
const
...
...
@@ -31,7 +33,7 @@ namespace io {
dataSize
=
this
->
getSize
()
-
offset
;
}
else
{
return
false
;
return
false
;
}
uint64_t
numPixels
=
this
->
getNumPixels
();
if
(
dataSize
==
0
&&
numPixels
==
0
)
...
...
@@ -40,16 +42,16 @@ namespace io {
}
if
(
dataSize
<
numPixels
||
dataSize
%
numPixels
!=
0
)
{
return
false
;
return
false
;
}
uint64_t
elmSize
=
dataSize
/
numPixels
;
if
(
elmSize
==
2
||
elmSize
==
4
||
elmSize
==
8
)
{
return
true
;
}
else
{
return
false
;
}
uint64_t
elmSize
=
dataSize
/
numPixels
;
if
(
elmSize
==
2
||
elmSize
==
4
||
elmSize
==
8
)
{
return
true
;
}
else
{
return
false
;
}
}
/**X dimension*/
uint32_t
DenFileInfo
::
dimx
()
const
...
...
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