-
Notifications
You must be signed in to change notification settings - Fork 11
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
Error during implementation #95
Comments
@pavi1303 That method isn't intended to be used publicly. We will push out an update that prefixes the method with an underscore for clarity. What are you trying to accomplish? If you just want to calculate the haralick textures, I'd suggest using the mahotas library: https://github.com/luispedro/mahotas |
He’s trying to calculate COLLAGE feature for his image/ROI. @pavi1303 never checked — are you able to run the Jupyter notebook? The syntax should be in there (sample code to extract features from an image). |
Here is a link to that notebook: https://github.com/radxtools/collageradiomics/blob/master/jupyter/examples/example.ipynb In order to calculate the COLLAGE feature for the image, you can do this:
We'll be able to detect whether or not it is 3D internally, so no need to set that. |
I did check the sample jupyter notebook but did not implement it as a jupyter notebook, I did it in PyCharm. I'll check that out. Thanks. |
You're welcome. If you experience any further difficulties, please reopen this ticket. We're happy to help. |
Hi,
I am running this in the Pycharm IDE. I created a collage object and then initialized an empty haralick image to then extract features from both angles using the calculate_haralick_textures function. But I'm not getting an ''Object has no attribute error" when initialising an empty variable. Then I had to proceed to get the statistics measure like mean, variance, skewness and kurtosis from these features. My image and mask files were in .mat (MATLAB) format and thus I imported them using the scipy.io library. Here is my code snippet,
import collageradiomics as crd
import numpy as np
Creating a collage object
collage = crd.Collage(vol_full, TI_mask)
collage.is_3D = True
Creating a haralick image variable
haralick_image = np.empty(collage.dominant_angles.shape + (13,))
Calculating features from both orientations
for angle in range(2):
haralick_image[:, :, :, angle, :] = collage.calculate_haralick_textures(collage.dominant_angles[:, :, :, angle])
It is showing me this error,
AttributeError: 'Collage' object has no attribute 'dominant_angles'
Where am I going wrong here? Any help would be highly appreciated.
The text was updated successfully, but these errors were encountered: