Skip to content

Commit c3de7bf

Browse files
Create make_isotropic.py
1 parent aabdc60 commit c3de7bf

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

volker/scripts/make_isotropic.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# make_isotropic.py
2+
#
3+
# Author: Volker Baecker
4+
# Date: 22/03/2024
5+
# This script is in the public domain
6+
#
7+
# Jython script translated from the plugin (java):
8+
#
9+
# Author: Julian Cooper
10+
# Contact: Julian.Cooper [at] uhb.nhs.uk
11+
# First version: 2009/05/22
12+
# Licence: Public Domain */
13+
14+
# Acknowledgements: Erik Meijering, author of TransformJ*/
15+
16+
# This plugin scales an anisotropically calibrated stack of images so that the
17+
# calibration is isotropic (the pixel depth becomes the same as the pixel
18+
# width). The plugin will not rescale XY anisotropy.
19+
20+
# Note: If the pixel depth of the source stack is less than then the width
21+
# there will be fewer slices in the output stack resulting in a potential loss
22+
# of information.
23+
24+
# Requires imagescience.jar to be installed in plugins folder
25+
# Available as part of TransformJ written by Erik Meijering
26+
# http://www.imagescience.org/meijering/software/transformj/
27+
28+
29+
from ij import IJ
30+
from fr.cnrs.mri.cialib.plasmodium import MakeIsotropic
31+
32+
33+
URL = "https://github.com/MontpellierRessourcesImagerie/plasmodium-organelle-analysis"
34+
PROJECT = "plasmodium-organelle-analysis"
35+
36+
37+
def main():
38+
image = IJ.getImage()
39+
makeIsotropic = MakeIsotropic(PROJECT, URL)
40+
makeIsotropic.setImage(image)
41+
makeIsotropic.run()
42+
resultImage = makeIsotropic.getResultImage()
43+
resultImage.show()
44+
45+
46+
main()

0 commit comments

Comments
 (0)