当前位置: 首页>>代码示例>>Python>>正文


Python Dataset.PatientsName方法代码示例

本文整理汇总了Python中pydicom.dataset.Dataset.PatientsName方法的典型用法代码示例。如果您正苦于以下问题:Python Dataset.PatientsName方法的具体用法?Python Dataset.PatientsName怎么用?Python Dataset.PatientsName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pydicom.dataset.Dataset的用法示例。


在下文中一共展示了Dataset.PatientsName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SCP_SCU_RoleSelectionNegotiation

# 需要导入模块: from pydicom.dataset import Dataset [as 别名]
# 或者: from pydicom.dataset.Dataset import PatientsName [as 别名]
#   C-STORE requests for the supported SOP classes
ext_neg = []
for context in ae.presentation_contexts_scu:
    tmp = SCP_SCU_RoleSelectionNegotiation()
    tmp.sop_class_uid = context.AbstractSyntax
    tmp.scu_role = False
    tmp.scp_role = True
    
    ext_neg.append(tmp)

# Request association with remote
assoc = ae.associate(args.peer, args.port, args.called_aet, ext_neg=ext_neg)

# Create query dataset
d = Dataset()
d.PatientsName = '*'
d.QueryRetrieveLevel = "PATIENT"

if args.patient:
    query_model = 'P'
elif args.study:
    query_model = 'S'
elif args.psonly:
    query_model = 'O'
else:
    query_model = 'P'

def on_c_store(sop_class, dataset):
    """
    Function replacing ApplicationEntity.on_store(). Called when a dataset is 
    received following a C-STORE. Write the received dataset to file 
开发者ID:scaramallion,项目名称:pynetdicom,代码行数:33,代码来源:movescu.py

示例2: dict

# 需要导入模块: from pydicom.dataset import Dataset [as 别名]
# 或者: from pydicom.dataset.Dataset import PatientsName [as 别名]
# remote application entity
RemoteAE = dict(Address=args.remotehost, Port=args.remoteport, AET=args.aec)

# create association with remote AE
print "Request association"
assoc = MyAE.RequestAssociation(RemoteAE)


# perform a DICOM ECHO
print "DICOM Echo ... ",
st = assoc.VerificationSOPClass.SCU(1)
print 'done with status "%s"' % st

print "DICOM FindSCU ... ",
d = Dataset()
d.PatientsName = args.searchstring
d.QueryRetrieveLevel = "PATIENT"
d.PatientID = "*"
st = assoc.PatientRootFindSOPClass.SCU(d, 1)
print 'done with status "%s"' % st

for ss in st:
    if not ss[1]:
        continue
    # print ss[1]
    try:
        d.PatientID = ss[1].PatientID
    except:
        continue
    print "Moving"
    print d
开发者ID:emaging,项目名称:pynetdicom,代码行数:33,代码来源:qrscu.py

示例3: Parse

# 需要导入模块: from pydicom.dataset import Dataset [as 别名]
# 或者: from pydicom.dataset.Dataset import PatientsName [as 别名]
    if args.key:
        pass
        # Format examples:
        # "(gggg,eeee)=" Null value
        # "(gggg,eeee)=CITIZEN*" Typical use
        # "(gggg,eeee)[0].Modality=CT" Sequence
        # "(gggg,eeee)[*].Modality=CT" Sequence with wildcard
        # "(gggg,eeee)=1\\2\\3\\4" VM of 4
        # Parse (), [], ., =, \\
        #   () to get tag
        #   ()[]()[]()[]()
        #   ()[].()[].()[].()

    # Create query dataset
    dataset = Dataset()
    dataset.PatientsName = '*'
    dataset.QueryRetrieveLevel = "PATIENT"

    # Query/Retrieve Information Models
    if args.worklist:
        query_model = 'W'
    elif args.patient:
        query_model = 'P'
    elif args.study:
        query_model = 'S'
    elif args.psonly:
        # Retired
        query_model = 'O'
    else:
        query_model = 'W'
开发者ID:scaramallion,项目名称:pynetdicom,代码行数:32,代码来源:findscu.py


注:本文中的pydicom.dataset.Dataset.PatientsName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。