Path: news.mathworks.com!not-for-mail
From: "carlos lopez" <clv2clv_00000000_@adinet.com.uy>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to make isosurface() work with uint8 data
Date: Fri, 9 May 2008 22:26:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <g02j1s$cop$1@fred.mathworks.com>
References: <g02f0e$k84$1@fred.mathworks.com>
Reply-To: "carlos lopez" <clv2clv_00000000_@adinet.com.uy>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210371964 13081 172.30.248.38 (9 May 2008 22:26:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 9 May 2008 22:26:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 870136
Xref: news.mathworks.com comp.soft-sys.matlab:467651


"Salmon " <yourfellow@yahoo.com> wrote in message
<g02f0e$k84$1@fred.mathworks.com>...
> I found isosurface() and isonormal() are very useful for
> processing 3D data sets.  However, my version (2007b), these
> functions only take "double" as input, which requires 8
> times more storage place. 
> 
> Does anyone help me how to make isosurface() work with 8-bit
> data, so I can process the 3d data in higher resolution?
Dirty and simple? instead of using isosurface() use
isosurface(double()).

A more elegant solution is to create a directory @uint8 in a
directory already in the PATH, and there store a
isosurface.m file which reads like this:

function handles=isosurface(varargin)
%converts any numeric parameter to type double
V=varargin;
for i=1:length(varargin)
    if isa(varargin{i},'extended')
        V{i}=double(varargin{i});
    end
end
handles=isosurface(V{:});
Hope this helps
Regards
Carlos