add to swap axis if only one time point and several Z#336
add to swap axis if only one time point and several Z#336gletort wants to merge 3 commits intotrackmate-sc:masterfrom
Conversation
|
May I suggest going further? With this approach, the message that the image has only one time-point is shown all the time, regardless of whether the user meant to analyse a 3D image or not. But since we are opening a TrackMate file, we can guess whether the image analyzed was truly 3D or 2D+T, by inspecting the metadata stored in the XML file. For instance: This would be a true 3D, one time point file: <Settings>
<ImageData filename="Celegans-5pc-17timepoints-smoothed.tif" folder="samples/"
width="240" height="295" nslices="41" nframes="1" pixelwidth="0.1984666072986889"
pixelheight="0.1984666072986889" voxeldepth="1.0" timeinterval="2.0" />And this would be a 2D+T image file: <Settings>
<ImageData filename="FakeTracks.tif" folder="/Users/tinevez/Development/TrackMateWS/TrackMate/samples/"
width="128" height="128" nslices="1" nframes="50" pixelwidth="1.0"
pixelheight="1.0" voxeldepth="1.0" timeinterval="1.0" />Maybe we can read these metadata, check whether they match the dimensionality of the image that was opened, and if not, prompt the user? |
|
Ok, sure. Should I make it then do the swapping automatically in that case (following the settings in the .xml file), or still ask the user ? The .xml settings should be always correct, no ? |
|
Yes the .xml should have the right metadata: it is taken from the image when the user saved to XML from TrackMate. I would say: prompt the user, if they say yes, flip the image, and then prompts them to fix the dimensionality themselves and resave the image. |
Propose to swap Z and T axis in plugin "Load TrackMate file" if there is one time point and several Z. Same function as in the main TrackMate plugin