Skip to content

Commit

Permalink
REF: Add references to new filters
Browse files Browse the repository at this point in the history
Add refrences to 2D and 3D Local Binary Pattern and Gradient (Magnitude) filter.
Add new filters and feature classes in the ReadMe documentation.

Fix to short title underling in FAQ documentation
  • Loading branch information
JoostJM committed Jun 5, 2018
1 parent e6435e7 commit 4464d1c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -42,6 +42,8 @@ Currently supports the following feature classes:
- Gray Level Cooccurence Matrix (GLCM)
- Gray Level Run Length Matrix (GLRLM)
- Gray Level Size Zone Matrix (GLSZM)
- Gray Level Dependece Matrix (GLDM)
- Neighboring Gray Tone Difference Matrix (NGTDM)

### Filter Classes
Aside from the feature classes, there are also some built-in optional filters:
Expand All @@ -52,6 +54,8 @@ Aside from the feature classes, there are also some built-in optional filters:
- Square Root
- Logarithm
- Exponential
- Gradient (Magnitude)
- Local Binary Pattern (LBP) 2D / 3D

### Supporting reproducible extraction
Aside from calculating features, the pyradiomics package includes provenance information in the
Expand Down
4 changes: 2 additions & 2 deletions docs/faq.rst
Expand Up @@ -111,7 +111,7 @@ Usage
-----

How should the input file for ``pyradiomics`` in batch-mode be structured?
#################################################################
##########################################################################

Currently, the batch input file for ``pyradiomics`` is a csv file specifying the combinations of images and masks for
which to extract features. It must contain a header line, where at least header "Image" and "Mask" should be specified
Expand Down Expand Up @@ -143,7 +143,7 @@ logger can be accessed via ``radiomics.logger``. See also :ref:`here <radiomics-
included in the repository on how to set up logging.

I'm able to extract features, but many are NaN, 0 or 1. What happened?
#####################################################################
######################################################################

It is possible that the segmentation was too small to extract a valid texture. Check the value of ``VoxelNum``, which is
part of the additional information in the output. This is the number of voxels in the ROI after pre processing and
Expand Down
23 changes: 22 additions & 1 deletion radiomics/imageoperations.py
Expand Up @@ -604,7 +604,8 @@ def getLoGImage(inputImage, inputMask, **kwargs):
References:
- `SimpleITK Doxygen documentation <https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1LaplacianRecursiveGaussianImageFilter.html>`_
- `SimpleITK Doxygen documentation
<https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1LaplacianRecursiveGaussianImageFilter.html>`_
- `ITK Doxygen documentation <https://itk.org/Doxygen/html/classitk_1_1LaplacianRecursiveGaussianImageFilter.html>`_
- `<https://en.wikipedia.org/wiki/Blob_detection#The_Laplacian_of_Gaussian>`_
Expand Down Expand Up @@ -862,6 +863,12 @@ def getGradientImage(inputImage, inputMask, **kwargs):
Compute and return the Gradient Magnitude in the image.
By default, takes into account the image spacing, this can be switched off by specifying
``gradientUseSpacing = False``.
References:
- `SimpleITK documentation
<https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1GradientMagnitudeImageFilter.html>`_
- `<https://en.wikipedia.org/wiki/Image_gradient>`_
"""
gmif = sitk.GradientMagnitudeImageFilter()
gmif.SetUseImageSpacing(kwargs.get('gradientUseSpacing', True))
Expand Down Expand Up @@ -890,6 +897,14 @@ def getLBP2DImage(inputImage, inputMask, **kwargs):
LBP can often return only a very small number of different gray levels. A customized bin width is often needed.
.. warning::
Requires package ``skimage`` to function. If not available, this filter logs a warning and does not yield an image.
References:
- T. Ojala, M. Pietikainen, and D. Harwood (1994), "Performance evaluation of texture measures with classification
based on Kullback discrimination of distributions", Proceedings of the 12th IAPR International Conference on Pattern
Recognition (ICPR 1994), vol. 1, pp. 582 - 585.
- T. Ojala, M. Pietikainen, and D. Harwood (1996), "A Comparative Study of Texture Measures with Classification Based
on Feature Distributions", Pattern Recognition, vol. 29, pp. 51-59.
"""
global logger
try:
Expand Down Expand Up @@ -942,6 +957,12 @@ def getLBP3DImage(inputImage, inputMask, **kwargs):
.. warning::
Requires package ``scipy`` and ``trimesh`` to function. If not available, this filter logs a warning and does not
yield an image.
References:
- Banerjee, J, Moelker, A, Niessen, W.J, & van Walsum, T.W. (2013), "3D LBP-based rotationally invariant region
description." In: Park JI., Kim J. (eds) Computer Vision - ACCV 2012 Workshops. ACCV 2012. Lecture Notes in Computer
Science, vol 7728. Springer, Berlin, Heidelberg. doi:10.1007/978-3-642-37410-4_3
"""
global logger
try:
Expand Down

0 comments on commit 4464d1c

Please sign in to comment.