Skip to content

Commit

Permalink
Merge pull request #213 from fedorov/add-feature-class-check
Browse files Browse the repository at this point in the history
ENH: check if feature class name is valid
  • Loading branch information
JoostJM committed Mar 6, 2017
2 parents 79a84e9 + 0db5834 commit 22baea7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions radiomics/featureextractor.py
Expand Up @@ -283,6 +283,9 @@ def enableFeatureClassByName(self, featureClass, enabled=True):
"""
Enable or disable all features in given class.
"""
if featureClass not in self.getFeatureClassNames():
print("Feature class "+featureClass+" is not recognized")
return
if enabled:
self.enabledFeatures[featureClass] = []
elif featureClass in self.enabledFeatures:
Expand Down

0 comments on commit 22baea7

Please sign in to comment.