Trouble with setMinAndMax() and exporting an AVI in IJM macro

Posted by rcz on
URL: http://imagej.273.s1.nabble.com/Trouble-with-setMinAndMax-and-exporting-an-AVI-in-IJM-macro-tp5023866.html

Hello,

I am trying to write what I hope is a simple script: I would like to import
a sequence of DICOM files, adjust the window width and level, and export the
series as an AVI. However, I am having some difficulty and I'm hoping
someone can provide me some assistance -- I would appreciate it!

Using the IJM macro recorder in FIJI, I devised something like this:

/run("Image Sequence...", "open=[path/to/dicom/folder/0001.dcm] file=[.dcm]
use sort");
setMinAndMax(152, 879); // Note that I calculated the inputs manually as
opposed to using the values from the macro
run("AVI... ", "compression=JPEG frame=7
save=[path/to/output/folder/out.avi]");
saveAs("Jpeg", "path/to/output/folder/out.jpg");/

Upon running the recorded macro, the output AVI has an incorrect window
width and level from that specified by my call to /setMinAndMax/(); from
what I can tell via debugging, it appears to have just exported the DICOM
image sequence as imported. However, I am getting the correct visual output
from the output jpg file, which I exported to serve as a test. So, I'm
rather stumped.

I am using FIJI with ImageJ 1.52p, Java 1.8.0_172 (64-bit), and a Windows 10
PC.

Thanks for reading and have a great day!



--
Sent from: http://imagej.1557.x6.nabble.com/

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