4.0

4.0 | 2 ratings Rate this file 343 downloads (last 30 days) File Size: 18.26 KB File ID: #22052

ROI Draw

by Christopher Changchien

 

10 Nov 2008 (Updated 04 Dec 2008)

ROI Draw allows you to draw rectangular ROI's at any angle.

Download Now | Watch this File

File Information
Description

Most ROI Drawing Tools limit you to either drawing a circular ROI or a rectangular ROI perpendicular to the X-Y axis. ROI Draw's primary purpose is to expand upon the drawing of rectangular ROI's by allowing you to draw them at any angle.  
 
After selection of an ROI, ROI Draw crops and rotates your ROI into the X-Y plane using a bicubic interpolation algorithm (chosen in order to preserve textural properties) so that spatial statistics may be analyzed.  
 
ROI Draw outputs a .MAT file which, in addition to storing your rotated ROI, stores the original image and a mask file (for calculating pixel statistics), and the coordinates of the corners of your ROI so that they can be used to colocalize an ROI on another image.  
 
ROI Draw at this point only works for DICOM images as its primary purpose is for application in medical research.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Zip File Content  
Other Files ROIDraw.m,
ROIDraw.fig
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
01 Dec 2008 Cris Luengo I tried modifying it so it would work with other image file types, but ran into all sorts of problems because the code is so fragmented and duplicated. This is probably Guide's fault, and not the author's fault. But still, it's easier to write my own than trying to modify this one. I didn't understand how the interpolation rate is chosen. 
 
Also, why do you say bilinear interpolation preserves texture properties? I think you would be much better of with cubic interpolation than with linear interpolation.
04 Dec 2008 Christopher Changchien If you take a look at the updates I changed it to bicubic interp.
Please login to add a comment or rating.
Updates
18 Nov 2008 - Fixed bug of unsaved contrast/zoom settings when shifting ROI's. - Now remembers which directory you are currently using so you don't have to re-navigate through the directory tree.
19 Nov 2008 eliminated double-for loop to make interpolation step more efficient (there should be little to no waiting time now). saved roi's as doubles for image processing. interpolation is done using bicubic instead of bilinear interp.
25 Nov 2008 added ability to control sample rate of ROI's so that the ROI's generated can have mm/pixel dimensions independent of the original image. added a help section. fixed a bug where user can draw a parallelogram on accident.
25 Nov 2008 forgot to fix a misplaced quote.
04 Dec 2008 none. just updating the description

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com