-
Notifications
You must be signed in to change notification settings - Fork 492
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
Stabilize dynamic binning for Wavelet transform output #49
Comments
A possible solution could be to apply Thinking about it now though, this function does not address yet when the minimum changes. |
I wonder if we really need to maintain the bin count constant. Does it really make sense after an operation like wavelet? |
I think its OK to not scale the wavelet-filtered grayscale ranges to the original image (assuming first order stats of a decomposition are comparable across images of a dataset). Rather, compute bincount ("Ng") of the original image similar to in glcm.init: Then, determine the binwidth that produces the above bincount (for each decomposition) and pass that binwidth to the glcm, glrlm, glszm (again, for each decomposition). I think this best maps the original image bins to their corresponding "wavelet-transformed" bins, without rescaling/compressing data imputed from the transform. |
long time no see @vnarayan13 ! thanks for the comment |
Also, I think the loop here to retrieve data = LLL.copy() is redundant since it occurs in the main dec loop: Also, "data" should be renamed to "approximation_data" and maybe should just be included in the "dec" dict since it is treated the same as the other decompositions? Returning "approximation, ret" was just to mimic the return structure of the 2D function in pywavelets. |
Currently, it is already possible to set custom |
This first loop is to get data to the correct level specified by start_level. Therefore this loop is not redundant. However, I expect it to be rarely used, as the first level wavelets are also usually considered. |
@Radiomics/developers Following up on @vnarayan13's idea, is it a solution to use a fixed bincount on all filtered images, which is set by applying the fixed binWidth on the original image? So in general, I think we have the following options:
I suggest we decide on a single way to handle this, or at the very least only supply a very limited number of options. |
This might be a case where the results of an analytics/ml pipeline on labelled training data using the above options might determine which one elicits a stronger signal and should be the default opt. |
Is there a plan to include dynamic binning as a function in future versions? |
Add the possibility to enable dynamic binning, which scales the bin width by the ratio between the range of intensities seen in the derived and original images (only including intensities in the ROI). This is only done if dynamic binning is enabled (new parameter `dynamicBinning`, boolean, default false) and no custom bin width has been defined for that filter. This also has no effect if a fixed bin count is used. Addresses issue AIM-Harvard#49.
Add the possibility to enable dynamic binning, which scales the bin width by the ratio between the range of intensities seen in the derived and original images (only including intensities in the ROI). This is only done if dynamic binning is enabled (new parameter `dynamicBinning`, boolean, default false) and no custom bin width has been defined for that filter. This also has no effect if a fixed bin count is used. Addresses issue AIM-Harvard#49.
Add the possibility to enable dynamic binning, which scales the bin width by the ratio between the range of intensities seen in the derived and original images (only including intensities in the ROI). This is only done if dynamic binning is enabled (new parameter `dynamicBinning`, boolean, default false) and no custom bin width has been defined for that filter. This also has no effect if a fixed bin count is used. Addresses issue AIM-Harvard#49.
I’m trying to extract voxel-wise features from the original MR image and its wavelet transforms, but I’m struggling with enabling the “dynamicBinning”. In my .yaml-file I have tried the following: imageType: voxelArrayShift: 300 voxelSetting: (am I supposed to provide the "binWidth" parameter for the original image, like I have done here?) However, this gives me the following error code: --- All found errors ---
Did I make a mistake in the parameter-file? I’m using version 2.1.2.post61+g3efae04. |
@sha168, No your parameter file looks fine. The cause of the error is the PyRadiomics version. You are using the current master, but this does not have the dynamic binning functionality implemented. If you want to use this, you'll need to checkout the branch |
Ok, thanks for the quick reply! Is the bug addressed in this issue https://github.com/Radiomics/pyradiomics/issues/456 fixed in this branch? |
Add the possibility to enable dynamic binning, which scales the bin width by the ratio between the range of intensities seen in the derived and original images (only including intensities in the ROI). This is only done if dynamic binning is enabled (new parameter `dynamicBinning`, boolean, default false) and no custom bin width has been defined for that filter. This also has no effect if a fixed bin count is used. Addresses issue AIM-Harvard#49.
Recompute bin edges and binwidth to maintain consistent bin count for all normalized stationary wavelet transform outputs.
The text was updated successfully, but these errors were encountered: