Login  Register

Re: ZProjector for dummies

Posted by Jeff Hardin on Jun 05, 2014; 3:48am
URL: http://imagej.273.s1.nabble.com/ZProjector-for-dummies-tp5008014p5008020.html

Dear Wayne and Tiago (Tiago's post below, identical to Wayne's),
Ouch. you're both right. Thanks for correcting a bonehead mistake.
Cheers,
Jeff

On Jun 4, 2014, at 10:05 PM, Tiago Ferreira <[hidden email]> wrote:

> Dear Jeff,
>
>
> On Jun 4, 2014, at 17:25, Jeff Hardin <[hidden email]> wrote:
>> I can't get the same result using calls to the ZProjector  directly that I get when I use the IJ.run("Z Project...") command.
>
> Try calling the setImage() method _before_ setting the limits of the projection, i.e.:
>
>  myProjector = new ZProjector();
>  myProjector.setImage(imp);
>  myProjector.setMethod(ZProjector.MAX_METHOD);
>  myProjector.setStartSlice(1);
>  myProjector.setStopSlice(4);
>
> or, alternatively:
>
>  myProjector = new ZProjector(imp);
>  myProjector.setMethod(ZProjector.MAX_METHOD);
>  myProjector.setStartSlice(1);
>  myProjector.setStopSlice(4);
>
>
> In short:
> Before calling setImage(), the ZProjector does not know on which image to operate.
> Because of that, setStartSlice() and setStopSlice() will do nothing, and the projection
> will be performed on the entire stack (the default). You can check this by looking at
> the ZProjector source code, and confirm that setStartSlice() and setStopSlice() will do
> nothing if the image to be projected has not yet been defined:
>
> https://github.com/imagej/imagej1/blob/master/ij/plugin/ZProjector.java#L72
> https://github.com/imagej/imagej1/blob/master/ij/plugin/ZProjector.java#L78
>
>
> -tiago

----------------------------------------
Jeff Hardin
Professor and Chair, Department of Zoology
Director, Biology Core Curriculum
University of Wisconsin
1117 W. Johnson St.
Madison, WI 53706
voice: (608) 262-9634
fax: (608) 262-7319
email: [hidden email]
web page: http://worms.zoology.wisc.edu

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