-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support for slicing and concatenting? #33
Comments
Hi @dannyhmg, thanks for your comments! So for concatenation there is https://github.com/DylanMuir/TensorStack which should work out of the box for what you want. Slicing is much harder, but I had a vague idea that this was already supported somewhere — give me a moment to look. I haven’t touched this code for quite a while, though. And supporting tensor referencing so it looks like a MATLAB tensor is really complicated! |
Ah, I was thinking of the de-interleaving in |
Hi Dylan, thanks very much for taking the time to reply. I tested TensorStack and it indeed does exactly what I want - thank you!. I noticed that unlike TIFFStack, it doesn't include a license file. May I use a clone of TensorStack as part of an open-source package I am developing (https://github.com/dannyhmg/SiMPull-Analysis-Software), and if so, would you like to add a license? Slicing is less urgent since I realized that in lieu of slicing a TIFFStack object and passing the result to a function, I can just pass indices along with the whole object along, and then let my function load the part of the image it needs. I might revisit writing a wrapper class later if passing indices becomes problematic. |
Great! I’m happy about that.
You’re welcome to use TensorStack in that way. I’ll add the same license as TIFFStack.
|
Great - thanks again for your help and for sharing your work. |
First of all, many thanks for this extremely useful tool - it's been a game-changer for me when working with multi-gigabyte tiff files in MATLAB.
I was wondering if you'd consider adding functions to slice and concatenate images without loading the entire file. As a trivial example, suppose I have a TIFFStack object with size [600, 1200, 500] and I want to pass just half of it to another function. I would be tempted to do something like
smallTIFFStack = bigTIFFStack(:,1:600,:);
but this loads everything into memory, when what I want is a new TIFFStack object that just references the portion of the image I selected.
It also would be nice to be able to concatenate two TIFFStack objects, for cases when my image acquisition software has split a very long timeseries into multiple files:
`>> size(bigTIFFStack1)
ans = 600 1200 4000
If you don't have time to do this, I'd be willing to work on the coding, but I'd need some help figuring out where to start. I am proficient with MATLAB but don't really know anything about how it deals with memory-mapped files.
The text was updated successfully, but these errors were encountered: