View License

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

» Watch video

Highlights from

4.8 | 45 ratings Rate this file 518 Downloads (last 30 days) File Size: 9.49 MB File ID: #21993 Version: 12.1
image thumbnail



Dirk-Jan Kroon (view profile)


04 Nov 2008 (Updated )

MIP, Color, Slice and Shaded 3D (shearwarp) Volume Rendering, interactive 3D view/measurement GUI

| Watch this File

File Information

This function can be used to interactively view any kind of 2D,3D and 4D image volumes like CT and MRI. Allowing segmentation and distance measurements or ROI selection in 2D slices.
It includes Maximum intensity projections (MIP), Volume Rendering (VR) , Slice render, and colored and Phong shaded Volume rendering.
Voxel opacity and color tables can be changed on the fly allowing also iso surface kind of renders.
The fast render algorithm which renders a 3D volume to a 2D image, is based on a Matlab coded implementation of the Shear-Warp transform, in which instead of rotating the viewer rays the slices are sheared.
There are two major Matlab files:
- viewer3d.m : The interactive GUI
- render.m : The function which renders volume data with the shear-warp transform to an 2D image.

File-formats supported:
    Matlab Files (.mat)
    Dicom Files ( .dcm , .dicom )
    V3D Philips Scanner ( .v3d )
    GIPL Guys Image Processing Lab ( .gipl )
    HDR/IMG Analyze ( .hdr )
    ISI Files ( .isi )
    NifTi ( .nii )
    RAW files ( .raw , .* )
    VMP BrainVoyager ( .vmp )
    XIF HDllab/ATL ultrasound ( .xif )
    VTK Visualization Toolkit ( .vtk )
    Insight Meta-Image ( .mha, .mhd )
    Micro CT ( .vff )

This version is 100% Matlab code, but to make it faster if you run "compile c-code" in the config menu. I also included an older version with the shearwarp algorithm in c-code / mex-code

Please report bugs, successes and if you know some possible code speedups.


This file inspired Pcolor3 and Microscopy Image Browser (Mib).

MATLAB release MATLAB 8.5 (R2015a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (103)
14 Jan 2017 Hossein Alinezhad Moghaddam

14 Jan 2017 Hossein Alinezhad Moghaddam

21 Nov 2016 JUN MA

JUN MA (view profile)

21 Nov 2016 JUN MA

JUN MA (view profile)

I am also getting the blank screen with R2015b.
And I click on Volume in view3d, choose Volume 1. The window is still blank.
Looking forward to your reply!
best regards

Comment only
21 Nov 2016 encai zhang

29 Oct 2016 Zoidberg

15 Sep 2016 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Zhensen Chen, thank you for pointing out the bug with R2014 and above.
Now solved in new version by making the UIpanel invisible..

Comment only
23 Aug 2016 Zhensen Chen

I also used Matlab 2015b. When running viewer3d, the window doesn't show a menubar (i.e. the one with menus: Render, Volume, Config, Measure, Segment) and a black image in its display zone. The solutions for these are: 1. Right click the mouse, you will see the menubar; 2. Explicitly specify uipanel as parent of the axes in viewer3d.m line 3093: data.subwindow(i).handles.axes=axes('parent',data.subwindow(i).handles.uipanelmenu); Then you will see the region (axes) where images can be displayed.

Comment only
05 Jun 2016 Raja Sekhar Bandaru

Hi Dirk,
I am using 2015b. Loaded from a raw data file (.raw). 8bit uchar, size 400x300x300. Selected Volume1 in the viewer. I have set the windowwidth windowlevel to automatic (127,255). But I don't see anything (blank window).
PS-I confirmed from another viewer that I have proper data.

Comment only
18 May 2016 Sébastien Tosi

Would it be possible to make this script compatible with Matlab >=2015? There is an issue with the GUI and it does not work. Anybody as a fix?

Comment only
27 Apr 2016 Ilya Belevich

29 Feb 2016 Xiao Wang

great tool. For those who cannot see a 3D image, click on Volume in view3d, choose Volume 1.

23 Feb 2016 Yi Ji

Yi Ji (view profile)

Just gives blank page, even sample data.

OSX 10, MATLAB R2014b

Comment only
19 Jan 2016 Golchehr N

I run the program with R2015a and just gives blank page. Even sample data doesn't work. Does anybody has idea how to make the program work? thanks

Comment only
14 Jan 2016 Sharan Duggirala

Works well but GUI glitches for MATLAB 2015

07 Oct 2015 Mustafa Umit Arabul

There is a bug in the GUI. It is not working properly with MATLAB version 2015.

04 Apr 2015 sammer zai yousuf zai

Can you please tell me how can i open .mat file in viewer3d?

Comment only
15 Jan 2015 Seok Kim

Thank you for your work.
What is the mat file matrix size?
L x M x N? or L x M x N x O?

Comment only
10 Dec 2014 RÜZGAR YANIK

first of all thanks sharing code

i want to ask a question

i have dwi brain image .gipl format.i want to tick on .gipl image with roi and then want to make logic one in roi area and logic zero outside of roi area

if someone knows how it is done, kindly help me

waiting feedback


Comment only
09 Sep 2014 hamed

hamed (view profile)

It works well.Thank you!
I have a problem.Any body can help me please?!
I have a series of images of a blood clot in the coronary artery angiography .(These photos are from different angles and different thicknesses of clot) .I want process these two-dimensional images to estimate the VOLUME of the clot anymore. please help me!
thank you so much....

27 Jun 2014 Larissa

I would like to know if it is possible to extract the volume data rendered without the matlab viewer (plot). Can anyone help me? Thanks.

Comment only
20 Jun 2014 Christian

14 May 2014 Smita

Smita (view profile)

I am also getting the black screen with 2014a.

Comment only
08 May 2014 Mohammad

Thank you for this easy-to-use tool. I keep getting the same black scree with MATLAB 2013a. Please let us know if someone figured out the problem.


Comment only
08 Apr 2014 Shirin

Shirin (view profile)

This looks like a very good tool; however i keep getting a black screen!!

I get the GUI but have a black screen within it!!

I'm using Matlab version R2013a.

Can someone give me an idea of what might be wrong?

Thanks in advance

04 Nov 2013 JP

JP (view profile)

Hi Dirk,
very nice software.
Is it possible to change the background color ? Say, from black to white ?
How should it be referenced if used to generate images for a paper ?

03 Oct 2013 Milton

Milton (view profile)

This works very well for me. Thank you!

(the rating button does not seem to be working. I would give it a 5-star if I could)

24 Aug 2013 Kimberly Riley

This looks like a very neat tool however i keep getting a black screen. i've set my path to include all folders within the main folder viewer3d_version11. i've loaded the .mat file CommandlineData.mat. then just typed viewer3d(V) in the command line. i get the GUI but have a black screen within it. I'm using matlab version 2013a. can someone give me an idea of what might be wrong?

Comment only
27 Jul 2013 Sebastian

This is very nice.

Some suggestions for future.
1.) Manually set view point. Maybe even output a movie.
2.) Manually set alpha/color. Dragging is very cumbersome.

27 Jul 2013 Sebastian

28 Jan 2013 Ramiro Massol

hi Dirk
can your application render multi-coloured volumes (e.g. RGB)?

11 Jan 2013 ocelote

How do you keep the contrast in the 3D view ?

Comment only
09 Jan 2013 Xixi

Xixi (view profile)

01 Dec 2012 Roger

Roger (view profile)

Great program;

I've added some mirror functionalities, so it automatically creates the mirror ROI.

Unfortunately, I can't compile it on a MAC, using llvm--twolevel_namespace -undefined error

07 Nov 2012 Silvio

Silvio (view profile)

Hi, thanks for this great piece of software. Is there a possibility to change the background color from black to white?

17 Oct 2012 fred sampedro

Beautiful piece of software :). How can I change the title of the figure? (I mean the 'viewer3d' on the top left of the OS window)

Thanks a lot!

11 Oct 2012 André Zeug

Dirk, please let us know how to set dataset parameters like voxel size for the render.m function. I would like to process my data in a script using your render.m function rather than your viewer3d GUI.

Thanks in advance!

29 Jun 2012 Yuri

Yuri (view profile)

How can I change the voxel sizes, window width, etc from my Matlab function rather than using the GUI every time again?

Comment only
29 Jun 2012 Joy

Joy (view profile)

Hi Dirk,

How does the example of function "[Mshear,Mwarp2D,c]=makeShearWarpMatrix(Mview,sizes)" in render.m works ???? Anyone knows ??? Please help me out here.... Thanks

Comment only
25 Jun 2012 Joy

Joy (view profile)

I'm still new with this matlab. i've an interpolated image that need to be projected out with MIP. But how do i go about doing this MIP ?? Or could you show me which part from your render.m is programming the MIP function??

Thanks in advance :D

Comment only
20 Jun 2012 Yuri

Yuri (view profile)

I'm new to the dicom format. I have a directory of hundreds of CT slices of a wrist. How do I read all them into the tool to obtain a 3D image?


Comment only
30 May 2012 Murat Shagirov

09 May 2012 Urs Utzinger

If Dirk-Jan has spare time I was hoping he could consider implementing commands to:
1) reset rotation to be North/South/East/West on top (or have a field where the rotation, translation and zoom can be entered by hand).
2) Option to apply rotation, zoom and translation performed in one widow to the other windows (linking view setting between windows)
3) Function to crop data cube by placing planes perpendicular to x/y/z
4) 3D cursor to probe intensity while also showing location.

09 May 2012 Urs Utzinger

23 Jan 2012 Brian MacDonald

I am having trouble getting the voxel size function to work. When I increase the voxel size nothing happens. Any thoughts?

Comment only
27 Nov 2011 leila

leila (view profile)

I want to visualize a 3D *.mat data with the "viewer3d",I first tried to visualize the "matlab mri image" by the following code, but nothing displayed!
>> load mri
>> D = squeeze(D);
>> viewer3d(D);

what's the problem? maybe there is an especial format for the *.mat files that I don't know, please help me.thanks.

Comment only
23 Nov 2011 bahar cham

13 Oct 2011 Johannes

oh got it ... I figured out to use render() (instead of viewer3d) with the corresponding arguments.

Comment only
11 Oct 2011 Johannes

Great tool!
Is it possible to generate multiple TOF-frames (and save them) for a movie from the command line?
As far as I see, only the volume-data is specified as input parameter for viewer3d!?

Comment only
20 Jul 2011 Layla

Layla (view profile)

...problem solved! The issue is not the code, it's the fact that I don't have the Image Processing Toolbox installed. Oops.

Comment only
20 Jul 2011 Layla

Layla (view profile)

I'm trying to run this file on CentOS. I tried to simply run the GUI by typing "viewer3d" (no quotes) into the command window while in the correct directory. I get the following error messages:

??? Undefined function or method 'imshow' for input arguments of type 'uint8'.

Error in ==> menubar>CreatMenuBar at 181

Error in ==> menubar>UpdateMenu at 353

Error in ==> menubar at 83

Error in ==> viewer3d>addWindowsMenus at 3239

Error in ==> viewer3d>addWindows at 3098

Error in ==> viewer3d>viewer3d_OpeningFcn at 155

Error in ==> gui_mainfcn at 221
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> viewer3d at 47
gui_mainfcn(gui_State, varargin{:});

I also tried working with some of the example data. I typed in the command that the help file suggests:


And I get more errors: ??? Error using ==> load
Unable to read file ExampleData\CommandlineData.mat: No such file or directory.

I'm very confused. I'm definitely working in the right directory. Any insight?

Comment only
18 Jul 2011 WEI LIU

Terrific code. mha_read_volume can be slightly improved for reading 3-D deformation field (i.e., a vector field) by replacing line 80 to the code as follows:

V = reshape(V,info.Dimensions);
V = reshape(V, [nchannel info.Dimensions]);

23 May 2011 Wouter

Wouter (view profile)

File -> open medical 3d file.
Image File Name appears to contain a patient name in folder. Might want to remove that:
Other\P****s A****s 05***1603\201***9\1.2.826.0.1

07 May 2011 Al Ka

Al Ka (view profile)

Is there a copyright disclaimer? Can it be used for research purposes?

Comment only
06 May 2011 laleh

laleh (view profile)

29 Mar 2011 Norbert Gal

When i try to render a set of slices of DICOM files i have the following error:

??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==> viewer3d>LevelRenderImage at 531

Error in ==> viewer3d>show3d at 394

Error in ==> viewer3d>menu_ChangeRender_Callback at 3057

Error in ==> gui_mainfcn at 96

Error in ==> viewer3d at 47
gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uimenu Callback

Can you help mee?

Comment only
17 Mar 2011 Ganesh

Ganesh (view profile)

* I would like to convert *

Comment only
17 Mar 2011 Ganesh

Ganesh (view profile)

I would convert a .mat file into .mha file. Can I do this with Viewer3d and if so, how? Thanks

Comment only
06 Mar 2011 Igor

Igor (view profile)

Great tool..
25 Jan 2011 version implements some interesting new features , however it seems like there sre some bugs too :
1 - viewer3d.m line 2203:
i've changed it to:
since i've got an error after

volume - 1
renderer - MIP
config->quatily vs speed -> Store volume for all 3 major directions (ON)->Apply

??? Input argument "dvs" is undefined.

Error in ==> viewer3d>makeVolumeXY at 2227

Error in ==> viewer3d>qualityspeed_pushbutton_applyconfig_Callback at 2203

2- if any of 2 checkboxes in config GUI was enabled and saved with 'Save as default', later >>viewer3d(uint8(my_data));
leed to
??? Reference to non-existent field 'volume'.

Error in ==> viewer3d>computeNormals at 2237

Error in ==> viewer3d>addOneVolume at 216

Error in ==> viewer3d>addVolume at 183

Error in ==> viewer3d>viewer3d_OpeningFcn at 170
if(isnumeric(V)), addVolume(V,[1 1 1],info); end

And.... it would be nice to have ability to specify Renderer and volume selection in a function call....Those routine actions can be quite booring...

Comment only
22 Feb 2011 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

If you have your Volume in a Matlab command prompt.
Calculate an inverse of your data for example:
V = max(V(:))-V;
Now the lungs and the background have an high intensity.
To give the background a low intensity, you can use something like:
for i=1:n, s(i)=sum(L(:)==i); end;

Comment only
22 Feb 2011 Haseeb

Haseeb (view profile)

Using a different data set, I was able to view the 3d reconstruction of the dicom data so problem solved. Does anyone know how I could focus on just the 3d reconstruction of the lungs from a CT scan? Though I get a 3D reconstruction, all I can visualize is the bone structure (rib cage, spine etc) around the lungs. Does anyone know how I could get around this problem?

Comment only
11 Feb 2011 Haseeb

Haseeb (view profile)

I have also used a .mat file
volume_image: [512x512x367 double]
I am still getting an error in this case,

??? Undefined function or method 'max' for input arguments of type 'struct'.

Error in ==> viewer3d>viewer3d_OpeningFcn at 165
volumemax=double(max(V(:))); volumemin=double(min(V(:)));

Error in ==> gui_mainfcn at 221
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> viewer3d at 47
gui_mainfcn(gui_State, varargin{:});

What does this mean and how can I fix this? Perhaps my method of making a .mat file is wrong. I used the dicom23D function developed by Ariel Balter. Is there any other way of making a .mat file from Dicom files that I could use?

Comment only
11 Feb 2011 Haseeb

Haseeb (view profile)

I found out where the online help is, so problem solved there.

Comment only
11 Feb 2011 Haseeb

Haseeb (view profile)

Hi Dirk,
I have a CT dicom data. The files though have no extension name to them. How can I use this code to 3D render and view the data? You mention you have put an extended online html help online. How can I access this?
Thanks in advance

Comment only
08 Feb 2011 chris

chris (view profile)

Working well with a few sample datasets. It would be great to have this work as an MPR slice viewer and measurement tool, with centering and rotation handles on each orthogonal plane. Seems it is only possible to view and measure from the cardinal axes, correct?

25 Jan 2011 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Kai Steppenwolf
You can change the Pixel scaling in one of the sub-menus of "Volume 1".

Please note, that a major improved version (11), will be available tonight, or 26 Jan 2011.

Comment only
25 Jan 2011 Kai Steppenwolf

glad to see the new version, great job! But it seems to have voxel size mistake errors when I read some MRI-Dicom-data. The 3D-view looks so flat, just like a 2D-picture. In the early version (8) I can use the voxel size option in the menu to define the right size, but this time the option seems to disappear in the newest version...

Comment only
20 Jan 2011 Justin Fernandes

Great Job. I've been looking for something like this for a while. Hope I will be able to program like this in matlab some day. Many thanks.

25 Dec 2010 canfei

canfei (view profile)

I are working in matlab2009a. And the files can work at first. But report some errors such as "??? Undefined function or method 'viewer3d' for input arguments of type 'int16'." , soon! And It is ame as to use "double" or "single" type, and so on. Why do this happen? I am too eger to solve this problem. Thank you!

Comment only
17 Dec 2010 Dave Welch

10 Nov 2010 Yuanming Suo

It works just great right now. Thanks for the hard work.

10 Nov 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Yuanming Suo , *Xinghua Lou
The newest version 9, has a whole new c-coded file

Comment only
05 Nov 2010 Yuanming Suo

It works great on Linux. But still Dirk, could you kindly see how can we get around the bug in Windows? This is really a cool tool. If this bug is fixed, it will be even better. I tried to use Visual Studio as the compiler, Matlab still crashes......

Comment only
27 Oct 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Xinghua Lou,

Thanks for your comment. I think the crash is caused by the (free) lcc-compiler of Matlab, If you install the Visual Studio (express) version it will probably work fine.

Comment only
21 Oct 2010 Xinghua Lou

This is no question a wonderful tool for visualization in Matlab.

One bug I found: Matlab crashes after compiling the c mex files. My Matlab version is r2009a, os is Win XP.

22 Sep 2010 Tan

Tan (view profile)

Hi Dirk,

Can you add a few quick demos based on the test data and test volume.



05 Sep 2010 Zubin Master

Hey Dirk,

This is a great tool. I've actually been struggling to find some code to visualize CT/MRI data from different angles as MIPs. I could only manage it from the orthogonal angles (couldn't figure out what algorithm to use for rendering from arbitrary angles). This implements it really well.

I was wondering what algorithm would be needed to render the MIP with perspective instead of an orthographic projection. We use these MIP images (Digitally Reconstructed Radiographs or DRRs) when planning radiation therapy treatments and they're usually displayed with perspective to simulate the distance between the radiation source and the patient.

Another poster also mentioned something about simulating DRRs. I was wondering if you could guide me to the algorithm
that I would need to look up to do this.



Another poster mentioned something about rendering your views as DRRs.

30 Aug 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Kai Steppenwolf

If you select one dicom file from a dataset with a lot of files representing a 3D volume, then the program will automatically load also all other files to build the 3D volume.

Best Regards, Dirk-Jan Kroon

Comment only
29 Aug 2010 Kai Steppenwolf

Hi Dirk-Jan,

Just found your fantastic Viewer3D.

I have a series of DICOM files, which contain MR slices images of the brain. But the 'open medical 3D files' option can import only one dicom file every time.

Then I tried to read 3D data in to a Mathlab variable V, but the command VIEWER3D(V, RENDERTYPE, SCALES) works still incorrect。

Could you tell me, how can man handle a series of slices dicom image by using your Viewer3d?


Comment only
06 Aug 2010 Andrew Brennan

Hi Dirk-Jan,
Looking at the code it doesn't appear to support pseudo coloured
bitmaps without first running rgb2grayscale() first. Then the act of applying pseudocolouring again on the 3d volume doesn't appear to work successfully. Is this feature available?

Comment only
23 Jul 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Jackson Shen

Thanks for your comment, I will have a look at malloc and mxMalloc ...

Comment only
23 Jul 2010 Jackson Shen

Great Job, Again!

1. Multi-threading is not working properly in my computer. Matlab is frozen. (Matlab 2008b or above, XP 32bit, Intel Core2 Quad with 2GB memory)
2. Memory leaking...

Using malloc and free causes memory leaking in Matlab. You must use mxMalloc and mxFree instead.

Type "feature memstats" in matlab to monitor the memory.

Looking forwards to see your next version.


Jian-Kun Shen

Comment only
13 Jul 2010 chandrakala Gowda

01 Jul 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

* oscar SanEmeterioNateras
First you have to load your data in to a Matlab variable V, the functions needed to load your medical format can be found on Mathworks.

Comment only
30 Jun 2010 oscar SanEmeterioNateras

Hello Dirk,

I want to use your code to open a nii file of and MRA img that I have so I can do the MIP.
I tried to use the command:
VIEWER3D(V, 'MIP', [0.156, 0.29, 0.156]);
to open and run viewer but i am not sure what I should put for the 'V' input.
Can you give me and example or a suggestion on how to work on this thanks a lot.

Comment only
02 Jun 2010 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

* wang ning
If you only sea a blackbox enable auto contrast, because then your values are probably not ranged between 0 and 2^16-1

Comment only
13 Apr 2010 wang ning

hi Dirk-Jan Kroon

my volume data is 512*512*272 uint16 why files don't work ?

ning thanks

Comment only
16 Mar 2010 Pascal

Pascal (view profile)


Solid work!

The RENDER_MIP -- updatebuffer function-- can be modified to create a DRR of the volume. What's your take on it.

16 Mar 2010 Hans Müller

Wonderful! I wish I had found this 6 months ago!

21 Oct 2009 ted p teng

ted p teng (view profile)

excellent work. thanks for sharing!

30 Sep 2009 Aaron Schurger

Outstanding! Sometimes has an error when I switch to a different rendering mode. Thanks for this application.

10 Sep 2009 Siyi Deng

Siyi Deng (view profile)


22 Jul 2009 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

It runs on most Matlab versions, but not on the very old ones because Matlab figure file format changed in time, and saving to an older figure-file-format doesn't work that well.

Comment only
21 Jul 2009 Wenyuan

Must it be run in the matlab 7.8 version? My matlab version is 7.0, will it be OK? I can't even run the sample: load TestVolume;viewer3d(V). Is it because of the lower matlab version?? Thanks..

Comment only
15 Jul 2009 jichao zhao

it is very cool staffs. many thanks

16 Apr 2009 Shi vera


01 Dec 2008 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

*Cris Luengo
Thanks for your Feedback, I will use it in my nex file update.
(non-isotropically display, can done by viewer3d(Image, [2 1 1]) with [2 1 1] the scaling)

Comment only
01 Dec 2008 Cris Luengo

Cris Luengo (view profile)

Very nice! But it's not very fast. I will try the old MEX-file code next, to see if that speeds it up or not. I tried it with an image 1000x500x250 pixels and found the rendering took 30 s or more.

Some suggestions:

- Don't update the display every time a node is moved in the alpha colors window. Instead, have a button "preview" to update the rendered image.

- Add checkmarks next to the menu items of the activated modes (render and config menus).

- Add an option to enter pixel spacing for non-isotropically sampled images (common in 3D imaging)

- Put the support M-files either within the main M-file or into a private/ subdirectory. That would make it easier to get started...

Great tool! Thanks!

05 Nov 2008 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

Tommorow (06-2008) a version with extended HTML help will be online

* Jean-Yves Tinevez
The TestVolume.mat example:
load TestVolume;

Comment only
05 Nov 2008 Jean-Yves Tinevez

Tested successfully on MacOSX-Tiger, MATLAB 2008b & a.

Worked absolutely fine with matrices entered from command line (e.g. viewer3d(I)).

I had plenty of errors when trying to load a .mat file (e.g. the 2 ones given in demo), and putting tyhe mouse over the window. Here is the 1st one

??? Reference to non-existent field 'histogram_positions'.

Error in ==> viewer3d>createAlphaColorTable at 154
if (i<data.histogram_positions(1)), alpha=0; color=data.histogram_colors(1,:);

Error in ==> viewer3d>menu_load_view_Callback at 542

Error in ==> gui_mainfcn at 96

Error in ==> viewer3d at 50
gui_mainfcn(gui_State, varargin{:});

Error in ==>

Comment only
04 Nov 2008 Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

Load View only works with Matlab files created by Save View. Some help can be found in menu -> help, and with help function.m in the console window.

Comment only
04 Nov 2008 Joaquim Luis

Sorry, I found a little help on the function's help section.

Comment only
04 Nov 2008 Joaquim Luis

There is absolutely no help on how to use this. When I try to "Load view" than an endless number of errors occur.

Comment only
05 Nov 2008 1.1

Extended the help (with pictures) and updated error check

06 Nov 2008 1.2

fixed small dimension bug in major viewing axis. And files to folders

22 Nov 2008 1.5

Now 100% Matlab code, no mex files needed. Also warp 2D interpolation bug and save/load bug fixed.

26 Feb 2009 1.6

Configuration screen, with trade off between quality, memory and speed. Implemented most suggestions by Cris Luengo. Some small bug fixes and optimizations.

03 Apr 2009 1.8

Slice rendering and measurements, multi-threaded image warp code, bugs fixed.

28 Jul 2009 1.9

Removed unnecessary code from mouse position read out. Maybe this fixed the mouse position out of sync bug, which occurred sometimes.

01 Oct 2009 1.10

Linux Ubuntu tested

02 Jun 2010 1.11

Now "Autocontrast" is automatically enabled if someone uses uint16 and the data uses only a part of the rang 0 to 2^16-1

07 Jun 2010 1.12

Now read single Dicom files containing a whole 3D/4D volume.
Fixed bug dividing by zero with empty slice in auto contrast.
Added option to click landmarks, and made keyboard shortcuts for measure options.

07 Jun 2010 1.13

Bug in "Load View" solved

18 Jun 2010 1.14

Solved major bugs in Dicom volume reading

25 Jun 2010 1.15

Added Dicom Info dialog.
Solved possible bugs when loading multiple files, without closing viewer3d.
Added Intensity Value to mouse slice info

25 Jun 2010 1.16

Fixed Dicom Sorting problem

06 Jul 2010 1.17

Sorted files into sub-folders, now can read many medical-formats with ReadData3D

06 Jul 2010 1.18

Fixed folder location compile_c_files, changed text in code from dicom to data3d

22 Jul 2010 1.19

Updated File-formats

10 Nov 2010 1.21

Replaced the c-code Affine Warp files. Now scaling is not longer always 0..1 but supports scales and units like Hounsfield

19 Nov 2010 1.22

Fixed Bug number of input arguments slice view, and fixed bug in window-level slider

12 Jan 2011 1.24

Major update : Added multiple window and multiple volume support.

25 Jan 2011 1.26

Added 4D support, color overlay and many other changes.

15 Sep 2016 12.0

Now works with new Matlab versions such as R2015a. Thank you, "Zhensen Chen" for pointing out the UIpanel issue.
Now also works without Image-Processing Toolbox

15 Sep 2016 12.1

Fixed mouse-position bug in R2015a

Contact us