Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, January 23, 2014 3:16:06 PM(UTC)

Forhad  
Forhad

Groups: Registered
Posts: 3


I want to convert JPG file to DCM file. Is there any sample example to convert JPG to DCM using c# console application?

I am using rastercodes to convert but it is not generating valid dcm file which can be used in Merge HealthCare's EFilm software.

Need help urgently please.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, January 26, 2014 1:01:26 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Please take a look at Print To PACS Demo that ships with our SDK. You can find the demo's source code in the following folder:
[LEADTOOLS 18]\Examples\PACSFramework\CS\PrintToPACSDemo

Note that you need to use a Secondary capture Template dataset with the DicomDataset class and fill all required element with proper values.
The MWL SCU demo is another sample that shows how to create a DICOM dataset. You can find the demo in this folder:
[LEADTOOLS 18]\Examples\PACSFramework\CS\DicomHighLevelMWLScuDemo

Thanks,
Maen Badwan
LEADTOOLS Technical Support

 
#3 Posted : Monday, January 27, 2014 8:01:03 PM(UTC)

Forhad  
Forhad

Groups: Registered
Posts: 3


Thank you for your email. I have seen the example. I am facing problem to load the Module data after the dataset.Load() method call. No Module is loading. I am writing a simple console application.

DicomModule module = sourceDataSet.FindModule(DicomModuleType.GeneralStudy);

this is my code and module is null. Is there any specific process to load the dll or licensing stuff?
 
#4 Posted : Tuesday, January 28, 2014 4:54:05 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

I apologize because my previous reply was not accurate.

You can create a new DICOM dataset and set the pixel data to JPEG image that you want. You can use the DicomDataSet Class as follows:
+----------+
DicomDataSet ds = new DicomDataSet();
+----------+

After this, you need to load the JPEG image by using the RasterCodecs.Load() method:
+------------+
Leadtools.Codecs.RasterCodecs _codecs = new Leadtools.Codecs.RasterCodecs();

Leadtools.RasterImage JPEGImage = _codecs.Load(@"MyImage.jpeg");
+------------+

After this, you can insert an image in a Pixel Data element by using the InsertImage() method.

For more information, please refer to the following online help topics:
http://www.leadtools.com/help/leadtools/v18/dh/to/leadtools.topics.dicom~di.topics.workingwithdatasets.html

http://www.leadtools.com/help/leadtools/v18/dh/di/leadtools.dicom~leadtools.dicom.dicomdataset~insertimage.html

Please check our Dicom Dataset demos shipped with the toolkit, which allow you to create a new blank dataset and insert an image to and then add Dicom elements or modify them.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Wednesday, January 29, 2014 2:33:15 PM(UTC)

Forhad  
Forhad

Groups: Registered
Posts: 3


Thank you for your help.

Now I can convert JPG to DICOM easily.

:)
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.162 seconds.