Code covered by the BSD License

### Highlights from Sliceomatic

4.50877
4.5 | 61 ratings Rate this file 171 Downloads (last 30 days) File Size: 35.7 KB File ID: #764 Version: 1.1

# Sliceomatic

### Eric Ludlam (view profile)

19 Sep 2001 (Updated )

Volume slice visualization gui

### Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

File Information
Description

GUI for manipulating slices and isosurfaces over a volume.
Control over color transparency, contours, and rendering techniques via menus.

Original sliceomatic 1.0 for older versions of MATLAB is in the zip file.

Acknowledgements

This file inspired Mia 2.5, Mri Brain Segmentation, Pcolor3, and Iso Slicer.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements A good OpenGL hardware card is quite useful.
08 Jun 2016 Lukas Kortmann

### Lukas Kortmann (view profile)

If you want to slice surface data in the form of z(x,y) instead of volumetric data in the form of v(x,y,z) like sliceomatic expects, you can convert it like this (with 2 z values z1 and z2, they get dummy values so you can see them in the volume):

% normalise z on [1:resolution]
z1norm = round( (z1-min(min(z1)))/(max...(max(z1))-min(min(z1))) * (resolution-1) + 1 );
z2norm = round( (z2-min(min(z2)))/(max...(max(z2))-min(min(z2))) * (resolution-1) + 1);
v = zeros...(resolution,resolution,resolution);

for y = 1:resolution
for x = 1:resolution
v(x,y,1:z1norm(x,y)) = 0.5;
v(x,y,1:z2norm(x,y)) = ...
v(x,y,1:z2norm(x,y)) + 1;
end
end
sliceomatic(v)

Comment only
08 Jun 2016 Lukas Kortmann

### Lukas Kortmann (view profile)

13 Apr 2016 Andrea Libri

### Andrea Libri (view profile)

25 Mar 2016 Yaroslav

### Yaroslav (view profile)

awesome!

06 Jan 2016 Yilun Gong

### Yilun Gong (view profile)

19 Dec 2015 Feten

### Feten (view profile)

Dear all,
I am using on matlab R2015b Linux mint.
Could you help me to avoid this error:
Reference to non-existent field 'toolbar'.

set(d.toolbar,'visible',prefs.anntoolbar_Checked)

d = OverrideStickyUserPreferences(d);

Error in sliceomaticfigure (line 136)

Error in sliceomatic (line 203)
d = sliceomaticfigure(d);

Error in analyze_series8 (line 69)
sliceomatic(double(D))

Comment only
22 Nov 2015 Justas

### Justas (view profile)

Got it to work on R2015a by:

changing (in ~\private\sliceomaticfigure.m)

set(gcf,'nextplot','new');
set(gca,'nextplot','new');

to

and replacing (in ~\private\sliceomaticmotion.m)

d.motionmetaslice = line('parent',d.axmain,...
'vis','off',...
'linestyle','--',...
'marker','none',...
'linewidth',2,...
'erasemode','xor','clipping','off');

with

d.motionmetaslice = line('parent',d.axmain,...
'vis','off',...
'linestyle','--',...
'marker','none',...
'linewidth',2,...
'delete','true','clipping','off');

'erasemode' was giving errors, 'xor' was giving error when closing window.

The program is 5/5!

10 Nov 2015 Thalles Leite

### Thalles Leite (view profile)

Thanks for the code, it's exactly what I was searching for, but I had the same problem as Alex.

"Error using matlab.graphics.axis.Axes/set
While setting the 'NextPlot' property of Axes:
'new' is not a valid value. Use one of these values: 'add' | 'replace' | 'replacechildren'."

Am I doing something wrong?

Comment only
05 Nov 2015 Conlan Kirk

### Conlan Kirk (view profile)

Precisely what I needed, similar to FEA and CFD volume plots. Would be nice if you could do a volume cut (where the cut would show the volume below/above a certain value) in addition to the surface cut, but it works for showing the sensitivity of my function to the input variables. Excellent work.

01 Oct 2015 Alex

### Alex (view profile)

While running the example:

[x,y,z] = meshgrid(-2:.2:2, -2:.25:2, -2:.16:2);
v = x .* exp(-x.^2 - y.^2 - z.^2);
sliceomatic(v)

Error using matlab.graphics.axis.Axes/set
While setting the 'NextPlot' property of Axes:
'new' is not a valid value. Use one of these values: 'add' | 'replace' | 'replacechildren'.

Error in sliceomaticfigure (line 162)
set(gca,'nextplot','new');

Error in sliceomatic (line 203)
d = sliceomaticfigure(d);

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Reference to non-existent field 'motionmetaslice'.

Error in sliceomaticmotion (line 29)
if isempty(d.motionmetaslice)

Error while evaluating Figure WindowButtonMotionFcn

Comment only
24 Sep 2015 DGM

### DGM (view profile)

if i could take it back, i would.

Comment only
24 Sep 2015 DGM

24 Sep 2015 DGM

### DGM (view profile)

jesus this site is broken.
anyway, i was just trying to give a good review but can't seem to get that across.

18 Aug 2015 SHERRY

### SHERRY (view profile)

cool

22 Jul 2015 Rey Kelvin Peralta

### Rey Kelvin Peralta (view profile)

I am new in matlab. How do i use sliceomatic? how to install? where in matlab folder do i extract?

Comment only
09 Apr 2015 Peng Dai

05 Mar 2015 Ines

### Ines (view profile)

Very useful. Thank you.

I would like to change the color scale of the 3D plot, which normally uses the max,min values of the plotted dataset. I managed to change the range of values in the colorbar by modifying the function "isocontrols.m", however it does not seem to apply to the 3D plot it self.

Comment only
05 Oct 2014 sara

### sara (view profile)

thanks

Comment only
15 Aug 2014 laura

### laura (view profile)

Great application! Just one question: how can I export also the colour bar, e.g. if I want to modify the writings on the figure and save it in .eps format?

13 Feb 2014 jerry

### jerry (view profile)

very dramatic contribution!

30 Nov 2013 Rifat

### Rifat (view profile)

Very helpful and easy to use application. Just put your 3D grid and you are good to go!

28 Aug 2013 Emmanuel Farhi

### Emmanuel Farhi (view profile)

Absolutely marvelous contribution.

04 Mar 2013 Sneha Nidhi

### Sneha Nidhi (view profile)

04 Mar 2013 Sneha Nidhi

### Sneha Nidhi (view profile)

29 Jan 2012 zhang zhen

### zhang zhen (view profile)

useful!

27 Nov 2011 leila

### leila (view profile)

How can I see the black voxel in the volume, all the zero-value voxels are invisible! :(, please guide me, thanks.

Comment only
26 Jan 2011 felix

### felix (view profile)

hi,
my variable v equals 50x50x50 dimension with values for each point. I just plotted
sliceomatic1p0(v);
the whole sliceomatic tool, which is great-thx a lot-, showed up except my variable v with datas. the dice was empty. did i do smth wrong?

11 Oct 2010 moha soft

### moha soft (view profile)

i am a bignner

13 Apr 2010 wang ning

### wang ning (view profile)

??? Undefined function or method 'sliceomatic' for input arguments of type 'uint8'. what's wrong? how to solve it?

ning thanks

25 Mar 2010 Alex Gough

### Alex Gough (view profile)

08 Jan 2010 Jacob Kirkensgaard

### Jacob Kirkensgaard (view profile)

I have a problem with sliceomatic on OSX 10.6.2, matlab v. 7.10.0 (R2010a). When I start up the program I am in cursor mode and am able to control the slice buttons etc., but if I go to rotate-mode I can't get back to cursor-mode - the little arrow is simply missing from the annotation toolbar... Or am I missing something?

Comment only
20 Dec 2009 Harinee A.S

### Harinee A.S (view profile)

can anyone tell me how this works.. can we import images in this..

Comment only
11 May 2009 Edgar Guevara

### Edgar Guevara (view profile)

Really nice job!

10 Feb 2009 poornima

### poornima (view profile)

i have some dicom images. can anyone tell me how can i view these dicom images?

Comment only
06 Feb 2009 ucd puri

### ucd puri (view profile)

seems nie, i will try to ue it

26 Jan 2009 neftirini isabel

### neftirini isabel (view profile)

can someone help me, with how do i call it on matlab...i am a new user, and i didnt manage to add it to the toolbox...

Comment only
03 Dec 2008 Jim Haras

### Jim Haras (view profile)

i have a series of mri silces, dicom files , and i want to import them. is this possible? if so, a little how-to guide would certainly be appreciated.

Comment only
30 Aug 2008 Chau Tran Kim

Wonderful

26 Jan 2008 Liu Xuefeng

excellent

14 Jan 2008 Ruwan Ranaweera

great work!

21 Apr 2007 andi setiawan

very good

14 Nov 2006 vinay pai
29 Sep 2006 John Franklin

Fantastic work! This is pretty slick. I was going to complain about the interface taking up too much room, but then I noticed the option to remove interface visibility and the ability to copy to a "clean" figure. Really nice.

29 Sep 2006 Yashavantha BS

very useful tool..

26 Jul 2006 Dinesh Appya

useful tool for volume data

07 Jul 2006 Daniel Simões-Lopes

Althogth it's not bug-free, suits me well!
A very nice GUI application for volume visualization.

11 May 2006 Vinay D

very useful

04 Mar 2006 Matt Crema

Really great interactive tool for quick exploration of volume data.

Thanks.

11 Dec 2005 Nick Clark

FDTD sorry - long day :)

Comment only
11 Dec 2005 Nick Clark

This is awsome! Helping me no end with FTDT acoustic simulation

07 Nov 2005 Ibon Bustinduy

An improved version is available here:
http://gtts.ehu.es:8080/Ibon/ISIS/sliceomatic_ibon.zip

Works fine in Matlab 7.1 (In both Windows and Unix OS).

Thanks A LOT. Eric Ludlam

18 Oct 2005 Mirza Kamaludeen

This is an excellent tool, which can be used to compare results obtained from sterelogy

25 Aug 2005 Larry Velasco

Thanks to the Sliceomatic people.. This software is great, it has helped me a lot for my PHD, where I have been working with FEM aand FDTD ... I now can visualise all my 3D data in a very good way..

Thanks a lot,

29 Jun 2005 Vinay D

Very handy

18 Mar 2005 Jesper Pedersen

I have to re-rate this piece of software. It is fantastic, and in a newer version it is in fact possible to use the actual coordinates of the data.

16 Mar 2005 Jesper Pedersen

Nice GUI and program. However, it is very, very annoying that one cannot use the actual coordinates of the data.

23 Dec 2004 Fu-Sung Wang

I'm impressed by this great demonstration.

23 Nov 2004 Shira Rubin

This is a fantastic tool!
But - how is it possible to use the actual coordinates of the data? This would really make it perfect.

15 Sep 2004 senthil kumar

IT IS VERY USFULL FOR ALL SIMULATION PURPOSE

23 Jul 2004 Krishnakumar Venkateswaran

This is a great tool. Excellent tool for people like me who work on confocal imaging. Works for me without any problem.

23 Jun 2004 Binevia karoly

great but all the time crashes, that's unbeliveble, the author should try harder...

05 May 2004 Torbjørn Hergum

A great tool - for as long as it works. It frequently crashes matlab with a "segmentation fault". I'm running matlab on Linux RedHat 9.

07 Feb 2004 Andreas Loesch

Great :)
one wish: show the gradient in the field (quiverplot or something like that)

@Jimmy -> the right mouse button on the Arrow is your frient

29 Dec 2003 Jimmy Pagel

Great code!
to remove a slice as well.

Comment only
09 Oct 2003 Marco Cannella

Fantastic. You can analize 3D data in a fast and simple way.

01 Oct 2003 Gordon Cooper

This is excellent ! We have incorporated it into our geophysics teaching.

27 Jun 2003 Adam van Eekeren

Nice tool to look at 3D-data!
Only one concern: it is possible to place a slice controller outside a slice...by doing that, it is not possible to remove it anymore!

10 Apr 2003 Dhaval Shah

very good tool.

13 Jan 2003 maurizio fedi

Fantastic tool to manage 3D data.
only a problem: why one cannot use actual coordinates?

09 Dec 2002 Peter Kraal

very nice tool! very handy for soil profiles I must say. too bad axis dimensions are hard to edit. tip: for good isosurfaces, replace all 'unwanted' values with the same value.

09 Aug 2002
26 Mar 2002 Chris

A VERY nice tool for quickly surveying a 3-d dataset.
I found the interface intuitive as well. One question though...Am I missing a way to remove slices from the display once they are created?

30 Jan 2002 G

excellent, especially due to lack of alternatives.

19 Jan 2002
26 Nov 2001 Evan Westwood

Excellent way to look at 3-D data and a great template for learning about how to image 3-D data in Matlab. Note that right-clicking on arrows or surfaces to get the contextmenu options only works if you have nothing checked in the uppermost section of the figure's Tools menu.

25 Nov 2001 James Halmer

I dont understand it

20 Sep 2001 Peter Volegov
10 Dec 2002

New version

13 Dec 2002

New version

18 Nov 2008 1.1

Miscellaneous bug fixes