Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6818987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:14:41+00:00 2026-05-26T21:14:41+00:00

I have a double 2D image that I want to use in my UI

  • 0

I have a double 2D image that I want to use in my UI that I made with guide. I have a axis handle which I want to draw it to. I tried this with no success, my image is all blue.

    function ComputeMap_Callback(hObject, eventdata, handles)
% hObject    handle to ComputeMap (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global healthyImage;
global sickImage;
global tumorMapImage;
global costFunction;
if(get(handles.radiobuttonMSE,'Value') == get(hObject,'Max'))
    costFunction = 0;

else

    costFunction = 1;
end
disp(costFunction);
tumorMapImage = mexFunction(im2double(sickImage),im2double(healthyImage),get(handles.blockSize,'Value'),get(handles.windowSize,'value'), costFunction);

image(tumorMapImage,'parent',handles.sImageGUI);

This mexFunction returns a double 2D image. If I just call this function without matlab and imShow (resultImage); I get the right result. So I believe it has something to do with the colormapping of the double and the fact that the image is not 3D but 2D. But I am 0 familiar with gui in matlab to be sure what to do. I’ve done some more researches and I think my problem might be related to the AlphaData property, but I don’t know what to do with that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:14:42+00:00Added an answer on May 26, 2026 at 9:14 pm

    your image values must be in range [0, 1] in order to be plotted properly by the image function.

    imshow works because it first looks at the min and max value in your image and then scales values to match this range. or so. (maybe it works differently internally, but whatever..)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that will update many times a second. I want to
I have double values which I would like to convert to String values with
Let’s say I have double length that can be either a real length or
Right now I have double numba = 5212.6312 String.Format({0:C}, Convert.ToInt32(numba) ) This will give
I have a specific requirement that all children of a particular JComponent have double
i have a double, the decimal place isn't fix (8-?) i want to fix
I have a Delphi 6 application that receives and processes an image stream from
I want to have a webview that has a single HTML and a single
I have a small project I am working on which is WPF c# that
I have an image that I am using as a button but on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.