i try to create a clipped version of a DICOM image, the clip starting and ending outside the image, but with a vali intersection. For example the image is a tall rectangle of 512x1812, and my clip is a wide rectangle of 1812x512 is the middle.
I use the DcmImage::createClippedImage method, but it returns an image with all pixels set to 0.
I traced into the code and found out that in DiMono1Image::createScale, the left and top positions of my clip is casted to Uint16:
DiImage *image = new DiMono1Image(this, OFstatic_cast(Uint16, left_pos), OFstatic_cast(Uint16, top_pos), ...);
which will trigger a condition inside scaleData (in discalet.h) to call fillPixel.
If i fix the cast to Sint16 in DiMono1Image::createScale, then it works fine. scaleData will call clipBorderPixel and I get my clipped image with borders.
bug in DiMono1Image::createScale ?
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Bing [Bot] and 1 guest