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
 Image color issue with DICOM format
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

schiva

4 Posts

Posted - Apr 08 2014 :  18:47:54  Show Profile  Reply
I want to change image file format to DICOM.
So, I made simple function.
But there were problem.
Image quality was changed when i convert image file format.
Source Bitmap image was ok. But DICOM image was not good.
(-- I attaced Bitmap file and DICOM file.
-- I used ImageEn_5.0.6B_22451_Setup.exe )

[ my simple function ]
------------------------------
procedure BitmapToDicom(srcBMP, targetDICOM:String);
var
  imgEn: TImageEnView;
begin
  imgEn := TImageEnView.Create(nil);
  try
    imgEn.IO.LoadFromFile(srcBMP);
    imgEn.IO.Params.DICOM_Compression := iedcUncompressed_Implicit;
    imgEn.IO.Params.DICOM_JPEGQuality := 100;
    imgEn.IO.SaveToFileDICOM(targetDICOM);
  finally
    FreeAndNil(imgEn);
  end;
end;





Download Attachment: 201448184625_Image.zip

xequte

38613 Posts

Posted - Apr 08 2014 :  23:58:36  Show Profile  Reply
Hi

As you are setting DICOM_JPEGQuality did you try using using one of the JPEG formats (such as iedcJPEG) for DICOM_Compression?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

schiva

4 Posts

Posted - Apr 10 2014 :  02:07:26  Show Profile  Reply
I alreay tried. But there was same "color change issue".
Go to Top of Page

xequte

38613 Posts

Posted - Apr 15 2014 :  14:29:19  Show Profile  Reply
Hi

In our tests it works fine if you specify the correct compression:

------------------------------
procedure BitmapToDicom(srcBMP, targetDICOM:String);
var
  imgEn: TImageEnView;
begin
  imgEn := TImageEnView.Create(nil);
  try
    imgEn.IO.LoadFromFile(srcBMP);
    imgEn.IO.Params.DICOM_Compression := iedcJPEG;
    imgEn.IO.Params.DICOM_JPEGQuality := 100;
    imgEn.IO.SaveToFileDICOM(targetDICOM);
  finally
    FreeAndNil(imgEn);
  end;
end;


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: