Do you have a question?

First Name:
Surname:
Email:
Phone:
Message:
Get Audio Code

Problem with presentation contexts in StoreScp code
Last Post 27 Jul 2012 09:56 AM by Steve Wranovsky. 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Sean DoyleUser is Offline
New Member
New Member
Posts:18

--
01 Jul 2011 11:06 AM  

Hi -

I know that the real bug here is that I'm misunderstanding something :-).

A DICOM SCU that is trying to send data to a CC ImageServer is failing because it the images are compressed and the SCU can't decompress the images before they are sent. The images are in 1.2.840.10008.1.2.4.57  (JPEG Lossless Process 14). Here's the error I get:

Abstract Syntax 1.2.840.10008.5.1.4.1.1.2/CT Image Storage with Transfer Syntax 1.2.840.10008.1.2.4.57/JPEG Lossless, Non-Hierarchical (Process 14) not supported.

If the images are saved to disk I can import them in Osirix or the CC workstation and successfully send to the server. If I try to load the files using storescu.exe - I get an error message similar to the one above. The manual workaround is something that I want to avoid because it's just extra work for people that are insanely busy. 

So - I decided to try to write a small StorageScp service that would read these images in and then retransmit them (decompressing if necessary) to the ImageServer.  But I haven't been able to get this to work.

If I set up the presentation contexts like this:

            pcid = assoc.AddPresentationContext(SopClass.CtImageStorage);

            assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);

            assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);

            assoc.AddTransferSyntax(pcid, TransferSyntax.JpegLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1);

            assoc.AddTransferSyntax(pcid, TransferSyntax.JpegLosslessNonHierarchicalProcess14);

 

This is the error message that I get from the following command:

$ storescu.exe -v +v -xs -aet SWDVM1 -aec TIMCROUTER +sd  +sp *.dcm emiswd0vm1.partners.org 3333 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/*

 

I: Association Accepted (Max Send PDV: 116782)

I: Sending file: 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/01f35449e82608b692c7885de959a0c3cf4126d3.dcm

I: Transfer Syntax: JPEGLossless:Non-hierarchical:Process14 -> LittleEndianExplicit

I: Sending Store Request: MsgID 1, (CT)

XMIT: W: DIMSE Warning: (SWDVM1,TIMCROUTER): sendMessage: unable to convert data

set from 'JPEG Lossless, Non-hierarchical, Process 14' transfer syntax to 'Littl

e Endian Explicit'

E: Store Failed, file: 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/01f35449e82608b692c7885de959a0c3cf4126d3.dcm:

E: 0006:020e DIMSE Failed to send message

E: Store SCU Failed: 0006:020e DIMSE Failed to send message

I: Aborting Association

 

If I commend out all but the 

assoc.AddTransferSyntax(pcid,TransferSyntax.JpegLosslessNonHierarchicalProcess14);

 

I get the following message:

I: Association Accepted (Max Send PDV: 116782)

I: Sending file: 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/01f35449e82608b692c788

5de959a0c3cf4126d3.dcm

E: No presentation context for: (CT) 1.2.840.10008.5.1.4.1.1.2

E: Store SCU Failed: 0006:0208 DIMSE No valid Presentation Context ID

I: Aborting Association

 

How can I change my code (or server config) so that these images are accepted? 

Thanks!

Sean

 

Sean DoyleUser is Offline
New Member
New Member
Posts:18

--
07 Jul 2011 09:30 AM  
No solution yet.

One thing I've tried (since I'm on a 64 bit Windows 7 machine) was to make sure that the ClearCanvas.Dicom.Codec.Jpeg.dll was loaded. I've set Visual Studio 2008 to have 'any computer' as a target and I'm using the DLLs from the SDK redistributables. The *.Jpeg.dll is included as a reference and the service deploys with it.

But the behavior is still the same - it won't accept the compressed JPEG:
$ storescu.exe -v -xs -aet SWDVM1 -aec TIMCROUTER +sd +sp *.dcm emiswd0vm1.pa
rtners.org 3333 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/*
I: determining input files ...
I: checking input files ...
I: Requesting Association
I: Association Accepted (Max Send PDV: 116782)
I: Sending file: 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/01f35449e82608b692c788
5de959a0c3cf4126d3.dcm
I: Transfer Syntax: JPEGLossless:Non-hierarchical:Process14 -> LittleEndianExplicit
I: Sending Store Request: MsgID 1, (CT)
XMIT: W: DIMSE Warning: (SWDVM1,TIMCROUTER): sendMessage: unable to convert data
set from 'JPEG Lossless, Non-hierarchical, Process 14' transfer syntax to 'Little Endian Explicit'
E: Store Failed, file: 0e5a9aceeb542efac4b55a4c197a5c31e533fda6/01f35449e82608b692c7885de959a0c3cf4126d3.dcm:
E: 0006:020e DIMSE Failed to send message
E: Store SCU Failed: 0006:020e DIMSE Failed to send message
I: Aborting Association

I'm open to suggestions for what to try next :-).

Thanks!
MartinUser is Offline
Basic Member
Basic Member
Posts:265

--
11 Jul 2011 03:57 AM  

In general sending JPEG compessed DICOM images to the ImageServer 2.0 SP1 using the storescu.exe from DCMTK should work fine.

Can you try to enable the DEBUG logging within the Logging.config of your ImageServer installation, restart the service and check if all plugin DLLs got loaded.


    <root>
        <level value="DEBUG" />
        <appender-ref ref="RollingLogFileAppender" />
        <appender-ref ref="ConsoleAppender" />
        <appender-ref ref="AdoNetAppender" />
    </root>

You can also enable the debug mode for the storescu (option -d) to ensure that the JPEG TransferSyntax is in the list of proposed syntaxes.

Steve WranovskyUser is Offline
Veteran Member
Veteran Member
Posts:2107

--
11 Jul 2011 01:44 PM  
Sean,

The order you add the transfer syntaxes to your presentation context determines the priority the toolkit uses when negotiating the association. So, if you list/add the .57 transfer syntax first, it should select it when negotiating if its proposed. I think this should help you out.

Steve
MartinUser is Offline
Basic Member
Basic Member
Posts:265

--
20 Jul 2012 08:50 AM  

One year later fate brought me into the exact same situation. I want to send JPEG Lossless, Non-Hierarchical (Process 14) compressed DICOM images directly into the ImageServer 2.0 using the DCMTK's storescu. I always assumed that this should work since the Comformance Statement says that the TransferSyntax is support.

However the storescu and ImageServer log is telling something different:

D: $dcmtk: storescu v3.6.0 2011-01-06 $
D:
I: checking input files ...
D: Request Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.0
D: Our Implementation Version Name:   OFFIS_DCMTK_360
D: Their Implementation Class UID:
D: Their Implementation Version Name:
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    STORESCU
D: Called Application Name:     PAN2
D: Responding Application Name: resp. AP Title
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  0
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGLossless:Non-hierarchical:Process14
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: Constructing Associate RQ PDU
F: Association Rejected:
F: Result: Rejected Permanent, Source: Service Provider (ACSE Related)
F: Reason: No Reason

ImageServer log:

2012-07-20 14:34:08,427 [DicomServer: 127.0.0.1 [42]] ERROR - Rejecting association from STORESCU: No valid presentation contexts.

Combining the TransferSyntax with others will explicitly reject the 1.2.840.10008.1.2.4.57 TransferSyntax

	Presentation Context 3 [Reject - Transfer Syntaxes Not Supported] Abstract: CT Image Storage
		Transfer: JPEG Lossless, Non-Hierarchical (Process 14)

So it looks to me like the 1.2.840.10008.1.2.4.57 TransferSyntax is just not supported

Steve WranovskyUser is Offline
Veteran Member
Veteran Member
Posts:2107

--
27 Jul 2012 09:56 AM  
Martin,

It looks like the ImageServer Conformance Statement is just wrong. I'm not sure how this one got through, but the JPEG Lossless transfer syntax the ImageServer supports is this one:

JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]), 1.2.840.10008.1.2.4.70

We just don't support the 1.2.840.10008.1.2.4.57 transfer syntax. Although we could support the .57 transfer syntax, we chose to only support the .70 transfer syntax because we thought it was more common.

Steve
You are not authorized to post a reply.

Active Forums 4.1