473,805 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5521
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*******@gmai l.com> wrote in message
news:11******** *************@y 43g2000cwc.goog legroups.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*******@gmai l.com> wrote in message
news:11******** *************@y 43g2000cwc.goog legroups.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@_spamkille r_.bobpowell.ne t> wrote:
Unfortunatel y 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.PixelFo rmat.Format16bp pRgb555,
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
4098
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 need to rotate the image and the see the result everytime. For this my boss has given me suggestion to display only 20% of the image on window ,and rotation has to be applied to original copy.
1
4414
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 image in a byte of what is in the database. I also want to be able to display this image in an <asp:image></asp:image> control. Is there any way to do this? Most of the examples that I've seen have used
2
6581
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 need to access this Viewer in my C# coding so that i can add image to that Dicom Viewer. please help me dude ,
1
4695
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 Dicom image.plz guide me. regards Neeraj
3
6449
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 imagebuttons which point to a dummy page that takes the image and displays it via response. All works fine if I use explicit paths to a file (response.writefile(<filename>) or directly pass through the database image...
2
3086
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
14426
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 and the image from the database also in one web page... how can i do this? pls help..... thanks.
2
6061
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 "Content-type: text/html\n\n"; print "<body bgcolor="FFFF">; print "<img src=\cgi-bin\header.jpg>"; print "</body>;
0
2055
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 subject. Im very new in php.. and learn coding by using modifying existing coding.. i dont really understand PHP coding :P anyway.. now im having a problem where by.. the description is already out according to their product_id .. but my image only...
1
10370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.