Login  Register

Re: call a pluginfilter

Posted by Thomas Boudier on Feb 16, 2009; 4:40pm
URL: http://imagej.273.s1.nabble.com/call-a-pluginfilter-tp3693703p3693705.html

Hi Albert,

This is exactly what I did but nothing happened so I tested with IJ.Run
and it worked. The pluginfilter Test_ is just here to test the call to
ThresholdToSelection. I use 1.42h with java 1.6.0_10.

Thomas


Albert Cardona a écrit :

> Thomas Boudier wrote:
>> Hi,
>>
>> I would like to create a selection from a mask so I used the
>> ThresholdToSelection class but I have trouble to make it work properly,
>> when I use directly IJ.run("Create Selection") it works perfectly, but I
>> would like to hide my image. Any idea ? Thanks.
>
>
>
> If by hiding an image you mean you don't want the image ever to be shown,
> just don't create a PlugInFilter for the task. Use the
> ThreshholdToSelection directly like you do in the body of the run
> method, and then call imp.getRoi().
>
> That is how I do it in the AmiraImporter class:
>
> http://repo.or.cz/w/trakem2.git?a=blob;f=ini/trakem2/io/AmiraImporter.java;h=fbb8616f6e0769362a5a23cabeb68c5d6201697f;hb=b67bf272c693c543d47abf0db4d5a945f0452a25#l171 
>
>
> Hope that helped.
>
> Albert
>

--
   /**********************************************************/
      Thomas Boudier, MCU Université Pierre et Marie Curie,
      IFR 83. Bat B 7ème étage, porte 709, Jussieu.
      Tel : 01 44 27 20 11  Fax : 01 44 27 22 91
/*******************************************************/