-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Refactor CLI scripts #347
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Combine the `pyradiomics` and `pyradiomicsbatch` entry point into 1 joint entry point `pyradiomics`. This new entry point operates in batch mode when input to `Image|Batch` has `.csv` extension. In batch mode, `Mask` argument is ignored. In single mode `Mask` inputs is required. Additionally, enables easy multi-threaded extraction by specifying `--jobs` / `-j` argument (with integer indicating number of parallel threads to use. Will only work in batch mode, as extraction is multi-threaded at the case level (1 thread per case). Removes argument `--label` / `-l`, specifying an override label to use is now achieved through specifying `-s "label:N"`, with N being the label value. Also includes a small update to initialization of the feature extractor: - In addition to a string pointing to a parameter file, feature extractor now also accepts a dictionary (top level specifies customization types 'setting', 'imageType' and 'featureClass') as 1st positional argument - Regardless of initialization with or without a customization file/dictionary, `kwargs` passed to the constructor are used to override settings.
9c629dd
to
dd7c445
Compare
Maybe for now include a stub entrypoint for pyradiomicsbatch that issues an error and pointer to the documentation for switching to the new style. |
|
Additionally, re-add the `pyradiomicsbatch` as a deprecated entry point to preserve legacy functionality. Also re-add the `--label` argument as a deprecated argument in the `pyradiomics` entry point.
lgtm 👍 |
This was referenced Mar 13, 2018
JoostJM
added a commit
to AIM-Harvard/SlicerRadiomics
that referenced
this pull request
Mar 21, 2018
Recently a [PR](AIM-Harvard/pyradiomics#347) was merged in PyRadiomics, refactoring the commandline interface. Update the SlicerRadiomics module to work with the new functionality. Additionally, fix a bug when requesting the XML from the SlicerRadiomicsScript (due to a name change, it is now necessary to cut off "Script").
JoostJM
added a commit
to AIM-Harvard/SlicerRadiomics
that referenced
this pull request
Apr 30, 2018
Remove use .bat and .sh wrapper script, and instead define the CLI entry point as a python script. This makes use of the new Slicer functionality described in Slicer/Slicer#894 and implemented in r27143-r27145. This fixes #43. Additionally, check if a `--label <label>` argument is present, and if so, update it to the new-style: `--setting=label:<label>`. Parameter `--label` is deprecated by PR AIM-Harvard/pyradiomics#347.
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Combine the
pyradiomics
andpyradiomicsbatch
entry point into 1 joint entry pointpyradiomics
.This new entry point operates in batch mode when input to
Image|Batch
has.csv
extension.In batch mode,
Mask
argument is ignored. In single modeMask
inputs is required.Additionally, enables easy multi-threaded extraction by specifying
--jobs
/-j
argument (with integer indicating number of parallel threads to use.Will only work in batch mode, as extraction is multi-threaded at the case level (1 thread per case).
Removes argument
--label
/-l
, specifying an override label to use is now achieved through specifying-s "label:N"
, with N being the label value.Also includes a small update to initialization of the feature extractor:
kwargs
passed to the constructor are used to override settings.cc @Radiomics/developers