Giter Site home page Giter Site logo

lesion_measurements's Introduction

Lesion Measurment Shiny App

To run this app locally, simply add both the ui.R and server.R to the same directory, load the shiny library, the use the command runApp(). The app can also be accessed on https://jhubiostatistics.shinyapps.io/lesion_measurements/.

The purpose of this Shiny application is to aid researchers in determining the percentage of an image, or subimage, that is taken up by a particular feature. The example that inspired the creation of this app is to find the percentage of a paw taken up by a lesion. This problem is complicated by the fact that images may not be consistent from sample to sample, so one must take into account how much of the image is taken up by background. For example, if one calculates the percentage of the full image taken up by a lesion, rather than the percentage of the paw taken up by a lesion, simply zooming out will artificially reduce the percentage of the image taken up by a lesion.

The current version of the app relies on the user to crop out the background and to identify the feature of interest. In the future, fully automatic methods will be implemented that will be able to do these steps for high-quality images.

To begin, upload an image of interest. The app will automatically assign the image's name as its filename (without an extension), but this can be changed by the user. Even if you do not want to crop out the background, you still must press "Crop Background". To crop out the background, simply press "Trace paw" and begin clicking around the perimeter of the paw. If you wish to zoom in on a region, press "Pause tracing", click and drag the mouse to create a box that you would like to zoom in on, and then double click on the box. To continue tracing, you must press "Trace paw" again, and you can zoom out by again pausing the tracing and then double clicking anywhere on the image. Do not attempt to zoom in on an image while in tracing mode. As you trace around the paw, the area inside of the red lines will show you which part of the image would be included in your tracing. You can reset the tracing any time by clicking "Reset tracing". Once you are satisfied with your background cropping, click "Crop Background".

After you have cropped out the background of image, switch to the "Calculate Tumor Size" tab. The same steps as above can be taken to find the lesions, or other features of interest, except with a few additions. First, there may be multiple, non-connecting lesions. To deal with this, once you have traced one lesion, press "Finishing Tracing Tumor", and then click on "Trace Tumor" to begin tracing another lesion. If you want to reset the current tracing of a single lesion, simply press "Resent Current Tumor Tracing." If you want to reset all lesion tracings, press "Reset All Tumor Tracings." The percentage of a paw taken up by lesions can be updated at any time by pressing "Calculate Lesion Percentage". You must press "Finishing Tracing Tumor" after tracing the most recent lesion to have that lesion be included in the calculation.

If you are satisfied with your background cropping and tumor tracing for a given image, press "Calculate Lesion Percentage" to ensure all lesions have been incorporated into the calculations, and then press "Add Image to Data". DO NOT change the image name of the current image after adding it to the dataset. The image name and the percentage of the non-background image taken up by a lesion will be added to a dataset, which can be viewed in the "View Dataset" panel. Each image must have a unique name, or else information about previous images with the same name as the current image will be overwritten. This is to allow users to update information about a given image without creating multiple rows for one image in the dataset. This process can then be repeated by uploading the next image for analysis.

Once you have finished analyzing all images, press "Download Dataset" in the "Remove Background" panel to download a .csv file which contains all the data.

lesion_measurements's People

Contributors

jfiksel avatar

Stargazers

João Cascalheira avatar Félix de Carpentier avatar mc avatar

Watchers

James Cloos avatar

Forkers

jmcascalheira

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.