Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Overlaying 2 volumetric objects with different transparency

Subject: Overlaying 2 volumetric objects with different transparency

From: Junghyun

Date: 8 Sep, 2010 07:40:07

Message: 1 of 4

Hello Everyone,

I am trying to overlay one 3D image(indexed as 1) onto another 3D object image(indexed as 2).
I am using isosurface, isonormal, and transparency functions given in matlab. But running the program looked OK at first but eventually caused an internal problem .
What's wrong with the code?
code looks like this....

 [R C S] = size(max_img);
 
 v = max_img; v=double(v);
 x = 1:R; y= 1:C; z=1: S;
  
    p1 = patch(isosurface(x,y,z,v,1));
isonormals(x,y,z,v,p1);
set(p1,'facecolor','yellow','edgecolor','none');
 alpha(0.3); grid on; hold on;

   p2 = patch(isosurface(x,y,z,v,2));
isonormals(x,y,z,v,p2);
set(p2,'facecolor','red','edgecolor','none');
 alpha(0.7); grid on; hold off;
 

Thank you.
Junghyun

Subject: Overlaying 2 volumetric objects with different transparency

From: Junghyun

Date: 9 Sep, 2010 04:17:04

Message: 2 of 4

Figured that out.
Thanks.

Subject: Overlaying 2 volumetric objects with different transparency

From: Nicholas

Date: 13 May, 2011 16:24:05

Message: 3 of 4

"Junghyun" wrote in message <i69n40$6va$1@fred.mathworks.com>...
> Figured that out.
> Thanks.

can you post the solution?? i'm trying to do just this and have trouble.

Subject: Overlaying 2 volumetric objects with different transparency

From: Nicholas

Date: 13 May, 2011 16:25:05

Message: 4 of 4

"Junghyun" wrote in message <i69n40$6va$1@fred.mathworks.com>...
> Figured that out.
> Thanks.

can you post the solution?? i'm trying to do just this and have trouble.

Tags for this Thread

No tags are associated with this thread.

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.

Contact us