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 : Friday, April 1, 2022 7:27:02 AM(UTC)
sorincalex

Groups: Registered
Posts: 1


Dear all,

We are using the AXIS DICOM server from Escalon Sonomed, which uses Leadtools in order to convert EncapsulatedPDFs to Jpeg2000 images.
During this conversion process, we see "Leadtools.RasterException: CGM codec is needed to use this feature" (stack trace below).
We simply don't understand why sometimes this works and sometimes not. We can't see a relevant difference neither in the DICOM files, nor in the PDFs they contain, so we can't find a reason for failure.
Any help would be very much appreciated.

Thanks,
Greetings,
Sorin

2022-03-16 10:05:38,091 [50] DEBUG DicomServiceImpl.CStore (null) - pdf engine is installed... actually writing pdf
2022-03-16 10:05:38,107 [50] ERROR AxisDicomService.Database.AxisDatabase (null) - Database call failed (inside connection scope)
Leadtools.RasterException: CGM codec is needed to use this feature
at Leadtools.Codecs.RasterCodecs.DoGetInformation(String fileName, Stream stream, Boolean totalPages, Int32 pageNumber)
at Leadtools.Codecs.RasterCodecs.DoLoad(LoadParams loadParams)
at Leadtools.Codecs.RasterCodecs.Load(Stream stream)
at AxisDicomService.DicomServiceImpl.<>c__DisplayClass44_1.<StoreImageFile>b__0(SqlServerConnection conn)
at AxisDicomService.Database.AxisDatabase.CallDatabase(Func`1 getConnection, Action`1 databaseAction, ILog log)
2022-03-16 10:05:38,122 [50] ERROR AxisDicomService.Database.AxisDatabase (null) - Database call failed (outside connection scope)
Leadtools.RasterException: CGM codec is needed to use this feature
at Leadtools.Codecs.RasterCodecs.DoGetInformation(String fileName, Stream stream, Boolean totalPages, Int32 pageNumber)
at Leadtools.Codecs.RasterCodecs.DoLoad(LoadParams loadParams)
at Leadtools.Codecs.RasterCodecs.Load(Stream stream)
at AxisDicomService.DicomServiceImpl.<>c__DisplayClass44_1.<StoreImageFile>b__0(SqlServerConnection conn)
at AxisDicomService.Database.AxisDatabase.CallDatabase(Func`1 getConnection, Action`1 databaseAction, ILog log)
2022-03-16 10:05:38,138 [50] INFO DicomServiceImpl.CStore (null) - Exit StoreImageFile
2022-03-16 10:05:38,138 [50] ERROR Escalon.Dicom.ServiceModel.LeadTools.DicomConnection<ScpConnection> (null) - DICOM service action failed
Leadtools.RasterException: CGM codec is needed to use this feature
at Leadtools.Codecs.RasterCodecs.DoGetInformation(String fileName, Stream stream, Boolean totalPages, Int32 pageNumber)
at Leadtools.Codecs.RasterCodecs.DoLoad(LoadParams loadParams)
at Leadtools.Codecs.RasterCodecs.Load(Stream stream)
at AxisDicomService.DicomServiceImpl.<>c__DisplayClass44_1.<StoreImageFile>b__0(SqlServerConnection conn)
at AxisDicomService.Database.AxisDatabase.CallDatabase(Func`1 getConnection, Action`1 databaseAction, ILog log)
at AxisDicomService.Database.AxisDatabase.CallDatabase(Action`1 databaseAction, ILog log)
at AxisDicomService.DicomServiceImpl.StoreImageFile(DicomServiceOperationContext context, DicomCompositeImage iod, MoveContext moveContext)
at Escalon.Dicom.ServiceModel.LeadTools.ScpConnection.<>c__DisplayClass23_2.<OnReceiveCStoreRequest>b__2(Action`1 <setStatus>)
at Escalon.Dicom.ServiceModel.LeadTools.DicomConnection`1.InvokeSafe(DicomServiceAction action)
2022-03-16 10:05:38,154 [50] DEBUG Escalon.Dicom.ServiceModel.LeadTools.ScpConnection (null) - Sending SendCStoreResponse
2022-03-16 10:05:38,169 [50] DEBUG Escalon.Dicom.ServiceModel.LeadTools.ScpConnection (null) - Finished sending SendCStoreResponse
2022-03-16 10:05:38,169 [50] DEBUG Escalon.Dicom.ServiceModel.DicomServiceOperationThreadManager (null) - Enter RemoveThreadContext - Connection ID: 17
2022-03-16 10:05:38,169 [MessagePump:1 - SCP (localhost:1044(AXISTEST))] DEBUG Escalon.Dicom.ServiceModel.LeadTools.ScpConnection (null) - Enter OnReceiveReleaseRequest
2022-03-16 10:05:38,200 [MessagePump:1 - SCP (localhost:1044(AXISTEST))] DEBUG Escalon.Dicom.ServiceModel.LeadTools.DicomConnection<ScpConnection> (null) - Enter InvokeActionUpdateIdleTimer - action Name: <OnReceiveReleaseRequest>b__18_0

 

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 : Friday, April 1, 2022 7:58:06 AM(UTC)
Christopher

Groups: Registered, Tech Support, Administrators
Posts: 89

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

Hi

To resolve the exception you will need to add the Leadtools.Codecs.Cgm.dll.
This library can be found in the LEADTOOLS22 installation file folder here:

for x86
C:\LEADTOOLS22\Bin\DotNet4\Win32\Leadtools.Codecs.Cgm.dll

for x64
C:\LEADTOOLS22\Bin\DotNet4\x64\Leadtools.Codecs.Cgm.dll

Like many of the LEADTOOLS file format codices, the functionality for working with those specific file formats, requires inclusion of these corresponding file format libraries.

The reason that you may not always be seeing this exception when processing DICOM files, could be because not all of the images included in those DICOM files are using this kind of format.
On the occasions that this exception comes up, it could be caused by the images being provided from a particular piece of equipment, or from the way the DICOM files are being created prior to being added to your server.
If you want to narrow this down, I would recommend trying to identify the source to see if this occurs with all files from a particular machine or medical device to see if that could be causing it.

This could also be used by the LEAD operations needing to utilize some part of this functionality for the conversion process.
To check this, you would need to run a test with your application to see if the exception displays when the file is being loaded versus when the file is being converted.
If it is during the load, then there is something in the file itself that requires this to be read.
If during the conversion, the conversion process, and possibly the output of the converted file, is using this Dll to run required operations to complete the conversion.

In the LEADTOOLS Online Documentation we provide a guide for the various file formats that are supported and the Dlls that are needed to work with them.

Ultimately though, if this library being added to the project solves the issue, then including it as a reference for your application - so on the occasions that this kind of formatting is used - would be all that you would need to do.

Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
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-2024, Yet Another Forum.NET
This page was generated in 0.080 seconds.