Example #1
0
"""

import sys
sys.path.append('..')
import os
import time
from applicationentity import AE
from SOPclass import PatientRootMoveSOPClass, VerificationSOPClass, \
    RTPlanStorageSOPClass
import dicom
from dcmqrscp import start_dcmqrscp
import dcmtkscu
from utils import testfiles_dir

# first create a partner
start_dcmqrscp(server_port=2001, server_AET='AE1')
for ii in range(20):
    print


# call backs
def OnAssociateRequest(association):
    print "Association request received"


def OnReceiveEcho(self):
    print
    print "Echo received"
    return True

Example #2
0
This demonstrates a simple application entity that support the Patient Root
Find SOP Class as SCU. The example sets up a SCP provider listening
on port 2001 on localhost using the dcmqrscp command from the offis toolkit.
"""

import sys
sys.path.append('..')
import time
from applicationentity import AE
from SOPclass import PatientRootFindSOPClass, VerificationSOPClass
import dicom
from dcmqrscp import start_dcmqrscp
from dicom.dataset import Dataset

# first create a partner
start_dcmqrscp(server_port=2001, server_AET='AE1', populate=True)
for ii in range(20):
    print

# call back


def OnAssociateResponse(association):
    print "Association response received"

# create application entity
MyAE = AE('localhost', 9999,
          [PatientRootFindSOPClass, VerificationSOPClass], [])
MyAE.OnAssociateResponse = OnAssociateResponse

# remote application entity
Example #3
0
storescp -v 8888
"""

import sys
import os
sys.path.append('..')
import time
from applicationentity import AE
from SOPclass import *
import pydicom
import dcmqrscp
from utils import testfiles_dir

# start peer
dcmqrscp.start_dcmqrscp()

# call back


def OnAssociateResponse(association):
    print "Association response received"


# create application entity
MyAE = AE('localhost', 9999, [RTPlanStorageSOPClass, VerificationSOPClass], [])
MyAE.OnAssociateResponse = OnAssociateResponse

# remote application entity
RemoteAE = {'Address': 'localhost', 'Port': 2000, 'AET': 'OFFIS_AE'}
Example #4
0
This demonstrates a simple application entity that support the Patient Root
Find SOP Class as SCU. The example sets up a SCP provider listening
on port 2001 on localhost using the dcmqrscp command from the offis toolkit. 
"""

import sys
sys.path.append('..')
import time
from applicationentity import AE
from SOPclass import PatientRootFindSOPClass, VerificationSOPClass
import dicom
from dcmqrscp import start_dcmqrscp
from dicom.dataset import Dataset

# first create a partner
start_dcmqrscp(server_port=2001, server_AET='AE1', populate=True)
for ii in range(20):
    print


# call back
def OnAssociateResponse(association):
    print "Association response received"


# create application entity
MyAE = AE('localhost', 9999, [PatientRootFindSOPClass, VerificationSOPClass],
          [])
MyAE.OnAssociateResponse = OnAssociateResponse

# remote application entity
Example #5
0
"""

import sys

sys.path.append("..")
import os
import time
from applicationentity import AE
from SOPclass import PatientRootMoveSOPClass, VerificationSOPClass, RTPlanStorageSOPClass
import pydicom
from dcmqrscp import start_dcmqrscp
import dcmtkscu
from utils import testfiles_dir

# first create a partner
start_dcmqrscp(server_port=2001, server_AET="AE1")
for ii in range(20):
    print


# call backs
def OnAssociateRequest(association):
    print "Association request received"


def OnReceiveEcho(self):
    print
    print "Echo received"
    return True

Example #6
0
movescu -v -P -aem AE1 -k 0010,0010="*" -k 0008,0052="PATIENT" localhost 9999
"""

import sys
sys.path.append('..')
import os
import time
from applicationentity import AE
from SOPclass import PatientRootMoveSOPClass, VerificationSOPClass, RTPlanStorageSOPClass
import dicom
from dcmqrscp import start_dcmqrscp
import dcmtkscu
from utils import testfiles_dir

# first create a partner
start_dcmqrscp(server_port=2001, server_AET='AE1')
for ii in range(20):
    print


# call backs
def OnAssociateRequest(association):
    print "Association request received"


def OnReceiveEcho(self):
    print
    print "Echo received"
    return True

Example #7
0
storescp -v 8888
"""

import sys
import os
sys.path.append('..')
import time
from applicationentity import AE
from SOPclass import *
import dicom
import dcmqrscp
from utils import testfiles_dir

# start peer
dcmqrscp.start_dcmqrscp()

# call back


def OnAssociateResponse(association):
    print "Association response received"

# create application entity
MyAE = AE('localhost', 9999, [RTPlanStorageSOPClass, VerificationSOPClass], [])
MyAE.OnAssociateResponse = OnAssociateResponse

# remote application entity
RemoteAE = {'Address': 'localhost', 'Port': 2000, 'AET': 'OFFIS_AE'}

# create some dataset