The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dicom::DCMTK::DCMQRSCP::Config - Perl class for reading/writing DCMTK dcmqrscp configuration file.

SYNOPSIS

 use Dicom::DCMTK::DCMQRSCP::Config;

 my $obj = Dicom::DCMTK::DCMQRSCP::Config->new(%parameters);
 $obj->parse($data);
 my $data = $obj->serialize;

METHODS

new

 my $obj = Dicom::DCMTK::DCMQRSCP::Config->new(%parameters);

Constructor.

  • ae_table

    AE table.

    Default value is {}.

  • comment

    Flag, that means comments in serialize() output.

    Default value is 1.

  • global

    Global parameters.

    Default value is:

     {
             'NetworkTCPPort' => undef,
             'MaxPDUSize' => undef,
             'MaxAssociations' => undef,
             'UserName' => undef,
             'GroupName' => undef,
     };
  • host_table

    Host table.

    Default value is {}.

  • host_table_symb

    Host table symbolic names.

    Default value is {}.

  • vendor_table

    Vendor table.

    Default value is {}.

Returns instance of object.

parse

 $obj->parse($data);

Parse $data, which contains dcmqrscp configuration data.

Returns undef.

serialize

 my $data = $obj->serialize;

Serialize object to DCMTK dcmqrscp configuration data.

Returns string with dcmqrscp configuration data.

ERRORS

 new():
         From Class::Utils::set_params():
                 Unknown parameter '%s'.

EXAMPLE

 use strict;
 use warnings;

 use Dicom::DCMTK::DCMQRSCP::Config;

 # Object.
 my $obj = Dicom::DCMTK::DCMQRSCP::Config->new(
         'ae_table' => {
                 'ACME_PUB' => {
                         'Access' => 'R',
                         'Peers' => 'ANY',
                         'Quota' => {
                                 'maxBytesPerStudy' => '24mb',
                                 'maxStudies' => '10',
                         },
                         'StorageArea' => '/dicom/ACME_PUB',
                 },
                 'ACME_PRV' => {
                         'Access' => 'RW',
                         'Peers' => 'Acme',
                         'Quota' => {
                                 'maxBytesPerStudy' => '24mb',
                                 'maxStudies' => '10',
                         },
                         'StorageArea' => '/dicom/ACME_PRV',
                 },
         },
         'comment' => 1,
         'global' => {
                 'GroupName' => 'dcmtk',
                 'MaxAssociations' => 20,
                 'MaxPDUSize' => 8192,
                 'NetworkTCPPort' => 104,
                 'UserName' => 'dcmtk',
         },
         'host_table' => {
                 'Acme_1' => [
                         'ACME_DN1',
                         'acme',
                         10001
                 ],
                 'Acme_2' => [
                         'ACME_DN2',
                         'acme',
                         10001
                 ],
                 'Acme_3' => [
                         'ACME_DN3',
                         'acme',
                         10001
                 ],
         },
         'host_table_symb' => {
                 'Acme' => [
                         'Acme_1',
                         'Acme_2',
                         'Acme_3',
                 ],
         },
         'vendor_table' => {
                 'Acme' => 'ACME CT Company',
         },
 );

 # Serialize and print
 print $obj->serialize."\n";

 # Output:
 # # Global Configuration Parameters.
 # GroupName = "dcmtk"
 # MaxAssociations = 20
 # MaxPDUSize = 8192
 # NetworkTCPPort = 104
 # UserName = "dcmtk"
 # 
 # # Host Table.
 # HostTable BEGIN
 # Acme_1 = (ACME_DN1, acme, 10001)
 # Acme_2 = (ACME_DN2, acme, 10001)
 # Acme_3 = (ACME_DN3, acme, 10001)
 # Acme = Acme_1, Acme_2, Acme_3
 # HostTable END
 # 
 # # Vendor Table.
 # VendorTable BEGIN
 # "ACME CT Company" = Acme
 # VendorTable END
 # 
 # # AE Table.
 # AETable BEGIN
 # ACME_PRV /dicom/ACME_PRV RW (10, 24mb) Acme
 # ACME_PUB /dicom/ACME_PUB R (10, 24mb) ANY
 # AETable END

DEPENDENCIES

Class::Utils.

SEE ALSO

Task::Dicom

Install the Dicom modules.

REPOSITORY

https://github.com/michal-josef-spacek/Dicom-DCMTK-DCMQRSCP-Config

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2014-2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.04