Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QcmpCompressionLibrary
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioinformaticDataCompression
QcmpCompressionLibrary
Commits
d6ce7c92
Commit
d6ce7c92
authored
5 years ago
by
Vojtech Moravec
Browse files
Options
Downloads
Patches
Plain Diff
Fixed expected data size for scalar quantization.
parent
ac78c301
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/compression/ImageDecompressor.java
+5
-3
5 additions, 3 deletions
src/main/java/compression/ImageDecompressor.java
with
5 additions
and
3 deletions
src/main/java/compression/ImageDecompressor.java
+
5
−
3
View file @
d6ce7c92
...
...
@@ -31,10 +31,12 @@ public class ImageDecompressor extends CompressorDecompressorBase {
long
codebookDataSize
=
2
*
codebookSize
;
codebookDataSize
*=
(
header
.
isCodebookPerPlane
()
?
header
.
getImageSizeZ
()
:
1
);
final
long
p
ixelCount
=
header
.
getImageSizeX
()
*
header
.
getImageSizeY
()
*
header
.
getImageSizeZ
();
final
long
pixelDataSize
=
(
int
)
Math
.
ceil
((
pixelCount
*
header
.
getBitsPerPixel
())
/
8.0
);
final
long
p
lanePixelDataSize
=
(
int
)
Math
.
ceil
(((
header
.
getImageSizeX
()
*
header
.
getImageSizeY
())
*
header
.
getBitsPerPixel
())
/
8.0
);
return
(
codebookDataSize
+
pixelDataSize
);
final
long
allPlanesDataSize
=
planePixelDataSize
*
header
.
getImageSizeZ
();
return
(
codebookDataSize
+
allPlanesDataSize
);
}
private
long
getExpectedDataSize
(
final
QCMPFileHeader
header
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment