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 7976795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:00:21+00:00 2026-06-04T09:00:21+00:00

I am developing a dicom viewer in c#.net . I need a little help

  • 0

I am developing a dicom viewer in c#.net . I need a little help on calculating the HU Value of Pixel . I know the formula for calculating the HU is ,

  HU = Pixel Value * Rescale Slope + Rescale Intercept 

I made some calculations and retrieved from my original dicom pixel value but thats not giving me the right HU value . My question is what is exactly the pixel value . Anyone Help Me On this .

This is my code

 public void calculateHU(string x,string y)
        {
            Int32 intercept, slope,pix;
            intercept = -1024;
            slope = 1;
            int xx, yy;
            xx = Convert.ToInt32(x);
            yy = Convert.ToInt32(y);
            xx = xx +Convert.ToInt32( imagerect.X);
            yy = yy + Convert.ToInt32( imagerect.Y);
            pix =  getpixelvalue(xx,yy);
            double hu = pix * slope + intercept;

        }

        public Int32 getpixelvalue(int x, int y)
        {
            string c;
            c = pix16[imgno][y * bmd.width + x].ToString();
            return Convert.ToInt32(c);
        }
  • 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-06-04T09:00:22+00:00Added an answer on June 4, 2026 at 9:00 am

    If Pixel Representation (0028,0103) is set to 0 (unsigned), the Pixel Data values should be non-negative. According to your example where the intercept and slope are -1024 and 1, respectively, the raw pixel value would have to be -4 to yield HU value -1028.

    If you are expecting to obtain resulting HU values as low as -1028, this is most probably managed through a negative enough Rescale Intercept value (and potentially Rescale Slope) value instead.

    Rather than hard coding Rescale Intercept and Slope, grab these values from the image, tags (0028,1052) and (0028,1053) respectively, and apply in the HU calculation.

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

Sidebar

Related Questions

Developing a C# .NET 2.0 WinForm Application. Need the application to close and restart
I am developing a dicom image archiving and viewer for hospitals. Since 2 weeks
Developing a project of mine I realize I have a need for some level
When developing a .Net web application, if a run time error is generated, it
I'm developing a small project concerned with dicom imaging. In my project, a user
Developing for iPhone, I have a collection of points that I need to make
Developing a multilingual application in VB.Net 2008, Im able to add resources to forms
Developing a Struts 2 app I run in a following problem. I need to
Developing an MVC application, i now need to have test other browser versions. Installed
Developing with jQuery's TipTip (http://code.drewwilson.com/entry/tiptip-jquery-plugin). What I need is to show all of 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.