> I've been struggling with a little macro that will automatically
> window some 16-bit CT images of dry bone in air. I want air to be
> black and bone to be shades of grey with nice dynamic range.
>
> If I manually set Window and Level, macro recorder tells me the code
> is:
>
> setMinAndMax(31468, 32959);
>
> and my image looks how I want it
>
> However, if I run this code from a macro window, my image goes black
> as the window level is way too low (the ramp goes off the right of the
> W&L graph).
>
> Any ideas what might be going on?
This is a macro recorder bug that is fixed in ImageJ 1.39s, due by the
end of week. It should record
setMinAndMax(-200, 300)
when you open the "CT" sample image and click "Set" in the B&C window,
but instead it records
setMinAndMax(32568, 33068);
-wayne