how to get only the edges and make transparent the face on a superimposed cube
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Sreeja Banerjee
am 12 Jun. 2015
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 )
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 15 Jun. 2015
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().
1 Kommentar
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!