Skip to content

Releases: hansenjn/CiliaQ_Preparator

Improve error handling, fix issues #3 and #4, fix a very rare bug with Canny 3D, and fix a bug with virtual stacks

21 Sep 01:38
8d51752
Compare
Choose a tag to compare

Several issues fixed

(1) Issue #3 was fixed in this version

From now on CiliaQ Preparator will warn you if you try to process an unsaved image and advice you to save it first and then retry processing in CiliaQ Preparator:

UNSAVED IMAGE ERROR

(2) Issue #4 was fixed with this version

(3) A bug occurring when processing an image loaded into FIJI as a virtual stack was fixed

If an image was processed that was loaded into FIJI / ImageJ as a virtual stack, CiliaQ Preparator crashed with the following error message:

Virtual Stack Error Message

The new version of CiliaQ Preparator automatically detects virtual stack input images and avoids the error by copying them into the memory for processing. CiliaQ Preparator notifies the user about this process in the LOG section of the "Multi-Task Manager" window with a message, such as Task 1/5: Image <image name> was a virtual stack image. Copied into work space for processing!

(4) A bug in Canny 3D was fixed with this version

It was noticed that low and high threshold that is applied in Canny 3D were mixed up twice in the code: First, when fetching the values entered by the user and second when the Canny3D processing was applied. Thus, this was not noticable when running the plugin and had no consequences for performance of the Canny 3D method under default settings. It also did not impact reloading Canny 3D settings since when saving the settings and when reading in the settings, not the variables entered in the dialog but the variables applied were saved / loaded.

SHORT AND SIMPLE EXPLANATION
  • The new plugin version is fully compatible to older versions: The new plugin version can read the old settings files and reproduce the image processing and segmentation applied by previous versions!
  • Analysis approaches conducted with default settings are still fully valid. The bug did not affect common Canny 3D segmentation outputs (e.g. performed with default settings).
  • Only in one very special condition that likely nobody ever has applied with the old versions of the plugin, the new plugin cannot reproduce the performance of the older plugin versions: In case you have conducted Canny3D segmentation and selected a CUSTOM threshold for only the higher or lower threshold method but an automated threshold method for the other one. In that case, however, the new plugin will warn you when you try to load the older setting! So you are also safe!
DETAILED EXPLANATION (for geeks)

PROBLEM:

The variables entered in the Canny 3D dialog were stored in to the following variables in the program:

Variable entered in dialog Default value Stored into software variable
Method for low threshold Triangle Method for high threshold
Value for low threshold (if custom threshold selected) 0.0 Value for low threshold
Method for high threshold Otsu Method for low threshold
Value for high threshold (if custom threshold selected) 0.0 Value for high threshold

When applying these variables within the Canny 3D workflow the following was applied:

Software variable Default value Applied as
Method for high threshold Otsu Method for low threshold
Value for high threshold (if custom threshold selected) 0.0 Value for high threshold
Method for low threshold Triangle Method for high threshold
Value for low threshold (if custom threshold selected) 0.0 Value for low threshold

Due to the double swap no bug would occur if for both thresholds, one of the threshold algorithms was selected (as under default settings: Triangle and Otsu). Also no bug would occur if CUSTOM values are entered for high and low threshold.
However, a bug would occur, if a CUSTOM value was selected for one of the thresholds but an algorithm was selected for the other threshold method. Then, the CUSTOM value would not be applied and an unpredictable threshold would be used for the other threshold. In that case the user was alerted by the following error message in the LOG window indicating a problem with the processing:

Example error occuring when problematic setting was applied

Example settings for a problematic setting with previous versions:

Example for a problematic settings dialog selection

It is however very unlikely that this combination ever someone would have applied since the resulting segmentation is very likely very bad.

FIX:

This bug is corrected with version v0.1.2. The settings dialog has not been changed (except for cosmetics):

Old Canny3D Dialog New Canny3D Dialog
Left: Old Canny3D settings dialog. Right: New Canny3D settings dialog.

However a difference can be noticed in the log file CQP.txt stored for reloading settings. Due to the swap old settings files would contain the swapped threshold method information:

Log files
Left: Log CQP.txt file created with versions before v0.1.2 for entering Otsu as high and Triangle as low threshold method. Right: Log CQP.txt file created with the new version, containing the correct variable information as entered.

Since in log CQP.txt files from versions v0.1.1 or lower the threshold method information was falsely swapped for Canny settings, the new version includes an inbuild method to still correctly read old files and apply the settings correctly. If a combination of Canny settings is encountered that resulted in application of Canny that cannot be reproduced with this version, the plugin will warn the user with the following message:

CiliaQ_Preparator cannot finally import this setting since it is from an older CiliaQ Preparator version (<the version>) and running
CiliaQ_Preparator version <the version> with this setting was affected by a bug that has been fixed in version V0.1.2.
You may only reproduce this setting by running your file in CiliaQ Preparator version <the version>, which can be downloaded at
https://github.com/hansenjn/CiliaQ_Preparator/releases/tag/<the version> and manually installed to your FIJI/ImageJ.
Read more about the bug at the release notes of CiliaQ Preparator version V0.1.2:
https://github.com/hansenjn/CiliaQ_Preparator/releases/tag/v0.1.2

To sum up: This new version can correctly read and reproducibly apply old settings derived from CQP.txt files generated by older versions of CiliaQ Preparator! This plugin version is COMPATIBLE to older versions!

Improved handling of a common mistake

In previous versions, if a user forgot to install the 3D ImageJ Suite, cryptic errors were thrown such as...

  • ... when applying a hysteresis threshold method:

3D Hysteresis Threshold Command missing

  • ... when applying Canny 3D:

Canny Threshold Command missing

When this happens in the new version, CiliaQ Preparator informs about this error in the log window and gives an instruction on how to fix it, such as:

Canny Threshold Command missing Details

The full error message text is:

  • ... when applying a hysteresis threshold method:
Task 1/1: Hysteresis Thresholding failed.
Verify that you have the 3D ImageJ Suite installed - for more information see
https://github.com/hansenjn/CiliaQ/wiki/Installing-CiliaQ
If you had the 3D ImageJ Suite installed, please report the following information as an issue on the CiliaQ github page or contact developer with the error information:
Error message: Macro canceled
Error localized message: Macro canceled
Error cause: null
Detailed message:
 
 ij.IJ.abort(IJ.java:2170) 
 ij.IJ.testAbort(IJ.java:367) 
 ij.IJ.run(IJ.java:300) 
 ij.IJ.run(IJ.java:353) 
 ciliaQ_Prep_jnh.CiliaQPrepMain.doHysteresisThreshold(CiliaQPrepMain.java:1697) 
 ciliaQ_Prep_jnh.CiliaQPrepMain.segmentUsingHysteresis(CiliaQPrepMain.jav...
Read more

Fix Issue #2, Add Stay-Awake mode

27 Mar 11:14
Compare
Choose a tag to compare

New Features:

  • Stay Awake mode: If this mode is activated (by checking in the initial settings dialog, see below), CiliaQ Preparator will mimic a mouse motion once in a while to prevent your computer from sleeping (particularly helfpul for Mac users because completely disabling sleep mode in the Mac OS is not always possible).

NewDialog_CiliaQ_Preparator_V011

Bugs fixed:

  • Issue #2 is fixed now - To this end, for 2D images, a 2D "Fill Holes" method was implemented into Canny3D.
  • When using the previous version, issues could have appeared when using Canny3D and when ImageJ's core-preference "Black background" was set to false. From this version on, CiliaQ Preparator makes sure that ImageJ's core-preference "Black background" is always set to true for any image processing steps performed by CiliaQ Preparator.

Preferences Loading, Divide By Background, Smoothing, Hysteresis

20 Sep 19:43
Compare
Choose a tag to compare

New Methods implemented:

  • Loading of preferences from CiliaQ Preparator output files (CQP<>.txt files)
  • Divide By Background function: Divides the image by a Gaussian blurred copy of the image (radius defines the sigma of the Gaussian Blur applied) and thereby, creates a 32-bit image that is next used for thresholding and segmentation
  • Smoothing function: A Gaussian blur is applied to the image, user defines the radius (= sigma)
  • Hysteresis threshold method: A hysteresis threshold can be used for segmentation - uses a function from the 3D ImageJ Suite (https://imagejdocu.tudor.lu/plugin/stacks/3d_ij_suite/start#download)
  • Custom threshold method: A custom threshold can be entered that is applied during segmentation.

Bug fix file selection on Mac, process multiple series in microscopy files

22 Jun 22:17
7a2d1d0
Compare
Choose a tag to compare

In previous versions, a bug emerged in the file selection dialog from multi-task-manager, prohibiting selection fo files for analysis. This bug is fixed with version v0.0.6.

In addition, v0.0.6 is able to process open microscopy file formats with multiple series - all series in the file are then processed independently and the results are output. In previous versions, only the first series in the file was processed.

Fix issue #1

22 May 16:40
Compare
Choose a tag to compare

In version v0.0.5, issue #1 is fixed.

Bugfix

18 May 14:27
Compare
Choose a tag to compare

Using the previous version (v0.0.3), a problem (processing stopped, error message stating exception was shown) occured when processing a stack that did not include slice labels. This problem is now fixed with version v0.0.4.

Version v0.0.3 - Canny 3D Thresholder

14 May 16:24
973cfe9
Compare
Choose a tag to compare

From v0.0.3 on, CiliaQ_Preparator offers the segmentation method "CANNY 3D". This function was implemented based on code from the ImageJ plugin canny3d-thresholder.

Initial release

14 May 12:52
65ec7b2
Compare
Choose a tag to compare

This is the initial release of CiliaQ preparator, a plugin to prepare image stacks for analysis with CiliaQ.