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

saving registered uint16 data #180

Open
poherron opened this issue Apr 23, 2020 · 0 comments
Open

saving registered uint16 data #180

poherron opened this issue Apr 23, 2020 · 0 comments

Comments

@poherron
Copy link

Hello. I tried to append this comment into issue #121 which addressed some aspects of the problems with uint16 data. But I guess since it is closed I'll need to open a new issue.
I am also running into issues with my image data being stored as uint16. Won't dividing all your unit16 data by 2 (as suggested in comment #121 and what the ops.scaleTiff fix does) cause you to lose a lot of dynamic range in your luminance? You're cropping off the high values but the low ones aren't extending into negative values by a similar amount with this fix. Maybe I misunderstand how this works.
Also, I am trying to save the registered tiffs as uint16 but I get an error that the tiff writing function can't write to uint16:
Error using tifflib
If SampleFormat is Int, the image datatype is restricted to one of the following: int8, int16, int32.

Error in Tiff/writeAllStrips (line 1969)
tifflib('writeEncodedStrip',obj.FileID, stripNum-1,imageData(row_inds,:));

Error in Tiff/write (line 1477)
obj.writeAllStrips(varargin{:});

Error in TiffWriter (line 20)
t.write(image(:,:,1));

Error in write_reg_to_tiff (line 51)
TiffWriter(uint16(data),fname,bitspersamp);

I'm also a little worried if the conversion to single in rigidRegFrames.m has any effect. The span of values in my aligned data (int16) differs from my original data (uint16) and the registered tiffs seem to have a higher background luminance when I open them in ImageJ than the original data.
Thanks for any help.

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