Re: custom ImageProcessor sub-class (no-gui) question
Posted by
Brian Willkie-2 on
May 01, 2008; 8:05pm
URL: http://imagej.273.s1.nabble.com/custom-ImageProcessor-sub-class-no-gui-question-tp3696367p3696368.html
Quoting
[hidden email]:
Well, to answer my own question, line 68 in ImageProcessor
instantiates an awt component:
protected Color drawingColor = Color.black;
Is there anyway to avoid this?
Thanks,
Brian
> Hello,
>
> I'm looking into adapting ImageJ code for my own application. Attached
> is an example that attempts to open a tif file (the file I'm using
> opens in ImageJ as 32 bit RGB).
>
> I've built a bare-bones version of ColorProcessor (included in the
> java file) that shouldn't instantiate any java.awt components (it has
> two constructors with empty definitions). Yet when I create an
> instance of my custom ColorProcessor, I get a GUI. If I comment out
> the lines that instantiate my custom ColorProcessor, the program exits
> without creating a GUI.
>
> Can anyone point out what I'm overlooking?
>
> Thanks,
> Brian
>
> P.S. To compile and run:
> %javac -classpath /path/to/ij.jar -d /path/to/bin/ \
> /path/to/src/PseudoProcessorTest.java
>
> %java -classpath /path/to/ij.jar:/path/to/bin/ PseudoProcessorTest \
> -p /path/to/image/ -f someImage.tif