Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: How to make isosurface() work with uint8 data

Subject: How to make isosurface() work with uint8 data

From: Salmon

Date: 09 May, 2008 21:17:02

Message: 1 of 5

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?

Subject: Re: How to make isosurface() work with uint8 data

From: carlos lopez

Date: 09 May, 2008 22:26:04

Message: 2 of 5

"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

Subject: Re: How to make isosurface() work with uint8 data

From: carlos lopez

Date: 09 May, 2008 22:27:03

Message: 3 of 5

Oops! replace the word "extended" by "uint8"
Regards
Carlos

Subject: Re: How to make isosurface() work with uint8 data

From: Salmon

Date: 12 May, 2008 13:42:03

Message: 4 of 5

Carlos,

Your solution is not the solution I am looking for. It did
not improve any performance. What I meant is that "double"
is 64 bit, while uint8 is 8 bit. You see, there is 8 times
memory and calculation savings. That's very significant
memory saving and speed improvement. Besides, almost all
real-world 3D data sets are either 8 bit or 16 bit.

Is there somewhere that I can find the isosurface source
code, and replace all the double to uint8? I think MW
should make all those 3D related function take 8 bit data.

Thanks,

> 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:
> > handles=isosurface(V{:});
> Hope this helps
> Regards
> Carlos
>

Subject: Re: How to make isosurface() work with uint8 data

From: Salmon

Date: 12 May, 2008 13:46:04

Message: 5 of 5

BTW: if you look at the isosurface, inside you find that it
actually calls for a mex function isosurf(), which I assume
is a C/C++ or Fortran function. Does anyone know how to get
the source code for that function?

"carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote in
message <g02j1s$cop$1@fred.mathworks.com>...

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
isonormal Salmon 09 May, 2008 17:20:05
3d Salmon 09 May, 2008 17:20:05
isosurface Salmon 09 May, 2008 17:20:05
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics