Skip to content

Commit

Permalink
ENH: Update to reflect recent changes made in PyRadiomics
Browse files Browse the repository at this point in the history
Works with new slicer branch (70665cc), main changes necessary are due to renamed functions/variables due to PyRadiomics PR [#291](AIM-Harvard/pyradiomics#291).
  • Loading branch information
JoostJM committed Aug 23, 2017
1 parent 05d1c91 commit 70f3c62
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions SlicerRadiomics/SlicerRadiomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ def setup(self):

# LoG kernel sizes. default to 5 (?)
self.logKernelSizes = qt.QLineEdit()
self.binWidthSliderWidget.toolTip = 'Laplacian of Gaussian filter kernel sizes, separated by comma. If empty, no LoG filtering will be applied.'
self.binWidthSliderWidget.toolTip = 'Laplacian of Gaussian filter kernel sizes (mm), separated by comma. If empty, no LoG filtering will be applied.'
# Layout within the dummy collapsible button
filteringFormLayout = qt.QFormLayout(filteringCollapsibleButton)
filteringFormLayout.addRow('LoG kernel sizes', self.logKernelSizes)

# Resampling
self.resampledVoxelSize = qt.QLineEdit()
self.resampledVoxelSize.toolTip = 'Three floating-point numbers separated by comma defining the resampled pixel size.'
self.resampledVoxelSize.toolTip = 'Three floating-point numbers separated by comma defining the resampled pixel size (mm).'
# Layout within the dummy collapsible button
filteringFormLayout.addRow('Resampled voxel size', self.resampledVoxelSize)

Expand Down Expand Up @@ -445,9 +445,9 @@ def calculateFeatures(self, grayscaleImage, labelImage, featureClasses, settings
for feature in featureClasses:
extractor.enableFeatureClassByName(feature)

extractor.disableAllInputImages()
extractor.disableAllImagesTypes()
for imageType in enabledImageTypes:
extractor.enableInputImageByName(imageType, customArgs=enabledImageTypes[imageType])
extractor.enableImageTypeByName(imageType, customArgs=enabledImageTypes[imageType])

self.logger.debug('Starting feature calculation')

Expand All @@ -471,7 +471,7 @@ def exportToTable(self, featuresDict, table):
table.RemoveAllColumns()

# Define table columns
for k in ['Label', 'Input image type', 'Feature Class', 'Feature Name', 'Value']:
for k in ['Label', 'Image type', 'Feature Class', 'Feature Name', 'Value']:
col = table.AddColumn()
col.SetName(k)
# Fill columns
Expand Down Expand Up @@ -611,7 +611,6 @@ def test_SlicerRadiomics1(self):
settings = {}
settings['binWidth'] = 25
settings['symmetricalGLCM'] = False
settings['verbose'] = False
settings['label'] = 1

enabledImageTypes = {"Original": {}}
Expand Down

0 comments on commit 70f3c62

Please sign in to comment.