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 [2016/12/09 08:23] – [Union of multiple ROIs] a bit of additions kotadocuments:120206pyip_cooking:python_imagej_cookbook [2017/04/28 23:46] – [Regular Expression to get meta information from file name] kota
Line 101: Line 101:
 Here is an example, using re package. To construct pattern, several web services are available such as: Here is an example, using re package. To construct pattern, several web services are available such as:
  
-http://www.pythonregex.com/+http://www.pythonregex.com/ \\ 
 +or\\ 
 +https://regex101.com/ 
    
 <code python linenums:1> <code python linenums:1>
Line 1729: Line 1732:
   * [[http://fiji.sc/javadoc/mmorpho/MorphoProcessor.html|MorphoProcessor]]   * [[http://fiji.sc/javadoc/mmorpho/MorphoProcessor.html|MorphoProcessor]]
   * [[http://fiji.sc/javadoc/mmorpho/StructureElement.html|StructureElement]]   * [[http://fiji.sc/javadoc/mmorpho/StructureElement.html|StructureElement]]
 +
 +===== Plugin: Shape Smoothing =====
 +
 +Shape smoothing by reducing the number of Fourier descriptors. 
 +The plugin page is [[http://imagej.net/Shape_Smoothing|here]].
 +The github page is [[https://github.com/thorstenwagner/ij-shape-smoothing/|here]].
 +
 +<code python>
 +from ij import IJ
 +from de.biomedical_imaging.ij.shapeSmoothing import ShapeSmoothingUtil
 +
 +# https://github.com/thorstenwagner/ij-shape-smoothing/blob/master/src/main/java/de/biomedical_imaging/ij/shapeSmoothing/ShapeSmoothingUtil.java
 +
 +imp = IJ.getImage()
 +ss = ShapeSmoothingUtil()
 +ss.setBlackBackground(True)
 +# Relative proportion FDs (%) 
 +thresholdValue = 2
 +# FD in % or absolute number
 +thresholdIsPercentual = True
 +# If True, a table, containing all FDs, will be shown after processing
 +doOutputDescriptors = False
 +
 +ss.fourierFilter(imp.getProcessor(), thresholdValue, thresholdIsPercentual, doOutputDescriptors)
 +</code>
  
 ===== Plugin: Auto Threshold ===== ===== Plugin: Auto Threshold =====
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