Page MenuHomePhabricator

[Segmentation] Static mask (3D) of 4D image always shows the 4D image at timestep 0 after reinit
Closed, DuplicatePublic

Description

As mentioned in T27507 I experience an unexpected behavior. To reproduce:

  1. open US4DCyl.nrrd
  2. create a new static segmentation on timestep = 0
  3. create a new static segmentation on timestep = 1
  4. create a new static segmentation on timestep = 2
  5. use the time slider on US4DCyl to change the timestep e.g. to 3
  6. reinit static segmentation t = 0, t = 1, t =2
  7. see how all three segmentations show the same image, US4DCyl at timestep 0.

As @floca mentioned in T27509:

In my opinion the time point, that was selected when a static mask was generated for a dynamic image, is irrelevant (a static mask always covers the whole extend of the dynamic image). For using the tools it should only be relevant which time step is currently selected.

That matches the behavior described above. However, I wonder if is intuitive, to define the timestep at which to segment by changing the timestep of US4DCyl instead of reinitializing each segmentation to a specific timestep. (I know that a 3D segmentation mask does not have timestep and covers the whole extend of the dynamic image.)

Maybe other ideas would make this more intuitive (time slider inside the segmentation plugin?).

Event Timeline

kalali created this task.Thu, Jul 23, 10:36 AM

@kalali Could elaborate on the question? I am somewhat drawing a blank what the question or change proposal now is.

Hm, is there a misunderstanding that @kalali thought a static segmentation of a dynamic image covers only a single timestep instead of the whole time range of the dynamic image with a single timestep? So my first guess is that this task is somewhat invalid. Disussing in general if a reinit should also reset the scene timestep to 0 is something we could address separately I guess.

Well, to be precise: It is not possible to have a static segmentation on a 4D image, reinit it and show another timestep than 0. Is this intended?
What is the workflow for inspecting a 4D image at timestep t != 0 in order to segment something? From what I experience, the user has to initialize the view to the 4D image (not the segmentation) and then change the timestep to the desired one.

Problem I see: Reinit on a segmentation allows to easily move the view to the respective segmentation mask which simplifies the segmentation process. This is not possible since reinitializing a segmentation always resets the scene to timestep 0 with the whole 4D image as bounding box.

Now I understand, thanks. The actual issue is not really related to segmentations in the first place but to the image navigator / world geometry. I guess the logic to limit the time slider (world geometry?) just counts the time steps of the selected data without taking other data into account that may have multiple time steps in the same time range. I do not know if this is easy to fix as both scenarios are valid. In terms of modifying segmentations it is pretty bad, but in case you want to focus on or inspect a certain data and reinit to it it would be very confusing to have a different number of timesteps in the slider than the data actually has.

Do I really need to reinit to the segmentation image or am I able to use the segmentation tools if I reinit to the reference image?

kislinsk triaged this task as High priority.Thu, Jul 23, 2:15 PM
floca added a comment.Thu, Jul 23, 6:04 PM

Ok. @kalali Thank you very much for the clarification.

I see it like @kislinsk. The behavior is as expected (😄) if you reinit on a static segmentation. Reinit on a data will always use the geometry of the data and put current time point to the minimal time bound. Thus if you reinit on a static segmentation, you cannot select time steps any more (as there is only one ;) and you always see the minimial timebound of the segmentation/reference image.

The error is that the user has to / is lured to reinit on the segementation at all. Especially if we think of scenarios where there is no data manager view (e.g. like in the slick segmentation app).
So this should be answered how to we ensure that either no reinit is needed or that it is easy to reinit correctly for a segmentation (so reinit via the reference image).
And I am also hesitant to put such a "reinit help" directly in the segmentation view, it is use case specific which render window should be reinited.

I think we should at least have the correct handling of the segmentation view documented in the help/manual (T27094/T27096).

Do I really need to reinit to the segmentation image or am I able to use the segmentation tools if I reinit to the reference image?

No it should not necessary. In the code for both plugins we reinit based on the referenceImage when the segmentation is created.
So if it does not work later in the workflow it is a bug.