-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
- The image on the left is drawn from the function
imageFromPixels(size:pixels:width:height:)in the file DicomImage.swift - The image on the right is using the ImageJ tool to open it.
You can also see the color difference between the two pictures.
After I investigate on google it may be necessary to set the bitmapInfo parameter to set the correct color ? Do you have any solution for the above problem?
if let cgim = CGImage(
width: width,
height: height,
bitsPerComponent: self.bitsAllocated,//self.bitsStored,
bitsPerPixel: self.bitsAllocated,
bytesPerRow: self.bytesPerRow, // -> bytes not bits
space: self.colorSpace,
bitmapInfo: bitmapInfo,
provider: providerRef!,
decode: nil,
shouldInterpolate: true,
intent: .defaultIntent
) {
return cgim
}
Data: Resources/DICOM/MR_ImplicitVRLittleEndian_MULTI_MONOCHROME2_Philips_RTNC1_33.dcm
Metadata
Metadata
Assignees
Labels
No labels
