Query timestamps from all planes when C or Z dimensions are not filled #486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
we found a bug on the timestamps display. We have data where the channel at index 0 was acquired only for the first and last frames.
Because the query to get timestamps was restricted to Z=0 and C=0, most timestamps were missing: we only got a list of two (instead of ~400).
-> Consequently, the last timepoint was assigned to the frame n°2, while all other frames had NaN values for timestamps.
To fix it, I added a condition that if the number of timestamps returned from the query is smaller than the number of frames, we do a second query. As such, it will impact performance (and results) only for images requiring it.
Return one arbitrary plane per theT. It does not ensure that it's the lowest theC/theZ, but seems acceptable for those edge cases.
(ensuring here that the minimum possible theC/theZ combination is returned increases the complexity of the query by a lot, because
min(theC)
is not always the same plane asmin(theZ)
)