Skip to content

Commit 08a3365

Browse files
authored
Merge pull request #207 from JoostJM/Update-README
Update readme
2 parents ace3663 + 1b951cf commit 08a3365

File tree

10 files changed

+371
-383
lines changed

10 files changed

+371
-383
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[![Travis CI](https://travis-ci.org/Radiomics/pyradiomics.svg?branch=master)](https://travis-ci.org/Radiomics/pyradiomics)
77

8-
# pyradiomics v1.0
8+
# pyradiomics v1.1.0
99

1010
## Radiomics feature extraction in Python
1111

@@ -54,10 +54,14 @@ Furthermore, an instruction video is available [here](http://radiomics.io/pyradi
5454

5555
### Installation
5656

57-
To install this package run the following commands from the root directory:
57+
PyRadiomics is OS independent and compatible with both Python 2.7 and Python >=3.4.
58+
To install this package on unix like systems run the following commands from the root directory:
5859

59-
python -m pip install -r requirements.txt
60-
python setup.py install
60+
sudo python -m pip install -r requirements.txt
61+
sudo python setup.py install
62+
63+
Detailed installation instructions, as well as instructions for installing PyRadiomics on Windows are available in the
64+
[documentation](http://pyradiomics.readthedocs.io/en/latest/installation.html).
6165

6266
### Usage
6367

@@ -87,7 +91,6 @@ See also the [requirements file](requirements.txt).
8791

8892
### WIP
8993
- Implementation of this package as an [extension](https://github.com/Radiomics/SlicerRadiomics) to [3D Slicer](slicer.org)
90-
- Enhancing performance by implementation of C for computationally expensive code
9194

9295
### License
9396
This package is covered by the [3D Slicer License](LICENSE.txt).

bin/Notebooks/PyRadiomics Example.ipynb

Lines changed: 132 additions & 157 deletions
Large diffs are not rendered by default.

bin/Notebooks/helloFeatureClass.ipynb

Lines changed: 203 additions & 202 deletions
Large diffs are not rendered by default.

bin/Notebooks/helloRadiomics.ipynb

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,25 @@
154154
"output_type": "stream",
155155
"text": [
156156
"Enabled input images:\n",
157-
"\toriginal\n"
157+
"\tOriginal\n"
158158
]
159159
}
160160
],
161161
"source": [
162162
"# By default, only 'original' (no filter applied) is enabled. Optionally enable some filters:\n",
163163
"\n",
164-
"# extractor.enableInputImageByName('wavelet')\n",
165-
"# extractor.enableInputImageByName('log', customArgs={'sigma':[3.0]})\n",
166-
"# extractor.enableInputImageByName('square')\n",
167-
"# extractor.enableInputImageByName('squareroot')\n",
168-
"# extractor.enableInputImageByName('exponential')\n",
169-
"# extractor.enableInputImageByName('logarithm')\n",
164+
"# extractor.enableInputImageByName('Wavelet')\n",
165+
"# extractor.enableInputImageByName('LoG', customArgs={'sigma':[3.0]})\n",
166+
"# extractor.enableInputImageByName('Square')\n",
167+
"# extractor.enableInputImageByName('SquareRoot')\n",
168+
"# extractor.enableInputImageByName('Exponential')\n",
169+
"# extractor.enableInputImageByName('Logarithm')\n",
170170
"\n",
171171
"# Alternative; set filters in one operation \n",
172172
"# This updates current enabled input images, i.e. overwrites custom settings. \n",
173173
"# However, input images already enabled, but not passed in this call, are not disabled.\n",
174174
"\n",
175-
"# extractor.enableInputImages(wavelet={}, log={'sigma':[3.0]})\n",
175+
"# extractor.enableInputImages(Wavelet={}, LoG={'sigma':[3.0]})\n",
176176
"\n",
177177
"print(\"Enabled input images:\")\n",
178178
"for imageType in extractor.inputImages.keys():\n",
@@ -248,6 +248,7 @@
248248
"\n",
249249
" :math:`entropy = -\\displaystyle\\sum^{N_l}_{i=1}{p(i)\\log_2\\big(p(i)+\\epsilon\\big)}`\n",
250250
"\n",
251+
" Here, :math:`\\epsilon` is an arbitrarily small positive number (:math:`\\approx 2.2\\times10^{-16}`).\n",
251252
" Entropy specifies the uncertainty/randomness in the\n",
252253
" image values. It measures the average amount of\n",
253254
" information required to encode the image values.\n",
@@ -423,12 +424,12 @@
423424
"Calculating features\n",
424425
"\t\tComputing firstorder\n",
425426
"Computed general_info_BoundingBox: (162; 84; 11; 47; 70; 7)\n",
426-
"Computed general_info_GeneralSettings: {'verbose': True; 'binWidth': 25; 'label': 1; 'interpolator': 'sitkBSpline'; 'resampledPixelSpacing': None; 'padDistance': 5}\n",
427+
"Computed general_info_GeneralSettings: {'additionalInfo': True; 'verbose': True; 'binWidth': 25; 'enableCExtensions': True; 'label': 1; 'interpolator': 'sitkBSpline'; 'resampledPixelSpacing': None; 'padDistance': 5}\n",
427428
"Computed general_info_ImageHash: 5c9ce3ca174f0f8324aa4d277e0fef82dc5ac566\n",
428429
"Computed general_info_ImageSpacing: (0.7812499999999999; 0.7812499999999999; 6.499999999999998)\n",
429-
"Computed general_info_InputImages: {'original': {}}\n",
430+
"Computed general_info_InputImages: {'Original': {}}\n",
430431
"Computed general_info_MaskHash: 9dc2c3137b31fd872997d92c9a92d5178126d9d3\n",
431-
"Computed general_info_Version: v1.0.post11.dev0+g610dffc\n",
432+
"Computed general_info_Version: v1.0.1.post69.dev0+gc00bfe2\n",
432433
"Computed general_info_VolumeNum: 2\n",
433434
"Computed general_info_VoxelNum: 4137\n",
434435
"Computed original_firstorder_InterquartileRange: 253.0\n",
@@ -471,7 +472,7 @@
471472
"language_info": {
472473
"codemirror_mode": {
473474
"name": "ipython",
474-
"version": 2
475+
"version": 2.0
475476
},
476477
"file_extension": ".py",
477478
"mimetype": "text/x-python",
@@ -483,4 +484,4 @@
483484
},
484485
"nbformat": 4,
485486
"nbformat_minor": 0
486-
}
487+
}

bin/batchExamples/batchprocessing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ def main():
5656
kwargs['resampledPixelSpacing'] = None # [3,3,3]
5757
kwargs['interpolator'] = sitk.sitkBSpline
5858
kwargs['verbose'] = True
59+
kwargs['enableCExtensions'] = False
5960

6061
logging.info('pyradiomics version: %s', radiomics.__version__)
6162
logging.info('Extracting features with kwarg settings: %s', str(kwargs))
6263

6364
extractor = featureextractor.RadiomicsFeaturesExtractor(**kwargs)
64-
extractor.enableInputImages(original={})
65+
extractor.enableInputImages(Original={})
6566
# extractor.enableInputImages(wavelet= {'level': 2})
6667
for idx, entry in enumerate(flists, start=1):
6768

bin/helloFeatureClass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
#
150150
if applyLog:
151151
sigmaValues = numpy.arange(5., 0., -.5)[::1]
152-
for logImage, inputImageName, inputKwargs in imageoperations.applyFilterLoG(image, sigma=sigmaValues, verbose=True):
152+
for logImage, inputImageName, inputKwargs in imageoperations.getLoGImage(image, sigma=sigmaValues, verbose=True):
153153
logFirstorderFeatures = firstorder.RadiomicsFirstOrder(logImage, mask, **inputKwargs)
154154
logFirstorderFeatures.enableAllFeatures()
155155
logFirstorderFeatures.calculateFeatures()
@@ -160,7 +160,7 @@
160160
# Show FirstOrder features, calculated on a wavelet filtered image
161161
#
162162
if applyWavelet:
163-
for decompositionImage, decompositionName, inputKwargs in imageoperations.applyFilterWavelet(image):
163+
for decompositionImage, decompositionName, inputKwargs in imageoperations.getWaveletImage(image):
164164
waveletFirstOrderFeaturs = firstorder.RadiomicsFirstOrder(decompositionImage, mask, **inputKwargs)
165165
waveletFirstOrderFeaturs.enableAllFeatures()
166166
waveletFirstOrderFeaturs.calculateFeatures()

docs/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,20 @@ Joost J.M. van Griethuysen et al, “Computational Radiomics System to Decode th
6565
Installation
6666
------------
6767

68+
PyRadiomics is OS independent and compatible with both Python 2.7 and Python >=3.4.
69+
6870
* Clone the repository
6971

7072
* ``git clone git://github.com/Radiomics/pyradiomics``
7173

72-
* Install on your system, with prerequisites:
74+
* Install on your system (Linux, Mac OSX), with prerequisites:
7375

7476
* ``cd pyradiomics``
7577
* ``sudo python -m pip install -r requirements.txt``
7678
* ``sudo python setup.py install``
7779

78-
* For more detailed installation instructions see :ref:`Installation Details<installation-label>`
80+
* For more detailed installation instructions and installation on Windows see
81+
:ref:`Installation Details<installation-label>`
7982

8083
.. toctree::
8184
:maxdepth: 2

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Get the code
88

99
* Ensure you have the version control system ``git`` installed on your machine.
1010

11-
* Ensure that you have ``python`` installed on your machine, at least version 2.7.
11+
* Ensure that you have ``python`` installed on your machine, at least version 2.7 or 3.4.
1212

1313
* Clone the repository:
1414

docs/usage.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Interactive Use
9898
* Import the necessary classes::
9999

100100
from radiomics import featureextractor
101+
import six
101102
import sys, os
102103

103104
* Set up a pyradiomics directory variable::
@@ -153,6 +154,7 @@ Using feature classes directly
153154

154155
from radiomics import firstorder, glcm, imageoperations, shape, glrlm, glszm
155156
import SimpleITK as sitk
157+
import six
156158
import sys, os
157159

158160
* Set up a data directory variable::

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def run_tests(self):
8888
'Programming Language :: C',
8989
'Programming Language :: Python :: 2',
9090
'Programming Language :: Python :: 2.7',
91+
'Programming Language :: Python :: 3.4',
92+
'Programming Language :: Python :: 3.5',
9193
'Topic :: Scientific/Engineering :: Bio-Informatics',
9294
],
9395

0 commit comments

Comments
 (0)