User Tools

Site Tools


documents:120206pyip_cooking:python_imagej_cookbook

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
documents:120206pyip_cooking:python_imagej_cookbook [2018/12/18 22:50] – [Python + ImageJ, Fiji Cookbook] kotadocuments:120206pyip_cooking:python_imagej_cookbook [2020/11/26 07:16] – [Plugin: MorpholibJ] connected component labeling added. kota
Line 221: Line 221:
 print ff.getParent() print ff.getParent()
 print ff.getName() print ff.getName()
 +</code>
 +==== Loading a textfile as String ====
 +
 +<code python linenums:1>
 +path = "/Users/miura/data.txt"
 +with open(inpath, 'r') as myfile:
 +  data = myfile.read()
 +print data
 </code> </code>
  
Line 1911: Line 1919:
 h-dome is useful for spot detection in a noisy background. [[https://www.researchgate.net/publication/261206082_A_new_approach_for_spot_detection_in_total_internal_reflection_fluorescence_microscopy | For example, see this reference]]. The example here uses Plugin MiToBo, a huge collection of various components.  h-dome is useful for spot detection in a noisy background. [[https://www.researchgate.net/publication/261206082_A_new_approach_for_spot_detection_in_total_internal_reflection_fluorescence_microscopy | For example, see this reference]]. The example here uses Plugin MiToBo, a huge collection of various components. 
  
-<code python>+<code:py>
 from de.unihalle.informatik.MiToBo.core.datatypes.images import MTBImage from de.unihalle.informatik.MiToBo.core.datatypes.images import MTBImage
 from de.unihalle.informatik.MiToBo.morphology import HDomeTransform3D from de.unihalle.informatik.MiToBo.morphology import HDomeTransform3D
Line 1925: Line 1933:
  
 </code> </code>
 +
 +===== Plugin: MorphoLibJ =====
 +
 +==== Connected Component 3D labeling ====
 +
 +<code:py>
 +from ij import IJ, ImagePlus
 +from inra.ijpb.binary import BinaryImages
 +
 +imp = IJ.getImage()
 +
 +connectivity = 6
 +outbitDepth = 16
 +outimp = BinaryImages.componentsLabeling(imp, connectivity, outbitDepth)
 +outimp.setTitle(imp.getShortTitle() + "-labeled")
 +outimp.show()
 +</code>
 +
  
  
Line 2024: Line 2050:
  
 See explanation in [[http://www.prasannatech.net/2008/09/implementing-java-interfaces-in-jython.html|here]].  See explanation in [[http://www.prasannatech.net/2008/09/implementing-java-interfaces-in-jython.html|here]]. 
 +
 +===== JAVADOCS =====
 +
 +  * 3D ImageJ Suite [[http://wiki.cmci.info/javaapi/mcib-javadoc/|JAVADOC]]
 +    * [[https://github.com/mcib3d/mcib3d-core|Core Source]]
 +    * [[https://github.com/mcib3d/mcib3d-plugins|Plugin Source]]  
 +  * 3D Viewer [[http://wiki.cmci.info/javaapi/3Dprocessor/|JAVADOC]]
 +  * MultistackReg [[http://wiki.cmci.info/javaapi/multiStackReg_/|JAVADOC]]
  
 ====== Discussions? ====== ====== Discussions? ======
documents/120206pyip_cooking/python_imagej_cookbook.txt · Last modified: 2022/10/16 07:12 by kota

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki