AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.16k stars 499 forks source link

which feature is the area of marked region #493

Closed cpuxzb closed 5 years ago

cpuxzb commented 5 years ago

I used the default setting as you set. (1)I want to know which feature is to caculate the area of the marked region?the getMeshSurfaceFeatureValue() for Mesh Surface in Shape Features (2D)? (2)In "radiomics_features.csv" file,is the "original_shape_SurfaceArea" column show the area of marked region?or the another one. I am very grateful if I get your answer.

JoostJM commented 5 years ago

@cpuxzb What is your input data? Is it 2D or 3D?

Ad 1) They are the same, getMeshSurfaceFeatureValue() is the python function that is called to calculate MeshSurface feature (as you can see in the documentation). Ad 2) This is the 3D surface area and therefore different from MeshSurface (implemented in shape2D)

cpuxzb commented 5 years ago

@JoostJM Thank's for your reminding,I used the 3D input data. And,I want to know what the "they are the same" mean.In "Shape Features (3D)",I find "getSurfaceAreaFeatureValue()".In "Shape Features (2D)",I find "getMeshSurfaceFeatureValue()".The "same" mean this two functions? If I i use 2D input data,I wil get the similar column as "original_shape_SurfaceArea" for 2Dsurface area.

cpuxzb commented 5 years ago

Dear professor: Thank's for your reminding,I used the 3D input data.And,I want to know what the "they are the same" mean.In "Shape Features (3D)",I find "getSurfaceAreaFeatureValue()".In "Shape Features (2D)",I find "getMeshSurfaceFeatureValue()".The "same" mean this two functions? But,I use 2D input data,I still just find the column "original_shape_SurfaceArea" .The annexs are the image and correspond label file and the result I got. I look forward to your reply. Thank you very much.

------------------ 原始邮件 ------------------ 发件人: "Joost van Griethuysen"notifications@github.com; 发送时间: 2019年6月12日(星期三) 下午5:23 收件人: "Radiomics/pyradiomics"pyradiomics@noreply.github.com; 抄送: "徐正保"2352830471@qq.com;"Mention"mention@noreply.github.com; 主题: Re: [Radiomics/pyradiomics] which feature is the area of markedregion (#493)

@cpuxzb What is your input data? Is it 2D or 3D?

Ad 1) They are the same, getMeshSurfaceFeatureValue() is the python function that is called to calculate MeshSurface feature (as you can see in the documentation). Ad 2) This is the 3D surface area and therefore different from MeshSurface (implemented in shape2D)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

JoostJM commented 5 years ago

@cpuxzb

The functions between shape 2D and 3D are not the same, but are in way related: shape tries to describe the mask as a 3D volume, and features reflect the volume, the surface area spanning that volume ( like a sphere ) and how the volume relates to a sphere

shape2D tries to decribe the mask as a 2D surface, and features reflect the surface area and the perimeter spanning that surface ( like a circle ) and how the surface relates to a circle.

Therefore, surface area in shape2D is not the same as surface area in shape 3D!

cpuxzb commented 5 years ago

@JoostJM Thank you for your reply to solve my doubt.I have realize the difference. I use 2D input data,I still just find the column "original_shape_SurfaceArea".I have not find the reason.

JoostJM commented 5 years ago

@cpuxzb, if you want shape2D features, you need to enable that feature class and disable the shape feature class. Moreover, you need to set parameter force2D=True and for2Ddimension to the (x, y or z = 0, 1 or 2) dimension that has size=1. This is because the input data is 3D, so PyRadiomics needs to know in which dimension it can be treated as 2D.

cpuxzb commented 5 years ago

@JoostJM Thank you for your reply.You have solved my question.I will try later.

cpuxzb commented 5 years ago

Dear Professor: I am very sorry to bother you again.I still have some problems about the setting of shape2D features. I have set parameter force2D=True and for2Ddimension to the (x, y or z = 0, 1 or 2) dimension that has size=1.You can see the setting in the annex.But I get a ScannerError which show in the annex. It seems that I do the wrong setting and have no idea to solve it.Could you give me more answers? I am looking forward to your reply! With my best wishes! cpuxzb

------------------ 原始邮件 ------------------ 发件人: "Joost van Griethuysen"notifications@github.com; 发送时间: 2019年6月13日(星期四) 下午2:15 收件人: "Radiomics/pyradiomics"pyradiomics@noreply.github.com; 抄送: "徐正保"2352830471@qq.com;"Mention"mention@noreply.github.com; 主题: Re: [Radiomics/pyradiomics] which feature is the area of markedregion (#493)

@cpuxzb, if you want shape2D features, you need to enable that feature class and disable the shape feature class. Moreover, you need to set parameter force2D=True and for2Ddimension to the (x, y or z = 0, 1 or 2) dimension that has size=1. This is because the input data is 3D, so PyRadiomics needs to know in which dimension it can be treated as 2D.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

JoostJM commented 5 years ago

@cpuxzb, I don't see any attachments, sorry. Can you upload them directly on github?

cpuxzb commented 5 years ago

@JoostJM I am very sorry to forget the attachment. The setting anderror screenshoot are showed at the following website. https://github.com/cpuxzb/PyRadiomicsQuestion

JoostJM commented 5 years ago

You have added the settings as keys in the featureclass. However, this will not work, as the value of a feature class can only be a sequence describing which features to extract.

Try this (for 2D shape features):

featureClass:
  shape2D:  # Notice the 2D specifying the 2D version of the shape features to use
  firstorder:
  glcm:  # Disable SumAverage by specifying all other GLCM features available
    - 'Autocorrelation'
    - 'JointAverage'
    - 'ClusterProminence'
    - 'ClusterShade'
    - 'ClusterTendency'
    - 'Contrast'
    - 'Correlation'
    - 'DifferenceAverage'
    - 'DifferenceEntropy'
    - 'DifferenceVariance'
    - 'JointEnergy'
    - 'JointEntropy'
    - 'Imc1'
    - 'Imc2'
    - 'Idm'
    - 'Idmn'
    - 'Id'
    - 'Idn'
    - 'InverseVariance'
    - 'MaximumProbability'
    - 'SumEntropy'
    - 'SumSquares'
  glrlm:
  glszm:
  gldm:

setting:
  force2D: true
  force2Ddimension: 0

  normalize: true
  normalizeScale: 100

  interpolator: 'sitkBSpline'
  resampledPixelSpacing: [2, 2, 2]

  binWidth: 5
  voxelArrayShift: 300
  label: 1
cpuxzb commented 5 years ago

Thank you for your reply to solve the rookie's problem .