ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to Save DICOM file without color change?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

gildata

Korea
4 Posts

Posted - May 01 2014 :  15:15:25  Show Profile  Reply
I tried convert DICOM fie from jpg image using DICOM DEMO.
Source is bellow.

// Save as DICOM
procedure TMainForm.btnSaveAsDicomClick(Sender: TObject);
begin
SaveImageEnDialog1.AutoSetFilterFileType := ioDicom;
SaveImageEnDialog1.Filename := '';
ImageEnMView1.MIO.Params[0].DICOM_Compression := iedcJpeg ;
ImageEnMView1.MIO.Params[0].DICOM_JPEGQuality := 100;
if SaveImageEnDialog1.Execute then
begin
ImageEnMView1.MIO.SaveToFileDICOM( SaveImageEnDialog1.FileName );
end;
end;

But obtained color is different JPG image and DICOM file.
How to DICOM file save?

Attached files.
Thank you.

Source Image:




DICOM image:

xequte

38510 Posts

Posted - May 04 2014 :  19:43:00  Show Profile  Reply
Hi

Check the color depth of the image, e.g.

ImageEnMView1.MIO.Params[0].SamplesPerPixel := 3;
ImageEnMView1.MIO.Params[0].BitsPerSample := 8;
ImageEnMView1.MIO.DuplicateCompressionInfo;
for i := 0 to ImageEnMView1.ImageCount - 1 do
begin
  ImageEnMView1.GetTIEBitmap(i).PixelFormat := ie24RGB;
  ImageEnMView1.ReleaseBitmap(i);
end;
ImageEnMView1.MIO.Params[0].DICOM_Compression := iedcJpeg ;
ImageEnMView1.MIO.Params[0].DICOM_JPEGQuality := 100;

ImageEnMView1.MIO.SaveToFileDicom( SaveImageEnDialog1.FileName );


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: