Using Storescp with configuration file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Daanen
Posts: 27
Joined: Mon, 2008-03-17, 17:41

Using Storescp with configuration file

#1 Post by Daanen »

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: Select all

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

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

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

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

#3 Post by Daanen »

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 ?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

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"? :-)

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

#5 Post by Daanen »

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: Select all

# ============================================================================
[[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)
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]

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#6 Post by Michael Onken »

Hi,

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

So just try...

Code: Select all

StoreScp.exe --fork -sp -xf storescp.cfg Default 104
..and there you go.

Michael

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

#7 Post by Daanen »

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:

J. Riesmeier
DCMTK Developer
Posts: 2496
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#8 Post by J. Riesmeier »

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>.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#9 Post by Michael Onken »

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

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

#10 Post by Daanen »

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest