Re: makeRectangle Problem
Posted by
Michael Schmid on
May 03, 2011; 8:45am
URL: http://imagej.273.s1.nabble.com/makeRectangle-Problem-tp3684750p3684754.html
Hi Mamech,
ij.makeRectangle works only if the ImagePlus is the foreground image
(you have to call its show method for that). Otherwise, use
ImagePlus.setRoi with a suitable rectangular roi.
Michael
________________________________________________________________
On 1 May 2011, at 01:37, mamech wrote:
> Thank you for the link
>
> I tried before to make it in "High level way" but I did not succeed.
>
> The sequence that I asked for, was translated to the following
> commands
> using macro recorder of imagej:
>
> open("C:\\Users\\mostafa\\Desktop\\Smarty\\Recognition\\Test2\
> \inventory\\2.jpg");
> makeRectangle(84, 28, 175, 95);
> run("Crop");
>
> So I am supposed to interpret these into java form.
> implus.setImage(bf); // This is instead of open command
>
> ij.makeRectangle(84, 28, 175, 95); // This is the only
> makeRectangle that I
> found and it has no effect
>
> ij.run(implus, "Crop", "");// instead of crop
>
>
> This is the same problem that I faced before. command like crop is
> a high
> level and can be dealt with ij.run(target,command), but for
> makeRectangle it
> seems to be midlevel and should be dealt using ij.makeRectangle.
> How can I
> mix between both of high and mid level?