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
Using pyradiomics for shape feature extraction? #349
Comments
pyradiomics will only operate on image+voxel label. You can discretize your surface mesh and use the result both as a label and as the input image. Would this be an option for you? |
Yes, how would I go about doing that?
…On Wed, Feb 28, 2018 at 5:25 PM, Andrey Fedorov ***@***.***> wrote:
pyradiomics will only operate on image+voxel label. You can discretize
your surface mesh and use the result both as a label and as the input
image. Would this be an option for you?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ac6hLfI4bczms4hw0uUsWloIyt77tBu1ks5tZdJHgaJpZM4SXXok>
.
--
Sincerely,
Steven A. Lewis
|
You can use 3D Slicer to import the mesh (is it a volumetric or surface mesh?) as a "segment", and then convert segment into labelmap representation. It may actually be even simpler - you can install Radiomics extension in Slicer, and then it can take the Segment directly as the definition of the label. You still would need to have some image as input, but it can be any image as long as it overlaps with the surface, since you are only interested in the shape features. |
I'm not using slicer for any of this. I'm trying to perform the scripting
with python as I have well over 1000 meshes.
…On Wed, Feb 28, 2018 at 5:34 PM, Andrey Fedorov ***@***.***> wrote:
You can use 3D Slicer <http://slicer.org> to import the mesh (is it a
volumetric or surface mesh?) as a "segment", and then convert segment into
labelmap representation.
It may actually be even simpler - you can install Radiomics extension in
Slicer, and then it can take the Segment directly as the definition of the
label. You still would need to have some image as input, but it can be any
image as long as it overlaps with the surface, since you are only
interested in the shape features.
[image: image]
<https://user-images.githubusercontent.com/313942/36816963-81e77752-1cad-11e8-99d3-b84b68bc8167.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ac6hLSjKlVD1xqEcNxFrfoBnRpdO6SEWks5tZdSGgaJpZM4SXXok>
.
--
Sincerely,
Steven A. Lewis
|
Is there a python function, or package I can use?
…On Wed, Feb 28, 2018 at 5:36 PM, Steven Lewis ***@***.***> wrote:
I'm not using slicer for any of this. I'm trying to perform the scripting
with python as I have well over 1000 meshes.
On Wed, Feb 28, 2018 at 5:34 PM, Andrey Fedorov ***@***.***>
wrote:
> You can use 3D Slicer <http://slicer.org> to import the mesh (is it a
> volumetric or surface mesh?) as a "segment", and then convert segment into
> labelmap representation.
>
> It may actually be even simpler - you can install Radiomics extension in
> Slicer, and then it can take the Segment directly as the definition of the
> label. You still would need to have some image as input, but it can be any
> image as long as it overlaps with the surface, since you are only
> interested in the shape features.
>
> [image: image]
> <https://user-images.githubusercontent.com/313942/36816963-81e77752-1cad-11e8-99d3-b84b68bc8167.png>
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#349 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/Ac6hLSjKlVD1xqEcNxFrfoBnRpdO6SEWks5tZdSGgaJpZM4SXXok>
> .
>
--
Sincerely,
Steven A. Lewis
--
Sincerely,
Steven A. Lewis
|
I am sure there are other packages, but I would script using Slicer functionality. I can't recommend any specific other package. If you want to use Slicer for this conversion, you can look into this function that does conversion for a segment into labelmap representation: https://github.com/Radiomics/SlicerRadiomics/blob/master/SlicerRadiomics/SlicerRadiomics.py#L509. You can write a python script to be invoked via Few more resources:
Let us know about your progress |
The problem is, I am bran new to python programming, so I am not sure how
to utilize the slicer script without importing each individual mesh into
slicer and running the module. Is there a way to use this script outside of
slicer?
…On Wed, Feb 28, 2018 at 5:46 PM, Andrey Fedorov ***@***.***> wrote:
I am sure there are other packages, but I would script using Slicer
functionality. I can't recommend any specific other package.
If you want to use Slicer for this conversion, you can look into this
function that does conversion for a segment into labelmap representation:
https://github.com/Radiomics/SlicerRadiomics/blob/master/SlicerRadiomics/
SlicerRadiomics.py#L509. You can write a python script to be invoked via Slicer
--python-script, and it will have access to all of the Slicer logic.
Few more resources:
- FAQ on Slicer python scripting: https://www.slicer.org/wiki/
Documentation/Nightly/Developers/Python_scripting
<https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting>
- You can also use Slicer forum as a resource for help:
https://discourse.slicer.org
Let us know about your progress
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ac6hLTE2GT--i0UXepttQlfmnNWndhd9ks5tZddBgaJpZM4SXXok>
.
--
Sincerely,
Steven A. Lewis
|
Yes, you can script import, conversion and export, but there is a learning curve, definitely. How about you start looking over the resources I mentioned above, and also this one: https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#Where_can_I_find_example_scripts.3F (referenced from the python scripting FAQ), and see how that goes? If I were you, I would also just do the conversion and run pyradiomics for a couple of cases using Slicer GUI, just to get a sense if you get what you expect, before investing the effort into scripting and conversion of 1000 meshes. |
@stevenagl12 I'll second Andrey's suggestion: if you are new to python programming you will be much better off starting with the GUI to implement the end-to-end analysis on a few cases. Once you can write down the exact steps that give you useful data it will be (mostly) trivial to write a script to implement it for your 1000 cases. Plus Slicer's user interface will provide a convenient way to do visual debugging and quality assurance as you develop your script. |
I have a bunch of meshes that I would like to extract all of the shape features through pyradiomics from. I do not have image data however. I am wonder how to use the shape.py to extract features from these meshes.
The text was updated successfully, but these errors were encountered: