You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to perform some downstream analysis on tiff stacks and would like to use other functions in MATLAB image processing toolbox. Many of those require specific data types. Hence, is it possible to convert a TIFFStack object to type double, uint8, etc.? I can do this for individual slices as follow, but would be better to do on the full stack.
example on a slice;
tsStack = TIFFStack(filename1);
im=uint8(tsStack(:, :, 100)/256)
The text was updated successfully, but these errors were encountered:
This is difficult, because it requires touching the entire stack. If you want the stack as a true Matlab double tensor, then you need to load the entire stack into memory — that's precisely what TIFFStack is trying to avoid.
Doing the analysis slice-wise is the most memory-efficient way. You could also do it chunk-wise, by looping over 3D chunks of the stack:
I'm trying to perform some downstream analysis on tiff stacks and would like to use other functions in MATLAB image processing toolbox. Many of those require specific data types. Hence, is it possible to convert a TIFFStack object to type double, uint8, etc.? I can do this for individual slices as follow, but would be better to do on the full stack.
example on a slice;
tsStack = TIFFStack(filename1);
im=uint8(tsStack(:, :, 100)/256)
The text was updated successfully, but these errors were encountered: