|
From: <gun...@us...> - 2008-06-18 10:52:23
|
Revision: 6472
http://dcm4che.svn.sourceforge.net/dcm4che/?rev=6472&view=rev
Author: gunterze
Date: 2008-06-18 03:52:12 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
[#DCMEE-865] Support retrieve of images without pixel data by making use of No Pixel Data Transfer Syntax
Modified Paths:
--------------
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-qrscp-xmbean.xml
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-storescp-xmbean.xml
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/MoveTask.java
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/QueryRetrieveScpService.java
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/RetrieveInfo.java
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/util/FileDataSource.java
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-qrscp-xmbean.xml
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-qrscp-xmbean.xml 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-qrscp-xmbean.xml 2008-06-18 10:52:12 UTC (rev 6472)
@@ -60,13 +60,14 @@
</descriptors>
</attribute>
<attribute access="read-write"
- getMethod="getSendWithDefaultTransferSyntaxToAETitles"
- setMethod="setSendWithDefaultTransferSyntaxToAETitles">
- <description>Move Destination AE titles to which objects are sent
- always with Default (=Implicit VR Little Endian) Transfer Syntax, which
- implies, that compressed stored images are always decompressed by this
- service for retrieval. Separate multiple values by \(backslash).
- NONE = no AE titles match this criteria.
+ getMethod="getSendWithDefaultTransferSyntaxToAETs"
+ setMethod="setSendWithDefaultTransferSyntaxToAETs">
+ <description><![CDATA[Move Destination AE titles to which objects are
+ sent always with Default (=Implicit VR Little Endian) Transfer Syntax,
+ which implies, that compressed stored images are always decompressed by
+ this service for retrieval. Separate multiple values by \(backslash).
+ <br/>NONE = no AE titles match this criteria.
+ <br/>ANY = all AE titles match this criteria.]]>
</description>
<name>SendWithDefaultTransferSyntaxToAETitles</name>
<type>java.lang.String</type>
@@ -75,6 +76,42 @@
</descriptors>
</attribute>
<attribute access="read-write"
+ getMethod="getOfferNoPixelDataToAETs"
+ setMethod="setOfferNoPixelDataToAETs">
+ <description><![CDATA[Move Destination AE titles to which images are sent
+ without pixel data, if offered Transfer Syntax <i>No Pixel Data</i>
+ was accepted by the Move Destination AE.
+ Separate multiple values by \(backslash).
+ <br/>NONE = do not offer <i>No Pixel Data</i> Transfer Syntax to any
+ Move Destination AE.
+ <br/>ANY = offer <i>No Pixel Data</i> Transfer Syntax to all
+ Move Destination AEs.]]>
+ </description>
+ <name>OfferNoPixelDataTransferSyntaxToAETitles</name>
+ <type>java.lang.String</type>
+ <descriptors>
+ <value value="NONE"/>
+ </descriptors>
+ </attribute>
+ <attribute access="read-write"
+ getMethod="getOfferNoPixelDataDeflateToAETs"
+ setMethod="setOfferNoPixelDataDeflateToAETs">
+ <description><![CDATA[Move Destination AE titles to which images are sent
+ without pixel data, if offered Transfer Syntax <i>No Pixel Data Deflate</i>
+ or <i>No Pixel Data</i> was accepted by the Move Destination AE.
+ Separate multiple values by \(backslash).
+ <br/>NONE = do not offer <i>No Pixel Data Deflate</i> and
+ <i>No Pixel Data</i> Transfer Syntax to any Move Destination AE.
+ <br/>ANY = offer <i>No Pixel Data Deflate</i> and
+ <i>No Pixel Data</i> Transfer Syntax to all Move Destination AE.]]>
+ </description>
+ <name>OfferNoPixelDataDeflateTransferSyntaxToAETitles</name>
+ <type>java.lang.String</type>
+ <descriptors>
+ <value value="NONE"/>
+ </descriptors>
+ </attribute>
+ <attribute access="read-write"
getMethod="getSendNoPixelDataToAETs"
setMethod="setSendNoPixelDataToAETs">
<description>Move Destination AE titles to which images are sent
@@ -110,7 +147,8 @@
(PIX) Manager</i> shall be executed, if the query request contains a
matching key for the Patient ID, to return also entities of linked
patients. Separate multiple values by \(backslash).
- ANY = Enable PIX Queries for all C-FIND SCUs.]]>
+ <br/>ANY = Enable PIX Queries for all C-FIND SCUs.
+ <br/>NONE = Disable PIX Queries for all C-FIND SCUs.]]>
</description>
<name>PIXQueryCallingAETitles</name>
<type>java.lang.String</type>
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-storescp-xmbean.xml
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-storescp-xmbean.xml 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-storescp-xmbean.xml 2008-06-18 10:52:12 UTC (rev 6472)
@@ -513,6 +513,8 @@
JPEG2000Lossy,
RLELossless,
Dcm4cheURIReferenced
+ NoPixelData
+ NoPixelDataDeflate
]]>
</description>
<name>AcceptedTransferSyntaxForImageSOPClasses</name>
@@ -531,7 +533,9 @@
JPEGExtended
JPEGLSLossy
JPEG2000Lossy
- Dcm4cheURIReferenced"/>
+ Dcm4cheURIReferenced
+ NoPixelData
+ NoPixelDataDeflate"/>
</descriptors>
</attribute>
<attribute access="read-write"
@@ -561,7 +565,9 @@
Transfer Syntaxes UID value or following defined symbolic names:
JPEGBaseline,
MPEG2,
- Dcm4cheURIReferenced
+ Dcm4cheURIReferenced
+ NoPixelData
+ NoPixelDataDeflate
]]>
</description>
<name>AcceptedTransferSyntaxForVideoSOPClasses</name>
@@ -570,7 +576,9 @@
<value value="
JPEGBaseline
MPEG2
- Dcm4cheURIReferenced"/>
+ Dcm4cheURIReferenced
+ NoPixelData
+ NoPixelDataDeflate"/>
</descriptors>
</attribute>
<attribute access="read-write"
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/MoveTask.java
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/MoveTask.java 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/MoveTask.java 2008-06-18 10:52:12 UTC (rev 6472)
@@ -232,8 +232,10 @@
if (maxOpsInvoked != 1) {
rq.setAsyncOpsWindow(asf.newAsyncOpsWindow(maxOpsInvoked, 1));
}
- retrieveInfo.addPresContext(rq, service
- .isSendWithDefaultTransferSyntax(moveDest));
+ retrieveInfo.addPresContext(rq,
+ service.isSendWithDefaultTransferSyntax(moveDest),
+ service.isOfferNoPixelData(moveDest),
+ service.isOfferNoPixelDataDeflate(moveDest));
perfMon.assocEstStart(a, Command.C_STORE_RQ);
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/QueryRetrieveScpService.java
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/QueryRetrieveScpService.java 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/QueryRetrieveScpService.java 2008-06-18 10:52:12 UTC (rev 6472)
@@ -118,6 +118,8 @@
private static final String NONE = "NONE";
+ private static final String[] EMPTY = {};
+
private static final String SEND_BUFFER = "SEND_BUFFER";
private static final Timer pendingRspTimer = new Timer(true);
@@ -127,8 +129,12 @@
private String[] sendNoPixelDataToAETs = null;
- private String[] sendWithDefaultTransferSyntaxToAETitles = null;
+ private String[] offerNoPixelDataToAETs = null;
+ private String[] offerNoPixelDataDeflateToAETs = null;
+
+ private String[] sendWithDefaultTransferSyntaxToAETs = null;
+
private String[] ignoreUnsupportedSOPClassFailuresByAETs = null;
private String[] unrestrictedQueryPermissionsToAETitles = null;
@@ -334,12 +340,14 @@
public String getPixQueryCallingAETs() {
return pixQueryCallingAETs == null ? ANY
+ : pixQueryCallingAETs.length == 0 ? NONE
: StringUtils.toString(pixQueryCallingAETs, '\\');
}
public void setPixQueryCallingAETs(String s) {
String trim = s.trim();
this.pixQueryCallingAETs = trim.equalsIgnoreCase(ANY) ? null
+ : trim.equalsIgnoreCase(NONE) ? EMPTY
: StringUtils.split(trim, '\\');
}
@@ -696,15 +704,41 @@
: StringUtils.split(aets, '\\');
}
- public final String getSendWithDefaultTransferSyntaxToAETitles() {
- return sendWithDefaultTransferSyntaxToAETitles == null ? NONE
- : StringUtils.toString(sendWithDefaultTransferSyntaxToAETitles,
+ public final String getOfferNoPixelDataToAETs() {
+ return offerNoPixelDataToAETs == null ? ANY
+ : offerNoPixelDataToAETs.length == 0 ? NONE
+ : StringUtils.toString(offerNoPixelDataToAETs, '\\');
+ }
+
+ public final void setOfferNoPixelDataToAETs(String aets) {
+ this.offerNoPixelDataToAETs = ANY.equalsIgnoreCase(aets) ? null
+ : NONE.equalsIgnoreCase(aets) ? EMPTY
+ : StringUtils.split(aets, '\\');
+ }
+
+ public final String getOfferNoPixelDataDeflateToAETs() {
+ return offerNoPixelDataDeflateToAETs == null ? ANY
+ : offerNoPixelDataDeflateToAETs.length == 0 ? NONE
+ : StringUtils.toString(offerNoPixelDataDeflateToAETs, '\\');
+ }
+
+ public final void setOfferNoPixelDataDeflateToAETs(String aets) {
+ this.offerNoPixelDataDeflateToAETs = ANY.equalsIgnoreCase(aets) ? null
+ : NONE.equalsIgnoreCase(aets) ? EMPTY
+ : StringUtils.split(aets, '\\');
+ }
+
+ public final String getSendWithDefaultTransferSyntaxToAETs() {
+ return sendWithDefaultTransferSyntaxToAETs == null ? ANY
+ : sendWithDefaultTransferSyntaxToAETs.length == 0 ? NONE
+ : StringUtils.toString(sendWithDefaultTransferSyntaxToAETs,
'\\');
}
- public final void setSendWithDefaultTransferSyntaxToAETitles(String aets) {
- this.sendWithDefaultTransferSyntaxToAETitles = NONE
- .equalsIgnoreCase(aets) ? null : StringUtils.split(aets, '\\');
+ public final void setSendWithDefaultTransferSyntaxToAETs(String aets) {
+ this.sendWithDefaultTransferSyntaxToAETs = ANY.equalsIgnoreCase(aets)
+ ? null : NONE.equalsIgnoreCase(aets) ? EMPTY
+ : StringUtils.split(aets, '\\');
}
public final String getIgnoreUnsupportedSOPClassFailuresByAETs() {
@@ -953,9 +987,19 @@
&& Arrays.asList(sendNoPixelDataToAETs).contains(moveDest);
}
+ boolean isOfferNoPixelData(String moveDest) {
+ return offerNoPixelDataToAETs == null
+ || Arrays.asList(offerNoPixelDataToAETs).contains(moveDest);
+ }
+
+ boolean isOfferNoPixelDataDeflate(String moveDest) {
+ return offerNoPixelDataDeflateToAETs == null
+ || Arrays.asList(offerNoPixelDataDeflateToAETs).contains(moveDest);
+ }
+
boolean isSendWithDefaultTransferSyntax(String moveDest) {
- return sendWithDefaultTransferSyntaxToAETitles != null
- && Arrays.asList(sendWithDefaultTransferSyntaxToAETitles)
+ return sendWithDefaultTransferSyntaxToAETs == null
+ || Arrays.asList(sendWithDefaultTransferSyntaxToAETs)
.contains(moveDest);
}
@@ -1162,23 +1206,14 @@
Association assoc = activeAssoc.getAssociation();
String dest = assoc.isRequestor() ? assoc.getCalledAET()
: assoc.getCallingAET();
- PresContext presCtx = assoc.getAcceptedPresContext(info.sopCUID,
- info.tsUID);
- if (presCtx == null) {
- presCtx = assoc.getAcceptedPresContext(info.sopCUID,
- UIDs.ExplicitVRLittleEndian);
- if (presCtx == null) {
- presCtx = assoc.getAcceptedPresContext(info.sopCUID,
- UIDs.ImplicitVRLittleEndian);
- if (presCtx == null)
- throw new NoPresContextException(
- "No Presentation Context for "
- + uidDict.toString(info.sopCUID)
- + (assoc.isRequestor() ? " accepted by "
- : " offered by ")
- + dest);
- }
- }
+ PresContext presCtx = selectAcceptedPresContext(assoc, info);
+ if (presCtx == null)
+ throw new NoPresContextException(
+ "No Presentation Context for "
+ + uidDict.toString(info.sopCUID)
+ + (assoc.isRequestor() ? " accepted by "
+ : " offered by ")
+ + dest);
Command storeRqCmd = DcmObjectFactory.getInstance().newCommand();
storeRqCmd.initCStoreRQ(assoc.nextMsgID(), info.sopCUID, info.sopIUID,
priority);
@@ -1206,6 +1241,18 @@
return rq;
}
+ private PresContext selectAcceptedPresContext(Association a, FileInfo info) {
+ String[] tsuids = { UIDs.NoPixelDataDeflate, UIDs.NoPixelData,
+ info.tsUID, UIDs.ExplicitVRLittleEndian,
+ UIDs.ImplicitVRLittleEndian
+ };
+ PresContext presCtx = null;
+ for (int i = 0; presCtx == null && i < tsuids.length; i++) {
+ presCtx = a.getAcceptedPresContext(info.sopCUID, tsuids[i]);
+ }
+ return presCtx;
+ }
+
protected File getFile(FileInfo info) throws Exception {
return info.basedir.startsWith("tar:")
? retrieveFileFromTAR(info.basedir, info.fileID)
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/RetrieveInfo.java
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/RetrieveInfo.java 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/qrscp/RetrieveInfo.java 2008-06-18 10:52:12 UTC (rev 6472)
@@ -69,6 +69,11 @@
private static final String[] NATIVE_LE_TS = { UIDs.ExplicitVRLittleEndian,
UIDs.ImplicitVRLittleEndian };
+ private static final String[] NO_PIXEL_TS = { UIDs.NoPixelData };
+
+ private static final String[] NO_PIXEL_DEFL_TS = { UIDs.NoPixelDataDeflate,
+ UIDs.NoPixelData };
+
private static final boolean isNativeLE_TS(String uid) {
return UIDs.ExplicitVRLittleEndian.equals(uid)
|| UIDs.ImplicitVRLittleEndian.equals(uid);
@@ -175,7 +180,9 @@
}
public void addPresContext(AAssociateRQ rq,
- boolean sendWithDefaultTransferSyntax) {
+ boolean sendWithDefaultTransferSyntax,
+ boolean offerNoPixelData,
+ boolean offerNoPixelDataDeflate) {
String cuid;
String tsuid;
IuidsAndTsuids iuidsAndTsuids;
@@ -193,6 +200,13 @@
}
rq.addPresContext(asf.newPresContext(rq.nextPCID(), cuid,
NATIVE_LE_TS));
+ if (offerNoPixelDataDeflate) {
+ rq.addPresContext(asf.newPresContext(rq.nextPCID(), cuid,
+ NO_PIXEL_DEFL_TS));
+ } else if (offerNoPixelData) {
+ rq.addPresContext(asf.newPresContext(rq.nextPCID(), cuid,
+ NO_PIXEL_TS));
+ }
Iterator<String> it2 = iuidsAndTsuids.tsuids.iterator();
while (it2.hasNext()) {
tsuid = it2.next();
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/util/FileDataSource.java
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/util/FileDataSource.java 2008-06-18 08:19:43 UTC (rev 6471)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/util/FileDataSource.java 2008-06-18 10:52:12 UTC (rev 6472)
@@ -248,7 +248,9 @@
}
}
DcmEncodeParam enc = DcmEncodeParam.valueOf(tsUID);
- if (withoutPixeldata || parser.getReadTag() != Tags.PixelData) {
+ if (withoutPixeldata || parser.getReadTag() != Tags.PixelData
+ || UIDs.NoPixelData.equals(tsUID)
+ || UIDs.NoPixelDataDeflate.equals(tsUID)) {
log.debug("Dataset:\n");
log.debug(ds);
write(ds, out, enc);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|