On Apr 29, 2009, at 8:51 AM, Tony Shepherd wrote:
> I construct an ImagePlus object by
>
> ImagePlus imp = new ImagePlus(filename);
>
> where 'filename' is the name of the first slice in a 3D dicom set.
>
> The file format is recognised and 'imp' containd data from this first
> slice
> (2d image plus header). Can I construct as a stack, by automatically
> running through all the slices in the same folder?
The easy way to open a DICOM sequence as a stack is to use the
File>Import>Image Sequence command, or simply drag and drop the folder
onto the "ImageJ" window. The disadvantage, except for batch mode
macros, is that the stack is displayed. Look at the source for the
internal FolderOpener plugin
http://rsb.info.nih.gov/ij/developer/source/ij/plugin/
FolderOpener.java.html
to see how a plugin can create a stack from all the images in a folder.
-wayne