Code Monkey home page Code Monkey logo

radiomics's Introduction

Radiomics: Texture Analysis Matrices

** Not Currently Maintained **

This project is not currently being maintained. While I will do my best to help in a timely fashion, you should not expect a prompt response.

cran version Build Status rstudio mirror downloads

The radiomics package is a set of tools for computing texture matrices and features from images.

The release version of this package (April 2016, v0.1.2) is available from CRAN using:

install.packages("radiomics")

Or you can install the development version of the package using:

devtools::install_github("joelcarlson/radiomics")

library(radiomics)

Texture Matrices

In the package are functions for calculating four different types of matrices and associated feature sets used to quantify the texture of an image.

These matrices are the:

  • Grey Level Co-occurrence Matrix
  • Grey Level Run Length Matrix
  • Grey Level Size Zone Matrix
  • Multiple Grey Level Size Zone Matrix

Detailed usage directions for calculating features and matrices can be found in the package vignette (use browseVignettes(package = "radiomics"))

Using the Package

Building Texture Matrices

Texture matrices can be created from 2D images by using the abbreviated and lowercase matrix name as a function call:

tumor <- radiomics::tumor #2D MRI slice of a brain tumor
glcm(tumor)
glrlm(tumor)
glszm(tumor)
mglszm(tumor)

A matrix with the class of the texture matrix type is returned, as shown here using glcm(tumor, n_grey=4)

#> An object of class "glcm"
#>              1          2           3            4
#> 1 0.1617021277 0.03356974 0.001891253 0.0004728132
#> 2 0.0335697400 0.38345154 0.010638298 0.0014184397
#> 3 0.0018912530 0.01063830 0.301654846 0.0184397163
#> 4 0.0004728132 0.00141844 0.018439716 0.0203309693
class(glcm(tumor, n_grey=4))[1]
#> [1] "glcm"

Visualizing Texture Matrices

Each matrix type has an associated image function for visualization of the results:

image(glcm(tumor))
image(glrlm(tumor))
image(glszm(tumor))
image(mglszm(tumor))

The image functions make use of the viridis scale, as shown here using image(glcm(tumor, n_grey=64)):

Sample image

Calculating Features

Each matrix type has an associated calc_features function, which returns an object of class data.frame with a single observation for each calculated feature. First order features can also be calculated on 2D matrices.

calc_features(tumor)
calc_features(glcm(tumor))
calc_features(glrlm(tumor))
calc_features(glszm(tumor))
calc_features(mglszm(tumor))

radiomics's People

Contributors

joelcarlson avatar

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.