Login  Register

Can't export ImagePlus as DICOM with FileExporter plugin

Posted by Jim Cant on Sep 07, 2007; 5:10pm
URL: http://imagej.273.s1.nabble.com/Can-t-export-ImagePlus-as-DICOM-with-FileExporter-plugin-tp3698396.html

Hi,

I am having trouble saving a DICOM files using the 'FileExporter'
plugin in the package de.iftm.ij.plugins.dcmie;

The error message in a popup message box is
"image == null Can't create output file".

I can export an ImagePlus produced by opening a conventional DICOM
file.

What I can't export is a ImagePlus that I have created with my own
data using the bit of code below.  This images display happily in my
application. (I'm not using the ImageJ gui).


Can anyone help me with this?  I'd appreciate any advice or other
suggestions. Or is there another plugin I could use?  (Even an external tool that I could create a DICOM file from using the raw data would be useful.)

Thanks a lot.

jim cant

static public ImagePlus imageFromArray( String title, int width, int height,
                double[] imageAsVector )
{
    ImagePlus imagePlus = null;

    float[] imageData = Utils.doubleAryToFloatAry( imageAsVector );

    FloatProcessor floatProcessor = new FloatProcessor( width, height,
                        imageData, null );

    imagePlus = new ImagePlus( title, floatProcessor );

    return imagePlus;
}