how to get only the edges and make transparent the face on a superimposed cube
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Isabel
el 11 de Jun. de 2015
Respondida: Isabel
el 16 de Jun. de 2015
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 comentarios
Sreeja Banerjee
el 12 de Jun. de 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 )
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 15 de Jun. de 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 comentario
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!