File Exchange

image thumbnail

shrinkWrap

version 1.1.0.0 (3.58 KB) by Sean de
shrinkWrap creates a binary map for automatic segmentation of high intensity areas in a 2D/3D images

2 Downloads

Updated 08 Feb 2011

View Version History

View License

This function amplifies areas of high intensity and segments them using a front. The front is initialized on the convex hull (for speed) and erodes the map until it has converged on the edge of the areas to keep, maintaining edge geometry.

The idea and title for this function come from Dr. Tong Zhang's PhD Thesis (RPI, 2004), who used a fast marching level set method and a rapid change in gradient magnitude for the segmentation.

Cite As

Sean de (2021). shrinkWrap (https://www.mathworks.com/matlabcentral/fileexchange/29175-shrinkwrap), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

Habtamu Abraham

Habtamu Abraham

"Error: NARGIN and NARGOUT are not supported in parfor or SPMD blocks." Fix i used is add code nargout = 2; just above line code if nargout == 2; Medge = false(nr,nc,np); end ; The reason is the function expects two output [Mstore Medge] yet nargout is not set to any value so by seting nargout = 2; if condition is satisfied and output argument Medge is set hence, we get two output arguments.

ammu v

Error: File: shrinkWrap.m Line: 86 Column: 16
Using nargin/nargout without a function argument, or narginchk/nargoutchk is not supported in
parfor-loops or spmd statements. For more information, see Parallel for Loops in MATLAB, "nargin or
nargout Functions".

Stelios Fanourakis

I also get the error
Error: NARGIN and NARGOUT are not supported in parfor or SPMD blocks.

Has this been fixed?

javid farhadi

I have the same problem
Error: NARGIN and NARGOUT are not supported in parfor or SPMD blocks.

Samar Ragab

my error with this fn is
Error: NARGIN and NARGOUT are not supported in parfor or SPMD blocks.
how can i fix it plz?

ayesha abbassi

privatemeet none

Dear Sean, do you have some explanation of how all this work?

Sean de

Harsha,
What M-LINT error?
If you are using an older version of MATLAB, the tilde (~) does not work as an output argument. It's recommended in newer versions to use this for speed and that would probably create an error. If this is the case, the error would be on line 195. To fix it just replace the '~' with a junk variable (something like junk)

Harsha Vardhan

This file has some inherent mlint error, it does not run

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!