May 13, 2025

Public workspacePreparation of 3D distance probes for the quantification of variability in distance measurements between conditions

  • Benjamin Padman1
  • 1UWA
Icon indicating open access to content
QR code linking to this content
Protocol CitationBenjamin Padman 2025. Preparation of 3D distance probes for the quantification of variability in distance measurements between conditions. protocols.io https://dx.doi.org/10.17504/protocols.io.3byl4zkwjvo5/v1
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: April 08, 2025
Last Modified: May 13, 2025
Protocol Integer ID: 126341
Funders Acknowledgements:
Aligning Science Across Parkinson’s (ASAP)
Grant ID: ASAP-000350
Disclaimer
DISCLAIMER – FOR INFORMATIONAL PURPOSES ONLY; USE AT YOUR OWN RISK

The protocol content here is for informational purposes only and does not constitute legal, medical, clinical, or safety advice, or otherwise; content added to protocols.io is not peer reviewed and may not have undergone a formal approval of any kind. Information presented in this protocol should not substitute for independent professional judgment, advice, diagnosis, or treatment. Any action you take or refrain from taking using or relying upon the information presented here is strictly at your own risk. You agree that neither the Company nor any of the authors, contributors, administrators, or anyone else associated with protocols.io, can be held responsible for your use of the information contained in or linked to this protocol or any of our Sites/Apps and Services.
Abstract
Simple procedure for preparing random 3D probe points for the analysis of image segmentation variability
Materials
FIJI/ImageJ
Defining the reference object
Defining the reference object
To assess variability between distance measurements, you will require "reference object" for the distance measurements. You will need one binary TIFF stack, representing the segmented result for that reference object. If you are comparing multiple algorithms or training conditions, the binary reference object is best obtained by averaging all the results then applying a threshold, or by segmenting the reference object using a completely different segmentation method.
This TIFF stack will be referred to as the "reference binary stack".
Defining minimum and maximum probe distances from the reference object
Defining minimum and maximum probe distances from the reference object
Open FIJI/ImageJ.
Load the "reference binary stack" in FIJI/ImageJ.
To define the maximum allowable distance between the 3D probes and the reference object, apply a 3D maximum filter (Process → Filters → Maximum 3D...) with the radius set to the preferred maximum distance.

Save this file as "Maximum Probe Distance.tif".
Load the"reference binary stack" in FIJI/ImageJ.
To define the minimum allowable distance between the 3D probes and the reference object, apply a 3D maximum filter (Process → Filters → Maximum 3D...) with the radius set to the preferred minimum distance.

Save this file as "Minimum Probe Distance.tif".
Load"Maximum Distance.tif" and "Minimum Distance.tif" in FIJI/ImageJ.
Use the Image Calculator (Process → Image Calculator...) to subtract "Minimum Distance.tif" from "Maximum Distance.tif" (by setting the calculator operation to "Subtract"), which will generate a binary boundary surrounding the reference object at the defined distance.

Save this file as "Allowable Probe Locations.tif".
Defining random 3D positions for the distance probes
Defining random 3D positions for the distance probes

Note
The random positions can now be defined by any means as per your preference, as long as they are stored in a tiff stack with the same dimensions as the "Allowable Probe Locations.tif" stack. Otherwise, you can follow the next instructions for an easy way to generate the random locations.

Open FIJI/ImageJ.
Create a new blank stack (File → New → Image...) of the same dimensions as the "Allowable Probe Locations.tif" file (Ensure "Fill With" is set to black).
Duplicate the blank stack (Image → Duplicate...).
Apply noise to both blank stacks (Process → Noise → Salt and Pepper...).
Use the Image Calculator (Process → Image Calculator...) with the "AND" operation between both noised stacks, to generate a sparse collection of randomly positioned white points.

Save this file as "Random Noise.tif".
Final 3D Distance Probes
Final 3D Distance Probes
Open FIJI/ImageJ.
Open "Allowable Probe Locations.tif" and "Random Noise.tif".
Use the Image Calculator (Process → Image Calculator...) with the "AND" operation between both files, to generate a random collection of points at the defined distance from the original reference object.
Save this file as "3D Distance Probes.tif".


Expected result
This file represents the final probe positions that can be used for quantification of variability in distance measurements, with respect to a defined reference object.