DicomScope 3.6.0 nonsquare pixel scaling bug
Moderator: Moderator Team
DicomScope 3.6.0 nonsquare pixel scaling bug
Hi,
I have created simple test image with:
Rows 128
Cols 256
PixelSpacing 0.2\0.1
The image shows a 20mm side long square. Actually pixel data width is two times longer than height but pixel spacing should made "real" data square.
My viewer, Tomovision and EFilm shows this image well (a square is visible) but DicomScope shows a rectangle. If I incorrectly change PixelSpacing to 0.5\0.1 DicomScope shows a square.
I have uploaded my test image for download and review at: https://rsr2.pl/offis/ScalingTEST1.dcm
Should I address this issue on comp.protocols.dicom ?
I have created simple test image with:
Rows 128
Cols 256
PixelSpacing 0.2\0.1
The image shows a 20mm side long square. Actually pixel data width is two times longer than height but pixel spacing should made "real" data square.
My viewer, Tomovision and EFilm shows this image well (a square is visible) but DicomScope shows a rectangle. If I incorrectly change PixelSpacing to 0.5\0.1 DicomScope shows a square.
I have uploaded my test image for download and review at: https://rsr2.pl/offis/ScalingTEST1.dcm
Should I address this issue on comp.protocols.dicom ?
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Hi,
I use DicomScope as a reference viewer when I test GSPS handling in my application. I thought that some IHE test also refer DicomScope as reference tool.
That's why I'm so alerted by this behavior.
I'm sorry if I'm not speaking my mind clearly.
Please download attached image and you will see a rectangle in "true size" mode in DicomScope. In EFilm and TomoVision you will see a square.
I believe true image should present a square instead of rectangle.
I use DicomScope as a reference viewer when I test GSPS handling in my application. I thought that some IHE test also refer DicomScope as reference tool.
That's why I'm so alerted by this behavior.
I'm sorry if I'm not speaking my mind clearly.
Please download attached image and you will see a rectangle in "true size" mode in DicomScope. In EFilm and TomoVision you will see a square.
I believe true image should present a square instead of rectangle.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Oh, the problem is not in scaling to true size, my bad.
The problem is in a way that DicomScope renders images having Pixel Spacing for rows different than Pixel Spacing for columns. If it is so,
DicomScope and many oder viewers tries to stretch image in such way that the image looks like it had square not rectangle pixel.
The problem is, DicomScope does it wrong.
Please take a look at the image I created.
It represents a square even if it has rows number not equal to columns number.
I believe if one took a look at it on dicomscope and f.e. tomovision everything would be clear.
The problem is in a way that DicomScope renders images having Pixel Spacing for rows different than Pixel Spacing for columns. If it is so,
DicomScope and many oder viewers tries to stretch image in such way that the image looks like it had square not rectangle pixel.
The problem is, DicomScope does it wrong.
Please take a look at the image I created.
It represents a square even if it has rows number not equal to columns number.
I believe if one took a look at it on dicomscope and f.e. tomovision everything would be clear.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Ok, in true size it is ok. But I'm still a little bit suspicious.
Please take a look at my example image in scale mode. You say that pixel spacing is not taken under consideration.
Why the image is four times longer than tall?
Let's do an another test. Take my image and change it's pixel spacing to for example 0.1\0.2 and open it in scale mode - it's square!
Is this behaviour ok?
Please take a look at my example image in scale mode. You say that pixel spacing is not taken under consideration.
Why the image is four times longer than tall?
Let's do an another test. Take my image and change it's pixel spacing to for example 0.1\0.2 and open it in scale mode - it's square!
Is this behaviour ok?
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Ok, now I got it You are right, there seems to be a bug with regard to the correct handling of the "pixel aspect ratio" in non-"true size mode". I've added this issue to our to-do list. However, there are currently no plans to release a new version in the near future.
Btw, the underlying DCMTK routines are correct – at least for version 3.5.4 and the latest snapshot. This can e. g. be checked with the dcm2pnm tool.
Btw, the underlying DCMTK routines are correct – at least for version 3.5.4 and the latest snapshot. This can e. g. be checked with the dcm2pnm tool.
pixel spacing in dicom
I've read the problem.
I have another problem,the size of example image is (columns)256/128(rows), while the pixel spacing is 0.2(vertical)/0.1(horiental), when display the image, it should be show in a square size not a rectangle, (128*128 or 256*256 or others) when the zomm factor is 1:1. If the Dicom stardard defined for that?
I have another problem,the size of example image is (columns)256/128(rows), while the pixel spacing is 0.2(vertical)/0.1(horiental), when display the image, it should be show in a square size not a rectangle, (128*128 or 256*256 or others) when the zomm factor is 1:1. If the Dicom stardard defined for that?
Who is online
Users browsing this forum: No registered users and 1 guest