Convert DICOM to TIFF

Hi I’m trying to convert a DICOM image to tiff, but the quality of the image is decreasing. Is a way to have a better resolution? This is the code I’m using.

using (DicomImage dicomImage = (DicomImage)Image.Load(sourceFilePath))
{
using (RasterImage rasterImage = dicomImage)
{
if (conversionSettings.Brightness <= 0)
conversionSettings.Brightness = 0;
rasterImage.AdjustBrightness(-Convert.ToInt32(conversionSettings.Brightness * 100));
saveOptions.ResolutionSettings = new ResolutionSetting(conversionSettings.Resolution,
conversionSettings.Resolution);
returnList.Add(destinationFilePath);
dicomImage.Save(destinationFilePath, saveOptions);
}
}

@ErikaP,

I have observed your comments. Can you please share source file so that we may further investigate to help you out. Also please share environment details and which Aspose.Imaging version you are using on your end.

i’m using Aspose.Imaging 17.9.0.0 with
OS Name Microsoft Windows 10 Pro
OS Version Microsoft Windows NT 6.2.9200.0
Total Physical Memory 7876 MB
Processor Name Intel® Core™ i7-4600M CPU @ 2.90GHz
Processor Family Intel64 Family 6 Model 60 Stepping 3
Processor Speed 2893 MHz
Screen Resolution 4246 * 1089
Color Quality 32

CR-MONO1-10-chest.zip (200.9 KB)
Untitled.jpg (116.2 KB)
with no compression and 300 dpi resolution.

Also a doubt, when the image does not have a skew, it rotate the original image. Can this be avoided?
I’m working with TIF images.
Original.jpg (1.9 KB)
Process.jpg (6.7 KB)

@ErikaP,

I have shared code snippet with you. This will help you to achieve requirements. Please share feedback with us if there is still an issue.

Image dicom = Image.Load(“CR-MONO1-10-chest.dcm”);

TiffOptions options = new TiffOptions(TiffExpectedFormat.TiffNoCompressionRgb );
options.ResolutionSettings = new ResolutionSetting()
{
HorizontalResolution = 300,
VerticalResolution = 300
};

            dicom.Save("CR-MONO1-10-chest.tiff", options);