From 23fc821d542d67b9b0403394933e3907a8b86bf6 Mon Sep 17 00:00:00 2001 From: theazgra <theazgra@gmail.com> Date: Wed, 30 Jan 2019 09:50:32 +0100 Subject: [PATCH] Updated README. --- README.md | 14 +++++++++++--- czi-format/czi-parser/main.cpp | 7 +++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 589157d..21f22db 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,23 @@ This is list of things, which have to be done first: - [x] Exact copy of `DirectoryEntryDV` will be located in the referenced `SubBlock` - [x] Parse dimensions entries - [x] Parse IEEE 4 / 8 byte float. + - Parsing is done via `memcpy` call. Other alternative is using `union`, but double parsing wass't working with it. Later we can take a look on this and maybe improve the conversion and get rid of the copy. - [x] Parse `SubBlock` - - [ ] Parse image data to proper pixel type. -- [ ] Parse / extract image data from `SubBlock` - - [ ] Support all pixel types. + - [ ] ~~Parse image data to proper pixel type~~. Do we really want to do that? We really care only about **bytes**. Parsing image data into some `PixelType` Matrix may be good, only if we want to do some operation on the image. This is moved to *later* section then. +- [x] Parse / extract image data from `SubBlock` + - We are aware of position and size of the data in CZI file. With that two informations we can extract the data easily. - [ ] Parse important informations from XML metadata. - [ ] Support multi-file situations + - [ ] Obtain multi-file CZI files. Currently we don't have any multi-files, so we can't really parse them. Secondary files should have different GUID than master file, also filepart should be different from 0. Files we have right now have (0) in their name, but theirs filepart is 0 and GUID of master file isn't set correctly. - [ ] One master file and more *secondary files* files (our current `CziFile` class kinda support that situations, so keep going that way) Later on, we can extend our program to handle more things from the file, like: - [ ] Parse metadata according to XML schemas - [ ] Take a look on binary reader, can it be fastened up? - [ ] Parse segments from memory buffer rather than from file stream. (*Disk bottleneck*) +- [ ] Parse image data to PixelType matrix type. + +## Compression of images +- I tested [FLIF](https://flif.info/) compression on ~200 MB file. Compression ratio was good but the speed on the other hand was really bad. Decompression wasn't better, it was slow too. + - Even lossy compression was slow. This compression is probably good for small images. +- Next step is to test B3D compression. diff --git a/czi-format/czi-parser/main.cpp b/czi-format/czi-parser/main.cpp index 09555fa..1b93255 100644 --- a/czi-format/czi-parser/main.cpp +++ b/czi-format/czi-parser/main.cpp @@ -10,7 +10,8 @@ int main(int argc, char **argv) bool report = method == "--report"; bool reportAll = method == "--report-verbose"; - bool dumpImageData = method == "--dump-raw-image-data"; + bool dumpRawImageData = method == "--dump-raw-image-data"; + bool dumpImageData = method == "--dump-image-data"; CziParser parser; auto parseResult = parser.parse_czi_file(cziFile); @@ -19,8 +20,10 @@ int main(int argc, char **argv) parseResult.report_verbose(); else if (report) parseResult.report(); - else if (dumpImageData) + else if (dumpRawImageData) parseResult.dump_image_data(dumpName); + else if (dumpImageData) + parseResult.extract_images(dumpName); printf("Finished.\n"); return 0; -- GitLab