Skip to content
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

How should I set /examples/exampleSettings/Params.yaml to use all filters? #367

Closed
guangzhaohui opened this issue Mar 28, 2018 · 27 comments
Labels

Comments

@guangzhaohui
Copy link

Hi everyone!
Since I am about to begin a radiomic study ex novo, I just wanted to extract images with all filters.
Now
How should I set /examples/exampleSettings/Params.yaml?

Settings to use, possible settings are listed in the documentation (section "Customizing the extraction").

setting:
binWidth: 25
label: 1
interpolator: 'sitkBSpline' # This is an enumerated value, here None is not allowed
resampledPixelSpacing: # This disables resampling, as it is interpreted as None, to enable it, specify spacing in x, y, z as [x, y , z]
weightingNorm: # If no value is specified, it is interpreted as None

Image types to use: "Original" for unfiltered image, for possible filters, see documentation.

imageType:
Original: {} # for dictionaries / mappings, None values are not allowed, '{}' is interpreted as an empty dictionary
LoG: {'sigma' : [1.0,2.0,3.0,4.0,5.0]}
Wavelet:
Square:
SquareRoot:
Logarithm:
Exponential:

Thank you very much in advance,
Guangzhaohui

@JoostJM
Copy link
Collaborator

JoostJM commented Mar 28, 2018

There is no way to specify "all filters", but the are all listed in the documentation and you can enable them all by specifying the in your parameter file as follows:

imageType:
  Original: {}  # no custom settings
  LoG: {sigma: (0.5, 1.0, 2.0)}  # custom settings defined in-line
  Wavelet: {}
  LBP3D:
    binWidth: 1.0  # Customized settings defined in tree-structure
  # (...) add the other filters here

The name (case-sensitive) of the filter is specified by the function name implementing that filter:
get<Filter>Image(), e.g. getLoGImage is enabled by specifying LoG. All filters are implemented here.

N.B. For local binary pattern there are separate implementations for 2D and 3D, so ensure you have the one that matches you extraction type.

@guangzhaohui
Copy link
Author

How kind are you! Could you add the other filters here:

@guangzhaohui
Copy link
Author

imageType:
Original: {} # no custom settings
LoG: {sigma: (0.5, 1.0, 2.0)} # custom settings defined in-line
Wavelet: {}
LBP3D:
binWidth: 1.0 # Customized settings defined in tree-structure
Square:
SquareRoot:
Logarithm:
Exponential:
Thank you very much!!!

@JoostJM
Copy link
Collaborator

JoostJM commented Apr 16, 2018

looks good, but mind the meaningfull white-space (i.e. your indentation). Also Don't forget the empty dictionary ({}), as otherwise the value is interpreted as None, which currently breaks the validation

imageType:
  Original: {} # no custom settings
  LoG: {sigma: (0.5, 1.0, 2.0)} # custom settings defined in-line
  Wavelet: {}
  LBP3D:
    binWidth: 1.0 # Customized settings defined in tree-structure
  Square: {}
  SquareRoot: {}
  Logarithm: {}
  Exponential: {}

@guangzhaohui
Copy link
Author

LoG: 、Wavelet: have examples.
How cloud i run :
LBP3D:
binWidth: 1.0 # Customized settings defined in tree-structure
Square: {}
SquareRoot: {}
Logarithm: {}
Exponential: {}
Could you give examples?
Thank you very much!!!

@JoostJM
Copy link
Collaborator

JoostJM commented Apr 18, 2018

@guangzhaohui, see the example above, or the examples in the repository (examples/exampleSettings)
Customized settings defined in the tree structure means that for that specific filter, those settings override the default or global defined settings. (The sigma setting in LoG is can also be set globally)

@guangzhaohui
Copy link
Author

guangzhaohui commented Apr 18, 2018

yeah,i have solved it! Thank you very much!!!
But, LBP3D: i can set it as above examples,it can not work.

AttributeError: module 'radiomics.imageoperations' has no attribute 'getLBP3DImage'

@guangzhaohui
Copy link
Author

But, LBP3D: i can set it as above examples,it can not work.

AttributeError: module 'radiomics.imageoperations' has no attribute 'getLBP3DImage'

How can i set it?
Thank you.

@JoostJM
Copy link
Collaborator

JoostJM commented Apr 30, 2018

Which version of PyRadiomics are you using?

If you look up your image operations module (from radiomics import imageoperations; print(imageoperations.__file__)), are you able to find the getLBP3DImage function?

@guangzhaohui
Copy link
Author

Sorry !I don't hnow Which version of PyRadiomics
I get this:
D:\PYTHON\Lib\site-packages\pyradiomics-master\pyradiomics-master\radiomics\imageoperations.py

@JoostJM
Copy link
Collaborator

JoostJM commented May 3, 2018

You can get the version by running (in cmd): pyradiomics --version

@guangzhaohui
Copy link
Author

Could you please give me an example for LBP3D?
I really cant do it for many times。
Thanks very much!

@guangzhaohui
Copy link
Author

guangzhaohui commented May 12, 2018

python version 3.5.4

@guangzhaohui
Copy link
Author

radiomics 0.1

@guangzhaohui
Copy link
Author

and How can i upgrade most newer pyradiomic?

@guangzhaohui
Copy link
Author

guangzhaohui commented May 13, 2018

qq 20180513094100

@JoostJM
Copy link
Collaborator

JoostJM commented May 14, 2018

Currently, PyRadiomics is not yet on pypi (#335), but has to be installed from source.
You can install using pip with the following command:"

pip install git+https://github.com/Radiomics/pyradiomics (it is possible that this requires git to be installed on your pc)

@guangzhaohui
Copy link
Author

guangzhaohui commented May 15, 2018

Thank you for your time!
I have install as above.
and get it below in D:\PYTHON\Scripts
but, i open jupyter notebook it remain older one, why?
image

@JoostJM
Copy link
Collaborator

JoostJM commented May 15, 2018

you mean that you have both pyradiomics.exe and pyradiomicsbatch.exe?
It is still the new one, pyradiomicsbatch is in there for backwards compatibility and will display a deprecation warning if used.

@guangzhaohui
Copy link
Author

yes it both in D:\PYTHON\Scripts

@guangzhaohui
Copy link
Author

guangzhaohui commented May 15, 2018

usage : pyradiomics image:batch [mask] [Options]
pyradiomics: error:the followingarguments are required:< Image.Batch>FILE

@JoostJM
Copy link
Collaborator

JoostJM commented May 15, 2018

@guangzhaohui that's the new one yes

@JoostJM
Copy link
Collaborator

JoostJM commented May 15, 2018

run pyradiomics -h to get the help message detailing the usage.

@guangzhaohui
Copy link
Author

oh,let me try.
thank you very much!

@guangzhaohui
Copy link
Author

How can i run pyradiomics.exe by jupyter notebook?

@guangzhaohui
Copy link
Author

i open jupyter notebook it was the older one

@JoostJM
Copy link
Collaborator

JoostJM commented May 16, 2018

See this section in the documentation on interactive usage

@JoostJM JoostJM closed this as completed Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants