DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2017-09-25, 21:45

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Thu, 2011-06-23, 15:27 
Offline

Joined: Mon, 2008-03-17, 17:41
Posts: 27
Dear all,

I want to filter image modality alowed to be received by a storescp process. I think this may be achieved using the configuration file option of storescp, in the file I will allow only the file I want to received (e.g MR image).

I copy the storescp.cfg file for directory /etc and start the storescp with the following command line

Code:
StoreScp.exe --fork -sp -xf storescp.cfg GenericStorageSCP 104

but I got this error:
Error: unknown configuration profile name: GENERICSTORAGESCP
I check that a profile with this name GENERICSTORAGESCP
exist and it is ok (execpt the case)

What's the right way to use storescp with a config file ? what do I miss ?

thansk for help
V


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2011-06-23, 17:11 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1600
Location: Oldenburg, Germany
Hi,

A general description about the file's format comes in the file asconfig.txt, which is also available online. without checking, there is some fiddling usually with case sensitivity. For now, try all possibilities ;-) We should then comment in the example file and storescp documentation what is the right way to do it.

Michael


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 09:09 
Offline

Joined: Mon, 2008-03-17, 17:41
Posts: 27
Hi,

Michael Onken wrote:
A general description about the file's format comes in the file asconfig.txt, which is also available online.


Yes, I read the description of the file. I tried to use the file provided with dcmtk and it did not work .. Isn't it tested ?

Michael Onken wrote:
without checking, there is some fiddling usually with case sensitivity. For now, try all possibilities ;-) We should then comment in the example file and storescp documentation what is the right way to do it.


I did and I always got the same error :(

any idea ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 09:15 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1600
Location: Oldenburg, Germany
Hi,

can you make a minimum version of the file (that still should work in your opinion) and post it here? That would be the easiest I guess.

Michael

P.S: Why you posted this under "Other DICOM Tools"? :-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 09:29 
Offline

Joined: Mon, 2008-03-17, 17:41
Posts: 27
Hi Michael,

Michael Onken wrote:
can you make a minimum version of the file (that still should work in your opinion) and post it here?
That would be the easiest I guess.


of course I can ;)
here is the file I'd like to use

Code:
# ============================================================================
[[TransferSyntaxes]]
# ============================================================================

[Uncompressed]
TransferSyntax1  = LocalEndianExplicit
TransferSyntax2  = OppositeEndianExplicit
TransferSyntax3  = LittleEndianImplicit

[UncompressedOrZlib]
TransferSyntax1  = DeflatedLittleEndianExplicit
TransferSyntax2  = LocalEndianExplicit
TransferSyntax3  = OppositeEndianExplicit
TransferSyntax4  = LittleEndianImplicit

[AnyTransferSyntax]
TransferSyntax1  = JPEG2000
TransferSyntax2  = JPEG2000LosslessOnly
TransferSyntax3  = JPEGExtended:Process2+4
TransferSyntax4  = JPEGBaseline
TransferSyntax5  = JPEGLossless:Non-hierarchical-1stOrderPrediction
TransferSyntax6  = JPEGLSLossy
TransferSyntax7  = JPEGLSLossless
TransferSyntax8  = RLELossless
TransferSyntax9  = DeflatedLittleEndianExplicit
TransferSyntax10 = LittleEndianExplicit
TransferSyntax11 = BigEndianExplicit
TransferSyntax12 = LittleEndianImplicit
TransferSyntax13 = MPEG2MainProfile@MainLevel

# ============================================================================
[[PresentationContexts]]
# ============================================================================

[GENERICSTORAGESCP]
#
# Don't forget to support the Verification SOP Class.
#
PresentationContext1   = VerificationSOPClass\Uncompressed
#
# Accept image SOP classes with virtually any transfer syntax we know.
# Accept non-image SOP classes uncompressed or with zlib compression only.
PresentationContext2  = UltrasoundImageStorage\AnyTransferSyntax
PresentationContext3  = UltrasoundMultiframeImageStorage\AnyTransferSyntax

# ============================================================================
[[Profiles]]
# ============================================================================

[Default]
PresentationContexts = GENERICSTORAGESCP


when calling storescp with the following command line
storescp.exe -xf storescp-my.cfg GENERICSTORAGESCP 104
I got the following error "Error: unknown configuration profile name: GENERICSTORAGESCP"

As you can see, the profile "GENERICSTORAGESCP" is declared in the file with the right case (uppercase)

Quote:
P.S: Why you posted this under "Other DICOM Tools"? :-)

when I searched the forum t osee if someone else have or had in the past the same problems, I saw that the post related to storescp/stroscu (nearly all *scp | * scu in fact) when in this forum so I posted also here....[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 10:22 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1600
Location: Oldenburg, Germany
Hi,

your profile is called "Default", not GenericStorageSCP... :-) GenericStorageSCP is only the name of the presentation context set you defined.

So just try...
Code:
StoreScp.exe --fork -sp -xf storescp.cfg Default 104

..and there you go.

Michael


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 11:34 
Offline

Joined: Mon, 2008-03-17, 17:41
Posts: 27
thank Michael,

but it find the use of "default" in the configuration file a bit disturbing...
When I read this, I just think that if no profile was entered, it would use the one specified by the "default" statement..

may be I did not read carrefully enough the asconfig.txt file :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 16:07 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1847
Location: Oldenburg, Germany
Quote:
but it find the use of "default" in the configuration file a bit disturbing...
When I read this, I just think that if no profile was entered, it would use the one specified by the "default" statement..

There are at least two reasons for this behavior:
  1. "Default" is just a symbolic name that has no further meaning.
  2. The command line class that is used for parsing the command line options only allows for a fixed number of values after an option, e.g. --config-file <filename> <profile>.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2011-06-24, 16:27 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1600
Location: Oldenburg, Germany
Hi,

"Default" is the just the name chosen by the original author of that file. It could be also any other string, you can exchange it to "Dummy" or whatever you like. It has no special meaning, e.g. it is not choosen automatically - you always have to specify the profile that should be used, there is no "fall back" called Default or the like.

Michael


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 2011-06-26, 16:18 
Offline

Joined: Mon, 2008-03-17, 17:41
Posts: 27
Hi guys,

yes, I unsdestand that "default" was just a name...
I have now my own config file with 2 profiled, one for US and one for MR images..

I can achieve exactly what I want

Thansk for your help

V


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: jberger and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group