about windows center and windows width
Moderator: Moderator Team
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
about windows center and windows width
hi, there,
i am wondering if the attribute has to be exist inside dicom file, so one can display it with center and width changeable.. i mean, if i didn't write any information when creating such dicom file, no dicom viewer can display it with center and width changed. right?
please help me clarify this confusion.. thank you very much.
winston.
i am wondering if the attribute has to be exist inside dicom file, so one can display it with center and width changeable.. i mean, if i didn't write any information when creating such dicom file, no dicom viewer can display it with center and width changed. right?
please help me clarify this confusion.. thank you very much.
winston.
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
also
also, where to change the center and width in the code, right before createWindowsDIB()?
i did that, but no any effect for the result dib image displaying.
it is put in the right place?
thank you.
i did that, but no any effect for the result dib image displaying.
Code: Select all
di->SetWindow(c,w);
di->createWindowsDIB(data,0,24,1);
//.....display data.
thank you.
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
yes
throught experienment, i found there is no center/width changeable in RGB dicom file.. it only works in 8 bits graylevel dicom image.. even i created than the same way
it's that so? SetWindow(center, width) doesn't work for 24bit dicom image?
thank you very much.
winston
it's that so? SetWindow(center, width) doesn't work for 24bit dicom image?
thank you very much.
winston
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
yes, sir.
now i understand, and can set it so the outcome image has different display effect.
i have another post, could you look it for me. that is, i have this GE ultrasound dicom file, i can measure distance in millimeter, but don't have pixelspacing tag.. how that can be?
the thing is, i set this pixelspacing value in my created dicom, but the measuring distance is not it should be (pixelspacing x pixel number).
so i want to know how the file i mentioned store such information.
the dump file in another post:
thank you very much.
winston
viewtopic.php?t=2459
now i understand, and can set it so the outcome image has different display effect.
i have another post, could you look it for me. that is, i have this GE ultrasound dicom file, i can measure distance in millimeter, but don't have pixelspacing tag.. how that can be?
the thing is, i set this pixelspacing value in my created dicom, but the measuring distance is not it should be (pixelspacing x pixel number).
so i want to know how the file i mentioned store such information.
the dump file in another post:
thank you very much.
winston
viewtopic.php?t=2459
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
hi
hi, Jorg
thank you for answering my question.
but, today, i found using Sante DICOM Viewer, it can adjust window center/width even to RGB color dicom file.. why is it so?
really.. i read several post here, and also you said. window leveling only works for monochrom dicom.. but i save a 24 bit RGB color dicom file, the Sante DICOM viewer also can adjust center/width... why? also, i simply convert a jpg file to dicom file (with img2dcm.exe), the resulting dicom file also can be adjusted center/width in Sante DICOM viewer.
please tell me how to do it..
thank you very much.
winston
thank you for answering my question.
but, today, i found using Sante DICOM Viewer, it can adjust window center/width even to RGB color dicom file.. why is it so?
really.. i read several post here, and also you said. window leveling only works for monochrom dicom.. but i save a 24 bit RGB color dicom file, the Sante DICOM viewer also can adjust center/width... why? also, i simply convert a jpg file to dicom file (with img2dcm.exe), the resulting dicom file also can be adjusted center/width in Sante DICOM viewer.
please tell me how to do it..
thank you very much.
winston
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
confusing
even if i convert the DicomImage to monochrome one, i still can not use window leveling, if the original dicom file is 24 bit RGB dicom.
not working..
how can i do window leveling for 24 bit RGB dicom?
thanks a lot.
winston
Code: Select all
DicomImage *di = new DicomImage(...)
DicomImage *image = di->CreateMonochromeImage(...)
delete di;
di = image;
di->setWindow(wCenter,wWidth);
di->createWindowsDIB(data, 0, frame)
how can i do window leveling for 24 bit RGB dicom?
thanks a lot.
winston
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
If the image is monochrome (or converted to monochrome), you can use VOI transformation with DCMTK as dcm2pnm with option --grayscale (+G) shows. E.g.
Btw, a 24-bit RGB image converted to grayscale results in 8 bits per pixel (max. 256 shades of gray). Why do you want to apply windowing to such an image?
Code: Select all
dcm2pnm +G +Ww 100 100 image.dcm image.pgm
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
thank you, jorg..
you meant: when i use di->CreateMonochromeImage() it's actually became a 8 bit gray image? oh.. then, that's not what i want.
what i want is that the effect the Sante DICOM viewer shows me. when it display a 24 bit RGB dicom, simply adjust the center/width bar, the displaying effect changs along, i.e. the contrast/brightness changes,(all color,R,G,B simultaneously). just like in grayscale dicom i did for window center/width.. i would achieve such effect..
but , with di->setWindow(c,w); di->CreateWindowsDIB(data,0,1,24) i cann't get it. (i found in the source code of setWindow(), it indeed requires monochrome..
what i really want is to window leveling the 24 bit RGB dicom file.. obviously setWindow() stops there since it judged di->isMonochromePtr() first..
so, what can i do?
thank you very much!.
winston.
Code: Select all
Btw, a 24-bit RGB image converted to grayscale results in 8 bits per pixel (max. 256 shades of gray). Why do you want to apply windowing to such an image?
what i want is that the effect the Sante DICOM viewer shows me. when it display a 24 bit RGB dicom, simply adjust the center/width bar, the displaying effect changs along, i.e. the contrast/brightness changes,(all color,R,G,B simultaneously). just like in grayscale dicom i did for window center/width.. i would achieve such effect..
but , with di->setWindow(c,w); di->CreateWindowsDIB(data,0,1,24) i cann't get it. (i found in the source code of setWindow(), it indeed requires monochrome..
what i really want is to window leveling the 24 bit RGB dicom file.. obviously setWindow() stops there since it judged di->isMonochromePtr() first..
so, what can i do?
thank you very much!.
winston.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
You are mixing things up here: window/level is not brightness/contrast. I don't know what Sante viewer does but window levelling according to DICOM is only defined for grayscale images (see other postings).
DCMTK does not support brightness/contrast settings because it's not really useful for medical images. Of course, you can implement this function for monochrome and color images if you like.
DCMTK does not support brightness/contrast settings because it's not really useful for medical images. Of course, you can implement this function for monochrome and color images if you like.
-
- Posts: 31
- Joined: Wed, 2010-03-24, 17:14
Although DICOM does not define window levelling for RGB images, it is logically just the same as levelling for monochrome images, you just treat each colour layer as a separate monochrome image that are all adjusted by a single control. Although the precision is a mere 8 bits, being able to modify it is in my experience quite useful, and the lack of support for in DCMTK for this was somewhat disappointing.
Who is online
Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Google [Bot] and 1 guest