Code Monkey home page Code Monkey logo

radxtools / collageradiomics Goto Github PK

View Code? Open in Web Editor NEW
15.0 8.0 12.0 2.89 MB

Python Implementation of the CoLlAGe radiomics descriptor. CoLlAGe captures subtle anisotropic differences in disease pathologies by measuring entropy of co-occurrences of voxel-level gradient orientations on imaging computed within a local neighborhood.

License: BSD 3-Clause "New" or "Revised" License

Shell 0.08% Dockerfile 5.58% Jupyter Notebook 12.60% Python 76.47% Makefile 0.81% Batchfile 0.97% CMake 3.48%
radiomics radiomics-feature-extraction computational-imaging cancer-imaging-research cancer-imaging python docker feature-extraction radiomics-features 3d-slicer-extension

collageradiomics's People

Contributors

dependabot[bot] avatar jaasantinha avatar mohsenhariri avatar nathanhillyer avatar robtoth avatar sarthakpati avatar satishev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collageradiomics's Issues

Documentation Suggestion

I have a suggestion for the Linux/Mac installation. The documentation states:

Linux
Click here and follow the instructions to install Docker.

When you click on the link, it redirected me to Docker’s homepage. Is it supposed to redirect the user to Docker’s homepage or are there supposed to be step-by-step instructions?

Thanks!

Localhost not displaying Jupyter Examples

When running the Docker image, my localhost does not display the Jupyter examples. Click here to see a screenshot of my localhost page.

Version Information
macOS 10.15.5
Docker 2.3.0.3
localhost port: 8888
Git 2.24.3 (Apple Git-128)

Steps to re-create problem
`Toms-Work-MacBook-Pro:Collageradiomics Tom$ git clone https://github.com/ccipd/collageradiomics.git

Cloning into 'collageradiomics'...
remote: Enumerating objects: 165, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 496 (delta 88), reused 155 (delta 85), pack-reused 331
Receiving objects: 100% (496/496), 1.88 MiB | 1.39 MiB/s, done.
Resolving deltas: 100% (246/246), done.

Toms-Work-MacBook-Pro:Collageradiomics Tom$ cd collageradiomics/
Toms-Work-MacBook-Pro:collageradiomics Tom$ ls -l

total 96
-rw------- 1 Tom staff 1463 Jun 29 16:05 LICENSE
-rw------- 1 Tom staff 26476 Jun 29 16:05 README.md
drwx------ 3 Tom staff 4096 Jun 29 16:05 docker
drwx------ 3 Tom staff 4096 Jun 29 16:05 jupyter
drwx------ 2 Tom staff 4096 Jun 29 16:05 module
drwx------ 2 Tom staff 4096 Jun 29 16:05 sample_data

Toms-Work-MacBook-Pro:collageradiomics Tom$ docker pull ccipd/collageradiomics-examples:latest

latest: Pulling from ccipd/collageradiomics-examples
Digest: sha256:896e3daabb23f5813ad271374a8d302283141fbb18afd0a29903c83e1903aae3
Status: Image is up to date for ccipd/collageradiomics-examples:latest
docker.io/ccipd/collageradiomics-examples:latest

Toms-Work-MacBook-Pro:collageradiomics Tom$ docker run -it -p 8888:8888 -v /root ccipd/collageradiomics-examples

[I 20:06:06.315 NotebookApp] Writing notebook server cookie secret to /tmp/notebook_cookie_secret
[W 20:06:06.473 NotebookApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 20:06:06.477 NotebookApp] Serving notebooks from local directory: /root
[I 20:06:06.477 NotebookApp] The Jupyter Notebook is running at:
[I 20:06:06.477 NotebookApp] http://fc0e20af3a6c:8888/
[I 20:06:06.477 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).`

Improve Initial ReadTheDocs Documentation with More Granular and Detailed Documentation

This is in regards to enhancements for https://collageradiomics.readthedocs.io

  1. Should link to main github wiki readme page, to BrIC lab, and to their publication in overview.
  2. "Calculates the collageradiomics algorithm." in a lot of docs, I see things like "This is the main entry-point to the Collage calculation system. You will likely want check out the execute() function [internal hyperlink]."
  3. For the default values of 1/4*pi etc., in the docs we should say that the default values correspond to N/7*[Pi_symbol] for N=0...7 so people aren't confused about the decimals
  4. For execute() I think we should state a bit more about the output, and what it expects to have set before calling the function
  5. For from_multiple_images, I think we need to state explicitly the format of that numpy array
  6. "Within mask coordinates" - I think we should dumb it down even more - say that it creates a rectangle at the x,y,w,h and only calculates collage inside that mask.
  7. We should change the variable names to be consistent using "mask" instead of "patch"
  8. We should remove the "mt" (if that was leftover from calling it "mahotas")
  9. For collageradiomics.CollageCollection we should add more info on this at a high level
  10. For DifferenceVarianceInterpretation, the formatting is off of the webpage
  11. We should link to the haralick paper for DifferenceVarianceInterpretation and give more details as to the meaning. https://doi.org/10.1109/TSMC.1973.4309314
  12. For these internal methods like bbox1, do they belong on the public readme? should we somehow exclude them from an outward-facing set of docs?

Support 3D Images Natively

Instead of looping through the third dimension as slices, create the co-occurence matrix from the surrounding 3D voxels.

This will requires greycomatrix to be configured to process 3D images prior to passing the resulting matrix to the mahotas library for haralick calculations.

If the grey levels are 64, then the co-occurence matrix will still be 64x64, but will have pulled its data from surrounding voxels, not just surrounding pixels from the current slice.

Test Suite

Create unit tests or whatever python standard practice is for testing.

We should test it with invalid parameters being input, invalid datatypes, perhaps NaN's, etc.

Haralick feature list not working for multiple images.

/home/tothtech/code/collageradiomics-tothtech/module/collageradiomics.py in execute(self)
    829 
    830         haralick_feature_list = self.haralick_feature_list
--> 831         print(haralick_feature_list)
    832         if haralick_feature_list[0] == HaralickFeature.All:
    833             number_of_features = 13

IndexError: list index out of range

Also, doesn't appear to work for subsequent images after working past that error:

[<HaralickFeature.SumOfSquareVariance: 3>]
Calculating feature 4:
Calculated feature 4.
IMAGE:
width=440 height=596
Cropped Array Shape: (34, 33)
x = 208:251 (43)
y = 253:297 (44)
PaddedCropped Array Shape: (44, 43)
dx shape = (44, 43)
dominant angles shape = (34, 33)
svd radius = 5
svd diameter = 11
dx windows shape = (34, 33, 11, 11)
Center x: range(0, 33), Center y: range(0, 34)
x=8, y=0
angle=0.96076213752155
x=28, y=2
angle=1.0888919954206522
x=29, y=24
angle=0.702823824690135
Done calculating dominant angles.
0
[]

Clean up examples

0 - Rectangular
1 - Non-rectangular mask
2 - Non-rectangular mask, multiple slices

Separate docker images for jupyter examples versus raw core development

Related to Issue Toth-Technology/collageradiomics#12, we can have nested docker images.

The core one would be to play around with our core pip module and the outer docker(s) could have playing around with image input, and potentially even a separate one for jupyter examples/visualizations (e.g. using matplotlib).

collageradiomics requires calling import twice

System Info

  • Windows 10 64-bit
  • Python 3.8.2
  • Mahotas 1.4.10

System Info

Error

>>> import collageradiomics
Could not import submodules (exact error was: DLL load failed while importing _bbox: The specified module could not be found.).

There are many reasons for this error the most common one is that you have
either not built the packages or have built (using `python setup.py build`) or
installed them (using `python setup.py install`) and then proceeded to test
mahotas **without changing the current directory**.

Try installing and then changing to another directory before importing mahotas.
>>> import collageradiomics
>>>

Diagnosis

The problem seems to be with the Mahotas import, since calling import mahotas gives the same error (and has the same resolution).

The output of the dir command shows a limited install of Mahotas:

>>> dir(mahotas)
['', 'all', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec_', 'citation', 'citation_text', 'e', 'short_citation_text', 'stderr', 'sys']

The expected output is:

>>> dir(mahotas)
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_bbox', '_center_of_mass', '_convex', '_convolve', '_distance', '_filters', '_histogram', '_labeled', '_morph', 'as_rgb', 'bbox', 'border', 'borders', 'bwperim', 'cdilate', 'center_of_mass', 'cerode', 'citation', 'citation_text', 'close', 'close_holes', 'colors', 'convolve', 'convolve1d', 'croptobbox', 'cwatershed', 'daubechies', 'demos', 'dilate', 'disk', 'distance', 'dog', 'edge', 'erode', 'euler', 'features', 'find', 'fullhistogram', 'gaussian_filter', 'gaussian_filter1d', 'get_structuring_elem', 'haar', 'histogram', 'hitmiss', 'idaubechies', 'ihaar', 'imread', 'imresize', 'imsave', 'internal', 'io', 'label', 'labeled', 'labeled_sum', 'laplacian_2D', 'locmax', 'locmin', 'mahotas_version', 'majority_filter', 'mean_filter', 'median_filter', 'moments', 'morph', 'open', 'otsu', 'overlay', 'polygon', 'rank_filter', 'rc', 'regmax', 'regmin', 'resize', 'resize_to', 'segmentation', 'short_citation_text', 'sobel', 'stretch', 'stretch_rgb', 'template_match', 'test', 'tests', 'thin', 'thresholding', 'wavelet_center', 'wavelet_decenter']

The output of its version command also is failing:

>>> print(mahotas.mahotas_version._version_)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'mahotas' has no attribute 'mahotas_version'

The expected output is:

>>> print(mahotas.mahotas_version.__version__)
1.4.10

Overall, it seems that only a limited version of Mahotas, without its modules, was installed when pip install collageradiomics was called.

Potential Resolution

calling import again seems to resolve the issue.

>>> import collageradiomics; import collageradiomics

User documentation

During the testing of the software I found that the documentation for the syntax specifically the inputs, outputs, and function calls could be clarified in the Documentation section instead of being only in the examples. While I was able to manage using the included examples I believe that a separate section in usage could aid potential users in understanding what and how to use the function more clearly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.