setSlice(int) method

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

setSlice(int) method

cihat eldeniz
Hello,

After some processing on an image, I open a new image with 700 slices. Then,
I do:

newImage.setSlice(sliceNo);

where sliceNo is calculated to be 350. [I also entered 350 by hand while
debugging.] But when I call

newImage.getSlice()

it gives 1 [rather than 350]. Do you think this is a bug?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: setSlice(int) method

cihat eldeniz
I forgot to mention. This happens although in the image window it shows
slice 350. After I click the horizontal scroll bar to get to the next slice,
or go backward, the slice indexing seems to recover.

2009/6/3 cihat eldeniz <[hidden email]>

> Hello,
>
> After some processing on an image, I open a new image with 700 slices.
> Then, I do:
>
> newImage.setSlice(sliceNo);
>
> where sliceNo is calculated to be 350. [I also entered 350 by hand while
> debugging.] But when I call
>
> newImage.getSlice()
>
> it gives 1 [rather than 350]. Do you think this is a bug?
>
> Thanks.
>
Reply | Threaded
Open this post in threaded view
|

Re: setSlice(int) method

Michael Schmid
Hi Cihat,

maybe you have a multidimensional image?
Then you should try ImagePlus.setPosition(int channel, int slice, int  
frame)


Michael
________________________________________________________________

On 3 Jun 2009, at 15:23, cihat eldeniz wrote:

> I forgot to mention. This happens although in the image window it  
> shows
> slice 350. After I click the horizontal scroll bar to get to the  
> next slice,
> or go backward, the slice indexing seems to recover.
>
> 2009/6/3 cihat eldeniz <[hidden email]>
>
>> Hello,
>>
>> After some processing on an image, I open a new image with 700  
>> slices.
>> Then, I do:
>>
>> newImage.setSlice(sliceNo);
>>
>> where sliceNo is calculated to be 350. [I also entered 350 by hand  
>> while
>> debugging.] But when I call
>>
>> newImage.getSlice()
>>
>> it gives 1 [rather than 350]. Do you think this is a bug?
>>
>> Thanks.
>>
Reply | Threaded
Open this post in threaded view
|

Re: setSlice(int) method

cihat eldeniz
Yes, that works. Thanks!

2009/6/3 Michael Schmid <[hidden email]>

> Hi Cihat,
>
> maybe you have a multidimensional image?
> Then you should try ImagePlus.setPosition(int channel, int slice, int
> frame)
>
>
> Michael
> ________________________________________________________________
>
>
> On 3 Jun 2009, at 15:23, cihat eldeniz wrote:
>
>  I forgot to mention. This happens although in the image window it shows
>> slice 350. After I click the horizontal scroll bar to get to the next
>> slice,
>> or go backward, the slice indexing seems to recover.
>>
>> 2009/6/3 cihat eldeniz <[hidden email]>
>>
>>  Hello,
>>>
>>> After some processing on an image, I open a new image with 700 slices.
>>> Then, I do:
>>>
>>> newImage.setSlice(sliceNo);
>>>
>>> where sliceNo is calculated to be 350. [I also entered 350 by hand while
>>> debugging.] But when I call
>>>
>>> newImage.getSlice()
>>>
>>> it gives 1 [rather than 350]. Do you think this is a bug?
>>>
>>> Thanks.
>>>
>>>