Code Monkey home page Code Monkey logo

span_rtmri_timepoints_annotator_app's Introduction

Real-time MRI Timepoints Annotator

This repository contains the code for a MATLAB application for annotating time-points in real-time MRI videos.

Contributors

Tanner Sorensen
Signal Analysis and Interpretation Laboratory
University of Southern California

Installation

Open MATLAB with the desktop GUI. Double click on the file "rtMRI_Timepoints_Annotator.mlappinstall".

screenshot01

Click "Install" in the dialogue box.

screenshot02

The application will appear in the "APPS" tab.

screenshot03

Click on the tab. You will find the application "rtMRI_Timepoints_Annotator" in the dropdown menu.

screenshot04

Usage

Click on the "APPS" tab. Open the application "rtMRI_Timepoints_Annotator" in the dropdown menu.

Click on the button "choose directory". Open the directory containing the avi files (see Section "Generating audio-video files for analysis" below).

usage01

A list of avi files in the directory appears. Click on the file you want to analyze.

usage02

Use the top slider and "current frame" up/down arrows to navigate to the video frame at the start of the time-interval you are interested in. Click "onset" to set the start of the time-interval. navigate to the video frame at the end of the time-interval you are interested in. Click "offset" to set the end of the time-interval.

usage03

Click on the "Examine Selection" tab and then the "play" button to review the video and audio from the selected time-interval.

usage04

Return to the "Timepoint Annotation" tab. If the selection must be revised, reselect onset and offset time-points. Otherwise, click "add to table" in order to add the time-interval to the table. Label the time-interval by clicking in the cell beneath the column "Label" in the table.

usage05

Click "export table" to write the table to csv file.

usage06

Generating audio-video files for analysis

The application will open real-time MRI videos without interleaved audio, but to fully utilize the application, avi files should have both audio and video streams.

Navigate to the directory containing folders avi and wav that have video and audio files, respectively.

tsorense@tsorense-Precision-WorkStation-T3500:~/Downloads/eh$ ls *
avi:
lac01282018_18_47_25.avi  lac01282018_18_52_37.avi  lac01282018_18_56_27.avi  lac01282018_18_59_45.avi  lac01282018_19_04_20.avi  lac01282018_19_08_57.avi  lac01282018_19_13_49.avi
lac01282018_18_48_58.avi  lac01282018_18_54_00.avi  lac01282018_18_57_39.avi  lac01282018_19_00_53.avi  lac01282018_19_05_46.avi  lac01282018_19_10_48.avi  lac01282018_19_14_49.avi
lac01282018_18_51_14.avi  lac01282018_18_55_08.avi  lac01282018_18_58_46.avi  lac01282018_19_02_16.avi  lac01282018_19_07_16.avi  lac01282018_19_12_09.avi

wav:
lac01282018_18_47_25.wav  lac01282018_18_52_37.wav  lac01282018_18_56_27.wav  lac01282018_18_59_45.wav  lac01282018_19_04_20.wav  lac01282018_19_08_57.wav  lac01282018_19_13_49.wav
lac01282018_18_48_58.wav  lac01282018_18_54_00.wav  lac01282018_18_57_39.wav  lac01282018_19_00_53.wav  lac01282018_19_05_46.wav  lac01282018_19_10_48.wav  lac01282018_19_14_49.wav
lac01282018_18_51_14.wav  lac01282018_18_55_08.wav  lac01282018_18_58_46.wav  lac01282018_19_02_16.wav  lac01282018_19_07_16.wav  lac01282018_19_12_09.wav

Combine the audio and video files using the following commands.

tsorense@tsorense-Precision-WorkStation-T3500:~/Downloads/eh$ mkdir avi_withaudio; for i in $(ls avi); do ffmpeg -i "avi/$i" -i "wav/${i/.avi/.wav}" -c copy "avi_withaudio/$i"; done

This produces a directory avi_withaudio, containing the avi files with both audio and video streams.

tsorense@tsorense-Precision-WorkStation-T3500:~/Downloads/eh$ ls avi_withaudio/
lac01282018_18_47_25.avi  lac01282018_18_52_37.avi  lac01282018_18_56_27.avi  lac01282018_18_59_45.avi  lac01282018_19_04_20.avi  lac01282018_19_08_57.avi  lac01282018_19_13_49.avi
lac01282018_18_48_58.avi  lac01282018_18_54_00.avi  lac01282018_18_57_39.avi  lac01282018_19_00_53.avi  lac01282018_19_05_46.avi  lac01282018_19_10_48.avi  lac01282018_19_14_49.avi
lac01282018_18_51_14.avi  lac01282018_18_55_08.avi  lac01282018_18_58_46.avi  lac01282018_19_02_16.avi  lac01282018_19_07_16.avi  lac01282018_19_12_09.avi

Troubleshooting

If you are using a version of MATLAB older than 2018a, a dialogue box may appear indicating that the application was built on a newer version of MATLAB. Malfunction of the application may in this case might be resolved by upgrading MATLAB to the latest version.

Low-level graphics errors can occur. MATLAB has a page of documentation for solving these issues (link). If the graphics card is old, one solution is to switch to rendering with Software OpenGL.

span_rtmri_timepoints_annotator_app's People

Contributors

tannersorensen avatar

Watchers

Dogan Can avatar James Cloos avatar Krishna Somandepalli avatar  avatar

Forkers

tianchi03

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.