ROI - limiting the length of a crosshair

5 ビュー (過去 30 日間)
Teshan Rezel
Teshan Rezel 2021 年 3 月 19 日
コメント済み: Teshan Rezel 2021 年 3 月 22 日
Hi there,
I am currently displaying a circle and crosshair together on one image. However, is it possible to do this without showing the whole length of the crosshair? I want it to end at the radius of the circle.
Below is an image of what I'm currently getting. I'd like to make it such that the crosshair ROI doesn't extend past the circle ROI. Is this possible?
thanks
h = images.roi.Crosshair(gca, 'Position', position6, 'Color', 'w');
h = images.roi.Circle(gca,'Center', position6,'Radius',100, 'Color', 'w', 'FaceAlpha', 0);
h = images.roi.Crosshair(gca, 'Position', position7, 'Color', 'w');
h = images.roi.Circle(gca,'Center', position7,'Radius',100, 'Color', 'w', 'FaceAlpha', 0);
  2 件のコメント
Image Analyst
Image Analyst 2021 年 3 月 19 日
You forgot to show us the commands you're using to show the graphics in the overlay.
Teshan Rezel
Teshan Rezel 2021 年 3 月 19 日
@Image Analyst good point, I've updated it!

サインインしてコメントする。

採用された回答

Tarunbir Gambhir
Tarunbir Gambhir 2021 年 3 月 22 日
編集済み: Tarunbir Gambhir 2021 年 3 月 22 日
I see that you are trying to shorten the size/length of the displayed crosshair. I do not see any property of the crosshair function that might allow you to do so. I have notified the concerned developers regarding this request.
If you just want to display the crosshair on top of the image, you could try the following as a workaround to it:
hold on;
plot(position6(1),position6(2),'r+', 'MarkerSize', 50);
h = images.roi.Circle(gca,'Center', position6,'Radius',100, 'Color', 'w', 'FaceAlpha', 0);
Note that you would not be able to interact with this marker on the image as you can with a crosshair object.
  1 件のコメント
Teshan Rezel
Teshan Rezel 2021 年 3 月 22 日
thank you, this works beautifully!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by