royerlab / ultrack

Cell tracking and segmentation software
https://royerlab.github.io/ultrack
BSD 3-Clause "New" or "Revised" License
95 stars 13 forks source link

Z dimension is altered after tracking runs #165

Closed jazberna1 closed 6 days ago

jazberna1 commented 1 week ago

Hello,

I'm not sure if this is a bug or the exprected behaviour, so please I apologize beforehand.

I have a dataset consisting of 46 z-stacks, that is 46 timepoints each time point being a z-stack of 20 planes. From that dataset I have:

After that this is how mi napari viewer looks, where the two sliders represent z (top, that goes from 0 to 19) and time (bottom, that goes from 0 to 45)

pre_tracking

I next do the tracking with the 'Manual selection of inputs' where I select the combined contours and combined foreground. Then the top slider in the napari viewer goes from 0 to 45, instead of going from 0 to 19. It's like the z dimension has been altered somehow.

tracking

As I said, I don't know if this is a bug or the expected behabiour of the tracking.

Any help will be much appreciated.

Thanks Jorge

JoOkuma commented 1 week ago

@jazberna1 can you try with ultrack from github?

pip install git+ https://github.com/royerlab/ultrack

We recently fixed this issue, #164

jazberna1 commented 1 week ago

Hi @JoOkuma It worked! thanks!! do you plan to release to conda?

jazberna1 commented 1 week ago

Hi @JoOkuma,

Apologies for bothering you again about this. I have noted the following: I have my tiff files named like this, 39 tiff files (each file is a Z stack of 20 planes)

FUNC_BV1_Exp013_Img008_T_10_C_0.tif
FUNC_BV1_Exp013_Img008_T_11_C_0.tif
FUNC_BV1_Exp013_Img008_T_12_C_0.tif
FUNC_BV1_Exp013_Img008_T_13_C_0.tif
FUNC_BV1_Exp013_Img008_T_14_C_0.tif
FUNC_BV1_Exp013_Img008_T_15_C_0.tif
FUNC_BV1_Exp013_Img008_T_16_C_0.tif
FUNC_BV1_Exp013_Img008_T_17_C_0.tif
FUNC_BV1_Exp013_Img008_T_18_C_0.tif
FUNC_BV1_Exp013_Img008_T_19_C_0.tif
FUNC_BV1_Exp013_Img008_T_20_C_0.tif
FUNC_BV1_Exp013_Img008_T_21_C_0.tif
FUNC_BV1_Exp013_Img008_T_22_C_0.tif
FUNC_BV1_Exp013_Img008_T_23_C_0.tif
FUNC_BV1_Exp013_Img008_T_24_C_0.tif
FUNC_BV1_Exp013_Img008_T_25_C_0.tif
FUNC_BV1_Exp013_Img008_T_26_C_0.tif
FUNC_BV1_Exp013_Img008_T_27_C_0.tif
FUNC_BV1_Exp013_Img008_T_28_C_0.tif
FUNC_BV1_Exp013_Img008_T_29_C_0.tif
FUNC_BV1_Exp013_Img008_T_30_C_0.tif
FUNC_BV1_Exp013_Img008_T_31_C_0.tif
FUNC_BV1_Exp013_Img008_T_32_C_0.tif
FUNC_BV1_Exp013_Img008_T_33_C_0.tif
FUNC_BV1_Exp013_Img008_T_34_C_0.tif
FUNC_BV1_Exp013_Img008_T_35_C_0.tif
FUNC_BV1_Exp013_Img008_T_36_C_0.tif
FUNC_BV1_Exp013_Img008_T_37_C_0.tif
FUNC_BV1_Exp013_Img008_T_38_C_0.tif
FUNC_BV1_Exp013_Img008_T_39_C_0.tif
FUNC_BV1_Exp013_Img008_T_40_C_0.tif
FUNC_BV1_Exp013_Img008_T_41_C_0.tif
FUNC_BV1_Exp013_Img008_T_42_C_0.tif
FUNC_BV1_Exp013_Img008_T_43_C_0.tif
FUNC_BV1_Exp013_Img008_T_44_C_0.tif
FUNC_BV1_Exp013_Img008_T_45_C_0.tif
FUNC_BV1_Exp013_Img008_T_46_C_0.tif
FUNC_BV1_Exp013_Img008_T_47_C_0.tif
FUNC_BV1_Exp013_Img008_T_48_C_0.tif

After running the tracking I see that the time slider goes from 0 to 45. See this video where the combined contour shows up as expected from time 0 to time 38. Then from time 39 to time 45 it shows nothing apart from the tracking.

https://github.com/user-attachments/assets/097ba658-7ed7-49e1-9eea-d12819590ec1

It looks like the maximum of time slider contains extra times (from 39 to 45). I don't know if this is due to the way files are named of if there is a way to set the time slider so it only goes up to 38 in my case (as I only have 39 files).

Again, thanks so much for your help!!!!!!! Jorge

jazberna1 commented 6 days ago

Hi @JoOkuma ,

I went through my files, and it was entirely my fault, I had more 46 files from one of the segmentatios tools I used. Apologies.

Closing the tickect.

Jorge