如何从PixelMed的C_FIND中获取私有供应商属性标签?

huangapple go评论61阅读模式
英文:

How to get private vendor attribute tag in C_FIND from pixelmed?

问题

我试图从DICOM服务器读取一个私有供应商标签。
我能成功读取的标签只有标准的DICOM标签。
该标签是2001,100b,在我的示例文件集中,它们的头文件中肯定有这个条目。

以下是调用CFIND请求的代码示例:

SpecificCharacterSet specificCharacterSet = new SpecificCharacterSet((String[])null);
            
AttributeList identifier = new AttributeList();

// 指定要检索的属性并传入任何搜索条件
// 查询根为“study”以检索研究
studies.removeAllElements();

identifier.putNewAttribute(TagFromName.QueryRetrieveLevel).addValue("STUDY"); 
identifier.putNewAttribute(TagFromName.PatientName,specificCharacterSet).addValue("*");
identifier.putNewAttribute(TagFromName.PatientID,specificCharacterSet);
identifier.putNewAttribute(TagFromName.StudyID);
identifier.putNewAttribute(TagFromName.PatientAge);
identifier.putNewAttribute(TagFromName.PatientSex);
identifier.putNewAttribute(TagFromName.ModalitiesInStudy);
identifier.putNewAttribute(TagFromName.AccessionNumber);
identifier.putNewAttribute(TagFromName.StudyInstanceUID);
identifier.putNewAttribute(TagFromName.StudyDescription);
identifier.putNewAttribute(TagFromName.StudyDate).addValue(date);
identifier.putNewAttribute(TagFromName.StudyTime);

AttributeTag at = new com.pixelmed.dicom.AttributeTag("0x2001,0x100b");
identifier.putNewAttribute(at);

IdentifierHandler ih = new IdentifierHandler(){
    @Override
    public void doSomethingWithIdentifier(AttributeList id) throws DicomException {
       studies.add(new Study(id, reportfolder));

       // 尝试从接收的标识符中读取私有DICOM标签
       System.out.println(id.get(at));
    }
};
new FindSOPClassSCU(serv.getAddress(),serv.getPort(), serv.getAetitle(), "ISPReporter",SOPClass.StudyRootQueryRetrieveInformationModelFind,identifier,ih);

然而,我的查询输出收到了与日期匹配的7个标识符,但是当我尝试读取2001,100b标签时,出现以下错误:

DicomException: 字典中没有(0x2001,0x100b)这样的数据元素

如果我使用以下行替代:

identifier.put(new com.pixelmed.dicom.TextAttribute(at) {
    public int getMaximumLengthOfEntireValue() {  return 20; }
});

然后我会得到:

null
null
null
null
null
null
null

(每个返回的标识符为null)

英文:

i'm trying to read a private vendor tag from a dicom server.
The only tags I'm able to read successfully are the standard DICOM tagFromNames
the tag is 2001,100b, and in my example set of files they definitely have that entry in their header

here is the code for calling the CFIND request

SpecificCharacterSet specificCharacterSet = new SpecificCharacterSet((String[])null);
AttributeList identifier = new AttributeList();
//specify attributes to retrieve and pass in any search criteria
//query root of "study" to retrieve studies
studies.removeAllElements();
identifier.putNewAttribute(TagFromName.QueryRetrieveLevel).addValue("STUDY"); 
identifier.putNewAttribute(TagFromName.PatientName,specificCharacterSet).addValue("*");
identifier.putNewAttribute(TagFromName.PatientID,specificCharacterSet);
identifier.putNewAttribute(TagFromName.StudyID);
identifier.putNewAttribute(TagFromName.PatientAge);
identifier.putNewAttribute(TagFromName.PatientSex);
identifier.putNewAttribute(TagFromName.ModalitiesInStudy);
identifier.putNewAttribute(TagFromName.AccessionNumber);
identifier.putNewAttribute(TagFromName.StudyInstanceUID);
identifier.putNewAttribute(TagFromName.StudyDescription);
identifier.putNewAttribute(TagFromName.StudyDate).addValue(date);
identifier.putNewAttribute(TagFromName.StudyTime);
AttributeTag at = new com.pixelmed.dicom.AttributeTag("0x2001,0x100b");
identifier.putNewAttribute(at);
IdentifierHandler ih = new IdentifierHandler(){
@Override
public void doSomethingWithIdentifier(AttributeList id) throws DicomException {
studies.add(new Study(id, reportfolder));
//Attempt to read private dicom tag from received identifier
System.out.println(id.get(at));
}
};
new FindSOPClassSCU(serv.getAddress(),serv.getPort(), serv.getAetitle(), "ISPReporter",SOPClass.StudyRootQueryRetrieveInformationModelFind,identifier,ih);

However, my output from the query, receives 7 identifiers that match for the date however when I try to read the 2001,100b tag, the error I get reads:

DicomException: No such data element as (0x2001,0x100b) in dictionary

if I use this line instead

identifier.put(new com.pixelmed.dicom.TextAttribute(at) {
public int getMaximumLengthOfEntireValue() {  return 20; }
});

Then I get:

null
null
null
null
null
null
null

(null for each identifier returned)

答案1

得分: 2

两件事情(第二件事情无关,因为这不会起作用,因为第一件事情的原因):

  1. C-FIND SCPs针对先前从DICOM图像头中提取并进行索引的数据元子集的数据库进行查询 - 实际上仅对图像中存在的(少量的)数据元进行索引,如所述;标准要求在查询信息模型中只有很少的数据元,在IHE计划工作流(SWF)配置文件中有更多的数据元(查询图像事务表4.14-1);实施者可以对每个数据元进行索引(或者至少对每个标准数据元进行索引),但这很少会被实现(尽管PixelMed没有这样做,尽管我考虑过在遇到数据元时自适应地进行添加,因为hsqldb支持添加列;基于NoSQL的实现可能会发现这样做更容易)

  2. 当您对私有数据元进行编码,无论是在查询标识符/响应中还是在图像头中,都需要包括其创建者;即,对于(2001,100b),您需要包括(2001,0010);否则,未指定私有数据元的创建者。

David

英文:

Two things (second one moot because this won't work anyway because of the first):

  1. C-FIND SCPs query against a database of a subset of data elements previously extracted from the DICOM image header and indexed - only a (small) subset of data elements present in images are actually indexed, as described; the standard requires very few in the Query Information Models, and the IHE Scheduled Workflow (SWF) profile a few more (Query Images Transaction Table 4.14-1; implementers could index every data element (or at least every standard data elements), but this is rarely done (PixelMed doesn't, though I have consider doing it adaptively as data elements are encountered now that hsqldb supports adding columns; NoSQL based implementations might find this easier)

  2. When you encode a private data element, whether it be in a query identifier/response, or in an image header, you need to include its creator; i.e., for (2001,100b), you need to include (2001,0010); otherwise the creator of the private data element is not specified.

David

huangapple
  • 本文由 发表于 2020年4月9日 00:03:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/61105024.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定