Posted by
Adrian Daerr-2 on
Sep 27, 2013; 1:44pm
URL: http://imagej.273.s1.nabble.com/complex-valued-images-in-ImageJ2-tp5004962.html
Hello,
For an image analysis which would benefit from using complex numbers
(Fourrier analysis etc), I downloaded ImageJ2 after I saw that imglib
defines promising ComplexTypes. However I do not manage to naively
create a complex-valued images in an ImageJ2 plugin. Should it be
possible ? Before I fall back to treating real and imaginary components
separately, I would like to know what the current status of complex type
images is in ImageJ2 (creation, processing, viewing ?)?
Some details about what I tried: after easily compiling the
GradientImage example from the simple-commands in the IJ2-doc at
http://developer.imagej.net/writing-imagej2-pluginsI tried to modify this plugin to create a ComplexDoubleType Img object,
using the first example of the ImgLib2 doc at:
http://fiji.sc/ImgLib2_-_Getting_Startedwith a ComplexDoubleType in place of the UnsignedByteType and using the
generic ImgFactory instead of the ArrayImageFactory, namely
Img< ComplexDoubleType > img = new ImgFactory< ComplexDoubleType
>().create( dims, new ComplexDoubleType() );
The plugin compiles and runs (at least up to the dialog asking for width
and height), but nothing happens:
- ImageJ does not automatically display this Img even if I declare it as
output parameter:
@Parameter(type = ItemIO.OUTPUT) Img< ComplexDoubleType > img;
- I do not see anything either using:
net.imglib2.img.display.imagej.ImageJFunctions.show( img );
- I see no errors (where do I have to look ?)
The complete source of my plugin-attempt is at
https://gitorious.org/phasegradientimage/phasegradientimage/source/233c74c7932e3d8e469e95e47b7e30cdf5bb7be1:PhaseGradientImage.java(and can also be cloned as
[hidden email]:phasegradientimage/phasegradientimage.git
)
If ImageJ cannot yet display ComplexType images, but *can* do headless
stuff using imglib that's fine with me, but I am quite confused that I
do not see any errors at all, even if I do stuff that is not permissible
(such as, if I understand the API correctly, calling ArrayImageFactory
with a ComplexDoubleType (i.e. a non-NativeType) as argument). Where are
errors logged ?
Any help appreciated,
Adrian
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html