Posts Tagged ‘snakes_with_style’

Implementing the dip_snake class

Monday, December 21st, 2009

In the previous post I showed how to implement active contours (a snake). I included the link to a set of files with a complete snake implementation to plug into DIPimage. This implementations uses a class called dip_snake. In this post I wanted to show how this class is defined using MATLAB’s new 1-file-style of class definitions. Well, “new” is not completely accurate, this feature has been around for a few releases already, but I’m slow to adapt… You’ll also learn how to make a class whose objects automatically create or update a figure window, much like an object of type dip_image does.

(more…)

A simple implementation of snakes

Wednesday, December 9th, 2009

In this post I want to show how easy it is to implement snakes using MATLAB and DIPimage. The next release of DIPimage will have some functionality implementing snakes, and this post is based on code written for that. The first implementation of snakes I made for DIPimage used a custom class, dip_snake, to simplify usage. We decided eventually to do without the class. The code discussed here uses that first implementation, which you can download here. The most important bits of the code are identical to that in the next release of DIPimage, but the wrapping is not. Adding the class is a nice excuse to show how to modify DIPimage to understand a new parameter type. I will discuss that in a future post.

(more…)