CSBDeep / CSBDeep_fiji

BSD 2-Clause "Simplified" License
11 stars 4 forks source link

Revise the jython script for timelapse movies #27

Open sebherbert opened 5 years ago

sebherbert commented 5 years ago

This revision allows the user to select a multi-timepoint tif.

The script automatically checks the number of timepoints in the .tif file and process each timepoint independently before saving each timepoint in an output folder with the extension _frameN appended to the original filename.

GUI file browsing to select the images and path handling are simplified

fjug commented 5 years ago

@frauzufall Have you seen this?

frauzufall commented 5 years ago

Thank you for working on this, @sebherbert @tinevez! I am going to review this as soon as I find the time.

frauzufall commented 5 years ago

Hi @sebherbert, I had a moment to look at the code. Can you help me out, why can you not run the network with the whole hyperstack? I thought the TensorFlow networks usually have a first dimension which can be used for this purpose. Do you get into trouble with the size of the stack? Do you want to normalize individually per timeframe? Or are there other issues I might be unaware of?

sebherbert commented 5 years ago

Argh... It seems I indeed misunderstood the properties of io.open() output. I must have got confused because when I used the original script to run on an hyperstack, the output (as opened by Fiji) was an image stack and I thought it processed the image as a single 3D stack.

So it is indeed processing the hyperstack as needed. Sorry for the confusion...

After searching more, I now see that the output image is only opening as an hyperstack if SCIFIO default loader is enabled under “Edit - Options - ImageJ2” of Fiji. This option is disabled by default and still in Beta version, so it might be useful to warn the users of this behaviour or add a boolean to save as IJ1 or IJ2 tiff format? Unless I am still missing something of course.

There might still be some useful changes in the pull request concerning the path handling, I can revert my changes and add the small boolean to offer the user an other save format if you think it could be useful?

Sebastien

frauzufall commented 5 years ago

Thanks for following up on the stacks, I also did not know this. This work you put into this script is definitely useful!! I think I will keep the parts with the path handling and maybe add a second script which processes the time points individually as you suggested, I think this could still be relevant to people because of the other issues I mentioned (size limits, independent normalization). But I try to avoid IJ1 code as much as possible.

sebherbert commented 5 years ago

Glad it can be useful then and I completely agree. Let me know if I can be of help and thanks for all the efforts!