I am working with files that have gaps not between every image but rather
between frames (with xyczt ordering). What I have is the following, where each number represents the channel, slice, and frame in that order: 000 100 200 gap 001 101 201 gap 002 102 202 gap ... However using gapBetweenImages as provided by FileInfo opens files like this: 000 gap 100 gap 200 gap 001 gap 101 gap ... How difficult would it be to add something like gapBetweenChannels, gapBetweenSlices, and gapBetweenFrames? I imagine this would require many small changes throughout ImageJ to adjust for the calculation of offsets. From what I can see at least the following would need to be modified: FileInfoVirtualStack.open(), FileOpener.openStack(), and of course FileInfo. In the future ImportDialog could be modified to enable importing of these types of hyperstacks. To complicate things the offset would now become dependent upon the ordering (czt, tcz, etc). I'd be happy to implement this myself if I could get some feedback on how to do so best. -Josh |
Hi Josh,
may I suggest a workaround? Import your files as "raw" and use the gap between channels in bytes. As the height, use 3-fold (or according number of channels) the height of the original images. Create a montage from the resulting images using number of frames as number of columns. With this big montage (rows = channels / cols = frames) use the "Stack Maker" plugin to create one stack which should have the order "xyztc" an can be turned into the desired HyperStack accordingly. Should be a piece of cake to put this into a Macro... Best regards, Daniel |
Hi Daniel,
Thanks for the suggestion, I currently have my plugin opening the files by multiplying the height by the number of channels and letting the user manipulate the stack further perhaps as you suggest. However some of the files we deal with are very large on the order of multiple gigabytes and so what I want to do is to open these files as virtual stacks. Unfortunately the only way to do so is to modify the ImageJ code. Regards, -Josh On Thu, Apr 15, 2010 at 1:31 PM, Daniel Kalthoff <[hidden email]> wrote: > Hi Josh, > > may I suggest a workaround? > > Import your files as "raw" and use the gap between channels in bytes. As > the height, use 3-fold (or according number of channels) the height of the > original images. Create a montage from the resulting images using number of > frames as number of columns. With this big montage (rows = channels / cols = > frames) use the "Stack Maker" plugin to create one stack which should have > the order "xyztc" an can be turned into the desired HyperStack accordingly. > Should be a piece of cake to put this into a Macro... > > Best regards, > > Daniel > |
Hi Josh,
you need not modify ImageJ, you need a plugin. In most cases, modification of ImageJ functionality is easy: You can use any module in ij.plugins, ij.plugins.filter etc. as an external plugin. Just replace the statement 'package ij.plugin;' by 'import ij.plugin.*' (or the same for plugin.filter). Then change the class name, and have an underscore somewhere it it (and do the same with the file name), and you are ready to put it into the ImageJ/plugins folder or a subfolder thereof and use 'Compile&Run'. In your case, it is a bit more difficult, however: you would have to create a new plugin that combines some functionality of ij.io.ImportDialog and ij.io.FileOpener.java. Anyhow, don't modify and recompile the ImageJ core, you would have to recompile it for every new version! Michael ________________________________________________________________ On 18 Apr 2010, at 01:46, Josh D wrote: > Hi Daniel, > Thanks for the suggestion, I currently have my plugin opening the > files by > multiplying the height by the number of channels and letting the user > manipulate the stack further perhaps as you suggest. > > However some of the files we deal with are very large on the order of > multiple gigabytes and so what I want to do is to open these files as > virtual stacks. Unfortunately the only way to do so is to modify > the ImageJ > code. > > Regards, > -Josh > > On Thu, Apr 15, 2010 at 1:31 PM, Daniel Kalthoff <[hidden email]> > wrote: > >> Hi Josh, >> >> may I suggest a workaround? >> >> Import your files as "raw" and use the gap between channels in >> bytes. As >> the height, use 3-fold (or according number of channels) the >> height of the >> original images. Create a montage from the resulting images using >> number of >> frames as number of columns. With this big montage (rows = >> channels / cols = >> frames) use the "Stack Maker" plugin to create one stack which >> should have >> the order "xyztc" an can be turned into the desired HyperStack >> accordingly. >> Should be a piece of cake to put this into a Macro... >> >> Best regards, >> >> Daniel >> |
Free forum by Nabble | Edit this page |