473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to display 16bit dicom image

hi
I am working on dicom viewer. 8 bit raw dicom image working
properly.But 16 bit Dicom image is not showing.What Should i have to
do.You have any idea about That to convert it in 8bit .
regards
Neeraj

May 18 '06 #1
5 5474
Unfortunately the 16 bit image formats in GDI+ are all broken.

You will have to open the image, read it byte for byte and then write it to
a newly created image, perhaps a GIF in your case.

See the GDI+ FAQ for info on the LockBits method which will be essential and
the GIF palette article which will enable you to create a custom monochrome
palette.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Neeraj" <kn*******@gmail.com> wrote in message
news:11*********************@y43g2000cwc.googlegro ups.com...
hi
I am working on dicom viewer. 8 bit raw dicom image working
properly.But 16 bit Dicom image is not showing.What Should i have to
do.You have any idea about That to convert it in 8bit .
regards
Neeraj

May 18 '06 #2
Unfortunately the 16 bit image formats in GDI+ are all broken.

You will have to open the image, read it byte for byte and then write it to
a newly created image, perhaps a GIF in your case.

See the GDI+ FAQ for info on the LockBits method which will be essential and
the GIF palette article which will enable you to create a custom monochrome
palette.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Neeraj" <kn*******@gmail.com> wrote in message
news:11*********************@y43g2000cwc.googlegro ups.com...
hi
I am working on dicom viewer. 8 bit raw dicom image working
properly.But 16 bit Dicom image is not showing.What Should i have to
do.You have any idea about That to convert it in 8bit .
regards
Neeraj

May 18 '06 #3
"Bob Powell [MVP]" <bob@_spamkiller_.bobpowell.net> wrote:
Unfortunately the 16 bit image formats in GDI+ are all broken.
You will have to open the image, read it byte for byte and then write it to
a newly created image, perhaps a GIF in your case.
See the GDI+ FAQ for info on the LockBits method which will be essential and
the GIF palette article which will enable you to create a custom monochrome
palette.


I'm suspicious of a recommendation to use LockBits and read it byte
for byte. (But also I didn't understand the original question).

Bob, you say that the 16 bit formats are broken. Does that suggest
that the 32bit formats work, and that the original poster could have
done what they wanted if it were 32bit rather than 16bit?

If so, a better answer would be to use BitBlt to convert the 16bit
image to 32bit, and then go from there. After all, 16->32bit
conversions are already built into Windows and are very fast.

--
Lucian
May 18 '06 #4
Hi
actually 16 bit Dicom Image is opening in c# when i apply the
Format:-System.Drawing.Imaging.PixelFormat.Format16bppRgb5 55,
but output image is Not as good in the other commercial viewer images
..so it will be great if you can help me by providing a code snippet in
c# ,or please tell me how to convert from 16-bit to 32 bit.Please note
that i am new to dicom, and also as lucian suggested how to use BitBit
equivalent in c#.

May 23 '06 #5
Hi friends.
I just want to say that Instead Of Converting 16bit to 32bit is more
complicated than Converting into 64bit .
I already tried it and its works properly.and After using unsafe it is
fast also.

May 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Deepa | last post by:
Hi All, I'm facing problem displaying image of size 5000X5000 .My window size is smaller than image size so i'm not able to see the complete image.i can use scroll bars to view the image but i...
1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
2
by: Jayender | last post by:
Hello , I need to add a ActiveX control ...the Dicomviewer in ASP>net .. I am able to do it fine in C# project but not in web application I add that Dicom dll (.ocx file) in my ASP.Net form I...
1
by: Neeraj | last post by:
Hi guys, I am currently working on Dicom image of format jpeg. I am searching about that on net but not getting much more. If any body knows C# source code which open at least on type of jpeg...
3
by: Dave Keen | last post by:
Hi all. Hope you can help me. This should be easy but I can't make this work. In brief I am building a page of thumbnails using images held in a SQLServer 2000 database. I do this by creating...
2
by: ranjeshh | last post by:
How do I display a jpeg image using c..Please gude me as I m new to image processing..I would appreciate if someone could give me a working code with explanation
6
by: msmjsuarez | last post by:
how can i display both image and other information in the web page using php? i'm using mysql database. I do displaying the image only but i want to display both other information from the database...
2
by: santhanalakshmi | last post by:
Hi, I am running Apache and the Active Perl. In Apache, CGI folder, i had one JPEG image. I wants to display this JPEG image in my browser as the header. use CGI qw(:all); print...
0
by: anakramli | last post by:
Salam, first of all i would like to say hi all.This is my first time posting question over here. Basically im trying to make a simple product list to be display over our web project development...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.