File Exchange

image thumbnail

Sliceomatic

version 1.1.0.1 (35.7 KB) by

Volume slice visualization gui

4.39394
71 Ratings

215 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

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.

Comments and Ratings (90)

Vinh Le-Van

I got it work on R2016a following Justas and Rajiv sugesstion, with a minor modification. For the sake of completeness, I resume here:
1. Change in ~\private\sliceomaticfigure.m
Replacing
      set(gcf,'nextplot','new');
      set(gca,'nextplot','new');
with
     set(gcf,'nextplot','add');
     set(gca,'nextplot','add');

2. Change in ~\private\sliceomaticmotion.m
Replacing
       d.motionmetaslice = line('parent',d.axmain,...
                    'vis','off',...
                    'linestyle','--',...
                    'marker','none',...
                    'linewidth',2,...
                    'erasemode','xor','clipping','off');
with
d.motionmetaslice = animatedline('parent',d.axmain,...
                    'vis','off',...
                    'linestyle','--',...
                    'marker','none',...
                    'linewidth',2,...
                    'clipping','off');
3. In ~\private\sliceomaticmotion.m
    Replacing
             set(d.motionmetaslice,'visible','on',...
                    'xdata',xdata,'ydata',ydata,'zdata',zdata);
  with
             addpoints(d.motionmetaslice,xdata,ydata,zdata);
             drawnow

min li

min li (view profile)

I haven't see any data in box windows, when I type the 'sliceomatic()' in the commond line.
why ?

maurizio fedi

I suggest the changes indicate by Justas, which allow the code to work in MATLAB 16b!!

Luca Amerio

The idea behind this piece of code is simply awesome. The code however need to be seriously adapted to the latest versions of MATLAB.
I spent one day trying to fix it, but still the changes required are deeply inside the code.

I would really love to see a new version working with MATLAB 2016b

It doesn't show any data in the GUI, even using the examples provided in the source... At least not in matlab2016b. I tried changing the lines suggested by Rajiv but still nothing. It crashed my matlab session when I dragged the figure...

Following Justas suggestion, I got it to work on R2016a

Change this in ~\private\sliceomaticfigure.m

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

to

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

go to ~\private\sliceomaticmotion.m

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

and replace line with animatedline and remove the property erasemode (and option xor).

Finally, add this at the end:

addpoints(d.motionmetaslice,xdata,ydata,zdata);
drawnow

daniel

daniel (view profile)

one badass app

crest Wang

good!

Abdur Rehman

dhaba india

Zhouping wei

when i run 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)

I got following message:
Warning: The EraseMode property is no longer supported and will error in a future release. Use the ANIMATEDLINE function for animating lines and
points instead of EraseMode 'none'. Removing instances of EraseMode set to 'normal', 'xor', and 'background' has minimal impact.
> In sliceomatic\private\sliceomaticmotion at 30

and just coordinate axes but no contents shown. I'm running on matlab R2014b

kai li

kai li (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)

Andrea Libri

Yaroslav

awesome!

Yilun Gong

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'.

Error in figmenus>OverrideStickyUserPreferences (line 449)
  set(d.toolbar,'visible',prefs.anntoolbar_Checked)

Error in figmenus (line 105)
  d = OverrideStickyUserPreferences(d);

Error in sliceomaticfigure (line 136)
  d = figmenus(d);

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

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

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

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

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!

Thalles Leite

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?

Conlan Kirk

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.

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)

I receive all these errors:

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

DGM

DGM (view profile)

sorry about the one-star.
if i could take it back, i would.

DGM

DGM (view profile)

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.

SHERRY

SHERRY (view profile)

cool

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

Peng Dai

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.
Thanks in advance for your help and suggestions.

sara

sara (view profile)

thanks
it is very helpful

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?

jerry

jerry (view profile)

very dramatic contribution!

Rifat

Rifat (view profile)

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

Absolutely marvelous contribution.

Sneha Nidhi

Very Helpful

Sneha Nidhi

zhang zhen

useful!

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.

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?

moha soft

i am a bignner

wang ning

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

Alex Gough

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?

Harinee A.S

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

Edgar Guevara

Really nice job!

poornima

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

ucd puri

seems nie, i will try to ue it

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...

Jim Haras

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.

Chau Tran Kim

Wonderful

Liu Xuefeng

excellent

Ruwan Ranaweera

great work!

andi setiawan

very good

vinay pai

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.

Yashavantha BS

very useful tool..

Dinesh Appya

useful tool for volume data

Daniel Simões-Lopes

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

Vinay D

very useful

Matt Crema

Really great interactive tool for quick exploration of volume data.

Thanks.

Nick Clark

FDTD sorry - long day :)

Nick Clark

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

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).

Once downloaded just type
doc sliceomatic to obtain more information.

Thanks A LOT. Eric Ludlam

Mirza Kamaludeen

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

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,

Vinay D

Very handy

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.

Jesper Pedersen

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

Fu-Sung Wang

I'm impressed by this great demonstration.

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.

senthil kumar

IT IS VERY USFULL FOR ALL SIMULATION PURPOSE

Krishnakumar Venkateswaran

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

Binevia karoly

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

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.

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

Jimmy Pagel

Great code!
just one request: can you please add a way
to remove a slice as well.

Marco Cannella

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

Gordon Cooper

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

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!

Dhaval Shah

very good tool.

maurizio fedi

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

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.

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?

G

excellent, especially due to lack of alternatives.

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.

James Halmer

I dont understand it

Peter Volegov

Updates

1.1.0.1

Updated license

1.1

Miscellaneous bug fixes

New version

New version

MATLAB Release
MATLAB 7.0.1 (R14SP1)
Acknowledgements

Inspired: pcolor3, IsoSlicer, MRI Brain Segmentation, Mia 2.5

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video