Code covered by the BSD License  

Highlights from
Slicer

5.0

5.0 | 2 ratings Rate this file 56 Downloads (last 30 days) File Size: 67.07 KB File ID: #27983
image thumbnail

Slicer

by David Legland

 

22 Jun 2010 (Updated 18 Aug 2011)

Slicer for exploring 3D images (grayscale, color or vectorial) by visualizing planar slices.

| Watch this File

File Information
Description

Simple interface for exploring 3D images by visualizing planar slices. It is not a 3D renderer, but allows to get a quick overview of the image.

Among the interface features:
- navigation within image,
- zoom management,
- edition of grayscale range (from datataype, from image, manual)
- 3D image flip or 90-degrees rotation,
- management of image resolution
- import of metaimage, analyze or dicom images
- display of 3 orthogonal slices, planar or 3D
- management of several look-up tables

It supports 3D grayscale, binary, RGB, or vector images (in this case, the vector norm is used for display).

The package includes functions to read/write image stacks stored as tif slices or bundle, as well as basic support for reading and writing images in metaimage format (mhd).

Examples of use:
 slicer(img); % display the 3D or 4D imge
 slicer('fileName.tif'); % read the 3D image from file
 slicer('img000.tif'); % read a series of images
 slicer % opens a dialog to choose the file

type "help slicer" at matlab prompt, or "help stacks" to have an overview of all functions within the package.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
01 Jul 2010 J Rey

Excellent, thank you very much.

23 Apr 2011 sdf

??? Attempt to reference field of non-structure array.

Error in ==> slicer>itemOpen_Callback at 980
[filename, pathname] = uigetfile( ...

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> slicer at 113
    gui_mainfcn(gui_State, varargin{:});

Error in ==>
@(hObject,eventdata)slicer('itemOpen_Callback',hObject,eventdata,guidata(hObject))

 
??? Error while evaluating uimenu Callback

plyz tell me my mistake..and i have also added path to matlab.

24 Apr 2011 sdf

do not open .dcm image....error of
Index exceeds matrix dimensions.

27 Apr 2011 David Legland

@sdf: It is actually possible to load dicom images (files->import->dicom). Note that the gui does not support all dicom features. I have submitted an updated version, that should be more intuitive.
If you still have some bugs, please email me.

05 May 2011 ops OPS

not work for me
??? Index exceeds matrix dimensions.

Error in ==> slicer>computeDisplayData at 415
    data = img(:, :, zslice);

Error in ==> slicer>setSlice at 656
cdata = computeDisplayData(handles);

Error in ==> slicer>slicer_OpeningFcn at 216
setSlice(handles);

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

Error in ==> slicer at 124
    gui_mainfcn(gui_State, varargin{:});

22 Jul 2011 David Legland

@OPS:
I think the problem depends on the image you tried to visualize.

Input should be either a M*N*P 3D grayscale image, or a M*N*3*P 3D color image.

hope this helps ?

17 Aug 2011 Martijn Steenwijk

Hi David,

Great work! A small suggestion regarding the metaImageInfo function. Currently, if a mhd file contains the tag ElementSize, but not the tag ElementSpacing, ElementSpacing will be set by default as [1 1 1].

This while the specification states (http://www.itk.org/Wiki/MetaIO/Documentation):
If ElementSpacing is not specified, it is assumed to be equal to ElementSize. If neither is specified, both are assumed to be 1.

Would it be an idea to follow this ITK convention?

Best,
Martijn

18 Aug 2011 David Legland

Hi Martijn,
your suggestion is good ! I have just submitted an updated version that fixes it. I'll also try to add support for data stored in header file in a future version.

Regards,
David

Please login to add a comment or rating.
Updates
30 Nov 2010

added options to choose grayscale extent, lut management, and fixed several bugs.

27 Apr 2011

added display of orthoslices, enhanced loading of new images, enhance display of image infos (name, pixel value...)

12 Aug 2011

fix bug when opening without arguments

18 Aug 2011

better control on size/spacing when importing metaImage format

Tag Activity for this File
Tag Applied By Date/Time
slice David Legland 22 Jun 2010 11:25:46
viewer David Legland 22 Jun 2010 11:25:46
3d David Legland 22 Jun 2010 11:25:46
image David Legland 22 Jun 2010 11:25:46
display David Legland 22 Jun 2010 11:25:46
stack David Legland 22 Jun 2010 11:25:46
slicer David Legland 01 Dec 2010 15:23:17
3d viewer David Legland 01 Dec 2010 15:23:18
visualization David Legland 01 Dec 2010 15:23:18

Contact us at files@mathworks.com