Code covered by the BSD License  

Highlights from
imslice

5.0

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 3.35 KB File ID: #11845
image thumbnail

imslice

by Francois Bouffard

 

01 Aug 2006 (Updated 01 Nov 2006)

Selects and plots a cdata slice

| Watch this File

File Information
Description

This function can be applied on any figure containing a graphical object having a 'cdata' property.

When the mouse is clicked on the object, a vertical (left button) or horizontal (right button) line marker appears over the object, and a new figure is opened, containing a plot of the selected slice. Closing this figure removes the marker.

Usage example:
>> figure; imagesc(randn(100));
>> colormap hot; imslice;

MATLAB release MATLAB 7.3 (R2006b)
Other requirements Tested using R14 (7.1) through 2006b (7.3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
27 Jun 2011 Alexander

Very nice! At line 202 I replaced
plot(a,C );
with
plot(a,C,'DisplayName', sprintf('Slice %d @ value %0.2f',idx,v(idx)) );
That gives a usefull legend if "hold all" is used for the preview figure.

Please login to add a comment or rating.
Updates
01 Nov 2006

Fixed problem with slice markers not disappearing if user clicked too fast. General code cleanup. Clearer information in the slice figure. Previous/next slice feature using left/right click or arrow keypress in slice figure.

Tag Activity for this File
Tag Applied By Date/Time
data exploration Francois Bouffard 22 Oct 2008 08:34:12
image Francois Bouffard 22 Oct 2008 08:34:12
slice Francois Bouffard 22 Oct 2008 08:34:12
cdata Francois Bouffard 22 Oct 2008 08:34:12
graphics Francois Bouffard 22 Oct 2008 08:34:12
interaction Francois Bouffard 22 Oct 2008 08:34:12

Contact us at files@mathworks.com