Open a bmp file for medical study

I need some help for a research project

Page 1 of 1

6 Replies - 4411 Views - Last Post: 16 November 2005 - 07:48 PM Rate Topic: -----

#1 statbiz1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 12-November 05

Open a bmp file for medical study

Posted 12 November 2005 - 08:44 AM

I need to have C++ open a bmp file. and go through pixel by pixel and find any pixel that is not white. When it finds one it needs to record the location of the pixel (in normal x,y coordinates) to a file. Once I have the file I can then calculate area statistics etc by use of statistical software. Does this sound possible?
statbiz1@aol.com
Is This A Good Question/Topic? 0
  • +

Replies To: Open a bmp file for medical study

#2 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Open a bmp file for medical study

Posted 12 November 2005 - 05:15 PM

Yes.
Was This Post Helpful? 0
  • +
  • -

#3 Vextor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 313
  • Joined: 22-May 02

Re: Open a bmp file for medical study

Posted 13 November 2005 - 12:10 AM

Very interesting idea yet I fear the conecept is unoriginal as whole. Somone I know had done this exact thing except for a far different purpose. I have an idea of how this can be achived yet I'm not entirely sure I can spew the code out here and now. If I get the time later I'll check it out.
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: Open a bmp file for medical study

Posted 13 November 2005 - 07:55 AM

I don't think the user is proposing it as a change in technology, or a new idea. Checking pixel color is a technique that has been around for more than a decade...it is the basis for many of the major medical imaging technologies. Most 'out of the box' medical scanning programs use this technique in one form or another.
Was This Post Helpful? 0
  • +
  • -

#5 statbiz1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 12-November 05

Re: Open a bmp file for medical study

Posted 16 November 2005 - 06:59 PM

I can be more specific here, that may help. There are two different disorders that I think I can demonstrate a significant difference in diagnosis patterns on a spiromitor. This would help docs determine between Asthma or Vocal Cord Dysfunction (VCD). I would like to scan the inhalation loop into a bmp file and then write a program that quantifies the graphic. (Abstracts the pixel locations as graphic x,y points). Once I have that I can take groups of patients with both illnesses and see if the computer will spot the difference. I have done one of these by hand and it takes forever. I have already written the code in R that does the statistics but I cant seem to do the scans in C++ or any other language for that matter. I'm a statistician not a programmer. Statbiz1@aol.com
Was This Post Helpful? 0
  • +
  • -

#6 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: Open a bmp file for medical study

Posted 16 November 2005 - 07:13 PM

Are you aksing if you can actualy scan the photo into digital format using a c++ application, or if you can write an application in c++ that can open a photo file at proces it pixel by pixel?

A picture can certainly be processed pixel by pixel...the difficulty you will encounter is defining exactly what 'white' is to the application. You'll have to be able to specify an exact color (or range of colors) that qualify as white. What look 'white' to the eye may not process as white to an application.
Was This Post Helpful? 0
  • +
  • -

#7 statbiz1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 12-November 05

Re: Open a bmp file for medical study

Posted 16 November 2005 - 07:48 PM

Yes, I will have the inhalation loop scanned into a bmp file and cleaned by hand so that the white is as pure as I can make it and that the only other color will be the black loop. I would then save the bmp file and I would like c++ to open the file. Start in one corner and move through pixel by pixel and when the pixel is not white it will record the x,y 'point' in a file and skip to the next pixel and loop around until done.
I understand your comment about the range of whites, can I dumb the computer down to only see 16 colors? Once I have this long list of x,y pairs of data I can then run a R program that redraws the loop and does statistical analysis on it. This last part is done.
Thanks in advance for any advice. statbiz1@aol.com
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1