-
Notifications
You must be signed in to change notification settings - Fork 505
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
Separation of functionality in pyradiomics and pyradiomicsbatch command line tools #203
Comments
@fedorov, I made 2 scripts at first because they represent two types of pyradiomics usage, with the difference mainly being in how the input and output is provided. I think it shouldn't be much of a problem to create 1 script. Main issue would be how to handle the fact that in |
We could just have different command line flags, but perhaps you want to simplify by allowing usage when no options are needed. Alternatively, we could make the script automatically detect whether the input is a directory or file. I don't have strong preference, just wanted to discuss this. |
@fedorov, currently input files are positional arguments, without output file optional (and parameterized) in |
As discussed at the meeting, this is postponed for further discussion and for another release. |
Todo for myself - rebase after v1.1.0 is out |
Could you please provide an example input file for the pyradiomicsbatch command? The formatting for the batch file is confusing. It makes sense that you need to provide a path to the image and mask along with a patientID to identify the separate files. However I don't understand what you are supposed to put for sequence name (image identifier) and 3) reader (segmentation identifier). "The input file for batch processing is a CSV file where each row represents one combination of an image and a segmentation and contains 5 elements: 1) patient ID, 2) sequence name (image identifier), 3) reader (segmentation identifier), 4) path/to/image, 5) path/to/mask." |
@alannavial, This is due to the fact that a patient ID alone is not enough. A patient can have more sequences (images, e.g. multiparametric MRI, multiple phase CT) and each image can have multiple segmentations (different structures, different readers). To ensure each extraction has a unique identifier, it is comprised of patient-sequence-segmentation. These are the first three elements of each line and are not 'active' fields, they are just copied to the output. Only element 4 and 5 (image and label location) are used for the extraction. If you don't have separate readers or sequences, you can fill in anything you want (I usually use "N/A" in these cases). However, the code expects 5 elements, so for the moment, ensure that you don't omit the sequence and reader. I will update the batch processing to be more flexible (i.e. copy every line, and use the last two fields as image and mask location). This will be part of a new release. |
Hi @JoostJM, thank you for clearing that up. My main confusion was, what you meant by the terms reader and sequences. I think it would be best to provide examples of what would go in these fields to make it clearer. As it is, I'm still unsure by what would go in the reader (segmentation identifier) field. Also as an additional question, have you looked into adapting your toolbox to read DICOM-RT file formats? Most institutions seem to be using DICOM-RT more commonly now. |
@alannavial, simplest example for reader: the filename of the mask. As to your additional question, we are currently looking into this, but have no support currently. It is possible to build an extension for 3D slicer which enables use of pyradiomics via the slicer interface. This could potentially be combined with other slicer modules which can read DICOM-RT. This is not tested yet however. |
@fedorov As previously discussed, I'm going to take a second look at the commandline scripts with the goal of having 1 entry point with different subcommands (like the git commandline tools).
|
Few ideas to consider/discuss:
|
The main issue I see here is that
Also in voxel-based extraction, a labelmap is required (for now, later we can make it optional). This has a 2-fold reason: 1) especially in large images, you don't want to perform a voxelbased extraction on the whole image, this is much too computationally intensive and 2) in voxel-based extraction, it is possible to mask the kernel with the ROI, ensuring the features are still only calculated on the ROI intensities.
+1 |
Alternatively, I think I can tweak it around a bit to have similar commandlines for In that case we can also use the |
Indeed, I didn't think about those points you raised. I agree with your points. I suggest we should not optimize the command line parameters to deal with the limitations of Slicer CLI. The main goal should be to simplify the process for the users. Maybe it is indeed better to have separate command line tools and not overload one making it too complicated to understand. Good discussion topic for the tomorrow call. |
Fixed by #347 |
@Radiomics/developers: is there a good reason to have these two as opposed of having a single pyradiomics command line tool that would support operation for both single input and directory?
Among other things, having a single processing script might help make things more straightforward with Docker deployment.
The text was updated successfully, but these errors were encountered: