Login  Register

Re: makeRectangle Problem

Posted by mamech on Apr 30, 2011; 11:37pm
URL: http://imagej.273.s1.nabble.com/makeRectangle-Problem-tp3684750p3684753.html

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?

Thanks