how to get only the edges and make transparent the face on a superimposed cube
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I have created a cube and superimposed to a dicom image. What I need to do now is to make transparent the faces of the cube, thus, only the edges of the cube are seen. The way that I create the cube and superimposed to the dicom image is:
[M,N,L] = size (imag);
cube = zeros(info_imag.Width, info_imag.Height, L);
cube(location(1,1)-10:(location(1,1)+9, (location(2,1)-10:(location(2,1)+9, (location(3,1)-10:(location(3,1)+9) = 0.3;
I = (int16(1000*cube))+imag;
Could someone suggest an idea on how to do that?
댓글 수: 2
Sreeja Banerjee
2015년 6월 12일
Hi Isabel, Since we do not have access to your data and you have not explained the variables that you have used in your code, it is difficult to give you any specific suggestion. In the code I could not find how you are displaying the cube.
However, if your question is specifically on how you can make the faces of the cube transparent then have you considered using the function ALPHA ( documentation )
If you are using a surface or patch to draw the faces of the cube, then you can modify the 'FaceAlpha' property to make it transparent. ( documentation )
채택된 답변
추가 답변 (1개)
Walter Roberson
2015년 6월 15일
You indicate that you SliceBrowser(test) but you have not defined test in what you show, only cube.
SliceBrowser() is using imagesc() to do the work of drawing the slices. SliceBrowser does not manipulate transparency at all. If I read the source correctly the only edges it draws explicitly are crosshairs. I see no reason to say that assigning 0 or 1 affects transparency when using SliceBrowser: it just controls the data value that are put through colormap processing.
If you want to continue using SliceBrowser then you will need to set a thin shell of pixels around the outside of the area you want pointed out.
But really if you want to talk about faces and edges and transparency you should be using some other display mechanism such as patch() or surface().
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!