Login  Register

Re: Montage java.lang.NegativeArraySizeException

Posted by John Hayes on Aug 31, 2015; 10:27pm
URL: http://imagej.273.s1.nabble.com/Montage-java-lang-NegativeArraySizeException-tp5014201p5014208.html

Hi Mark,

I guess what I'm getting at is that Image Sequence may not be completing
correctly before starting the Montage Maker. This may be similar to the
recent problem Avital was having. Check out Wayne's response on using the
IJ.run command.

HTH,

John
On Aug 31, 2015 6:19 PM, "Mark Chopping" <[hidden email]>
wrote:

> Hi John,
>
> Thanks. The values are hardcoded but since I'm increasingly good at making
> blunders, I get the macro to print stuff to stdout for debugging, so with
>
> xvfb-run-safe ~/ImageJ/jre/bin/java -Xmx4096m -jar ~/ImageJ/ij.jar -ijpath
> ~/ImageJ -batch MosaicEm.ijm path:base > MLOG &
>
> I can look at MLOG (names have been changed to protect the innocent):
>
> $ more MLOG
> path      =/correct/path/to/directories/
> base      =g_WV01_12AUG080532155-P1BS-102001001CE43800_orth
> log
> =/correct/place/with/logs/g_WV01_12AUG080532155-P1BS-102001001CE43800_orth.log
> tdi
>  =/correct/place/with/tdi/g_WV01_12AUG080532155-P1BS-102001001CE43800_orth.tdi
> outDir    =/correct/path/to/the/TIFFDIR/
> sampleTIFF=/correct/path/to/the/TIFFDIR/_Crowns/Crown_Filled_0000.tif
> WSize:  800
> srcCols  =43176
> srcRows  =32636
> xLocs     :  53
> yLocs     :  40
> NumSlices :  40
> numfiles  :  2120
> Mosaicing the 2120 (53 x 40) images...
> Image Sequence run; doing Make Montage...
> java.lang.NegativeArraySizeException
>
> The macro code is:
>
>   print("Mosaicing the "+numfiles+" ("+xLocations+" x "+ NumSlices +")
> images...");
>   run("Image Sequence...", "open="+sampleTIFF+" number="+numfiles+"
> starting=1 increment=1 scale=100 file=.tif sort use");
>   print("Image Sequence run; doing Make Montage...");
>   run("Make Montage...", "columns="+xLocations+" rows="+ NumSlices +"
> scale=1 first=1 last="+numfiles+" increment=1 border=0");
>   saveAs("Tiff", outDir+"CAN_"+base+".tif");
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html