File Exchange

image thumbnail

Snakes with class

version 1.0 (8.8 KB) by

Implementation of snakes using a class to enable automatic display of the snake over an image.

20 Downloads

Updated

View License

This package implements snakes (active contours) through a class `dip_snake`. The function `snakeminimize` modifies the snake to move it to a lower energy configuration, which typically corresponds to the snake following edges in an image. When the semicolon is left off a statement that returns an object of this class, the snake is automatically drawn on top of the image in the current figure window.

`snakeminimize` is very general in the sense that it can be used to implement many types of snakes found in the literature. The snake's external force is an input parameter, and hence the user can implement the GVF (gradient vector flow) or VFC (vector field convolution) external forces, or simply use the gradient. The balloon force is included.

This package add to and builds on DIPimage, a scientific image analysis toolbox for MATLAB. See http://www.diplib.org/

Comments and Ratings (5)

Isabel

Isabel (view profile)

Cris Luengo

Cris Luengo (view profile)

Isabel,

If you have your images already read into MATLAB, you can directly use them as input to DIPimage toolbox functions. To convert a MATLAB array to a DIPimage image object, use the function `dip_image`.

Alternatively, if you install the Bio-Formats library, as explained in one of the notes in the help for the `readim` function, you'll be able to read in DICOM files directly as DIPimage images.

Hope this helps!

Isabel

Isabel (view profile)

Dear Cris,

I'm working with MRI images in 3D and I have my pile of images in a "images.mat" how can I read the images with the DIP image toolbox? the original format of the images is .dcm

Thank you

Cris Luengo

Cris Luengo (view profile)

Vivek,

It's explained in the README file inside the ZIP that you download here. You need to install DIPimage (from http://www.diplib.org/). Then copy the two M-files "snakeminimize.m" and "dip_snake.m" to the "dip/common/dipimage/" directory and the M-file "private/paramtype_snake.m" to "dip/common/dipimage/private/". You might need to CLEAR FUNCTIONS before you can use these functions.

Please let me know what it is that is not working!

Cris.

Vivek

Vivek (view profile)

hi,
i'm having Matlab 7.8.0 R2009 in windows platform, could you please let me know, how to run this file?

MATLAB Release
MATLAB 7.9 (R2009b)
Acknowledgements

Inspired by: Parametric Active Model Toolbox

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

» Watch video

snakes_with_class/

snakes_with_class/private/