color 3d plot by depth
    4 ビュー (過去 30 日間)
  
       古いコメントを表示
    
    Emily Pendleton
 2019 年 1 月 22 日
  
    
    
    
    
    コメント済み: Emily Pendleton
 2019 年 1 月 23 日
            Hello,
I am trying to take this binary 3D plot and color code the layers by depth. For example if z =1, all pixels are red; if z = 25, all pixels are orange, etc...I would like the color scale to be continuous. Any help on this would be appreciated. This is what I have thus far:
stack = tiff(:,:,:);
T = adaptthresh(stack, 0.57,'neigh', [99 99 99], 'ForegroundPolarity', 'dark');
bw = imbinarize(stack,T); %applies adaptive threshold to image
x = 1:size(stack,2);
y = 1:size(stack,1);
z = 1:size(stack,3);
figure(1),isosurface(x,y,z,stack,0.5)

1 件のコメント
  Brian Hart
      
 2019 年 1 月 22 日
				You can probably do this by changing the figure color map. It would help to have the input TIFF file to play with.
採用された回答
  Walter Roberson
      
      
 2019 年 1 月 22 日
        See https://www.mathworks.com/help/matlab/ref/isosurface.html#bq349vy-1 for an example of coloring by x. In the isosurface() call in that example, you would replace the final x by z to color by z.
5 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Polygons についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


