Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed MHD reads incorrectly #12

Open
ctrueden opened this issue May 26, 2017 · 0 comments
Open

Compressed MHD reads incorrectly #12

ctrueden opened this issue May 26, 2017 · 0 comments

Comments

@ctrueden
Copy link
Member

A bug report from Robert Atwood on the ImageJ mailing list:

In FIJI, I find the capability to use .mhd files, which is useful for me. However I tried saving an (8-bt binary thresholded) image in compressed form , and subsequently opening the file only gives noise or else nothing at all.

However, the file that is written is properly read by other application (using ITK in c++) , and the compressed .mhd file that was created by the ITK application can be read in the Fiji .

In trying to replicated at a smaller scale (original file is 250 Mb -> compressed 9 Mb) I found that sometimes it just silently fails to read the file.

I updated Fiji this morning and it is running on Linux (centOs) platform .

Here is a macro that creates an image to replicate two behaviour modes:

newImage("Untitled", "8-bit white", 150, 150, 100);
makeOval(28, 27, 33, 45);
setBackgroundColor(0, 0, 0);
run("Clear", "stack");
run("MHD/MHA compressed ...", "save=blob_compressed.mhd");

run("Add Specified Noise...", "stack standard=25");
run("MHD/MHA compressed ...", "save=blob_noise_compressed.mhd");
run("Close All");


open("blob_compressed.mhd");
getBoolean("Did any file get opened?");
open("blob_noise_compressed.mhd");
getBoolean("Does this look like the original image?");

It is likely a bug in the compression logic of MetaImage_Reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant