Posted by
Michael Schmid on
Apr 19, 2010; 10:20am
URL: http://imagej.273.s1.nabble.com/Opening-hyperstacks-with-gaps-between-frames-rather-than-every-image-tp3688558p3688561.html
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
>>