API inconsistency?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

API inconsistency?

José María Mateos
Hi everybody,

Is there any place where I can find where stack and frame indexes are
one-based and when they are zero-based? I've found that, for instance,

ImagePlus.getStackIndex(int channel, int slice, int frame)

is one-based, but for instance

ImageStack.setVoxel(int x, int y, int z)

is zero-based. In this case, z would be the slice number. I might be
wrong, but is the nomenclature (z / slice) the only indicator in this case?

Best,

José.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: API inconsistency?

Rasband, Wayne (NIH/NIMH) [E]
On Jul 30, 2012, at 11:39 AM, José María Mateos wrote:

> Hi everybody,
>
> Is there any place where I can find where stack and frame indexes are
> one-based and when they are zero-based? I've found that, for instance,
>
> ImagePlus.getStackIndex(int channel, int slice, int frame)
>
> is one-based, but for instance
>
> ImageStack.setVoxel(int x, int y, int z)
>
> is zero-based. In this case, z would be the slice number. I might be
> wrong, but is the nomenclature (z / slice) the only indicator in this case?

Channel, slice and frame indexes are one-based, z indexes are zero-based.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: API inconsistency?

José María Mateos
2012/7/30 Rasband, Wayne (NIH/NIMH) [E] <[hidden email]>:
> Channel, slice and frame indexes are one-based, z indexes are zero-based.

That clarifies it, Thanks a lot for your answer.

Best,

José.

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