org.dcm4che.client
Class PrintSCU

java.lang.Object
  extended by org.dcm4che.client.PrintSCU

public class PrintSCU
extends java.lang.Object

Since:
Jun 21, 2003
Version:
$Revision: 3922 $ $Date: 2005-10-05 18:26:16 +0200 (Mi, 05 Okt 2005) $
Author:
gunter zeilinger

Field Summary
static java.lang.String ERROR
           
static java.lang.String NORMAL
           
static java.lang.String WARNING
           
 
Constructor Summary
PrintSCU(AssociationRequestor requestor)
           
 
Method Summary
 void checkAssociation()
           
 int countAnnotationBoxes()
           
 int countImageBoxes()
           
 int createFilmBox(Dataset attr)
          Creates a Film Box.
 int createFilmSession(Dataset attr, boolean color)
          Creates a Film Session.
 java.lang.String createPLUT(Dataset attr)
          Creates a P-LUT (Presentation Look-up Table).
 java.lang.String createPLUT(java.lang.String shape)
          Creates a P-LUT (Presentation Look-up Table) using a given predfined shape.
 int deleteFilmBox()
           
 int deleteFilmSession()
           
 int deletePLUT(java.lang.String iuid)
           
 int[] getInfoAttrList()
           
 int getMaxPrinterInfoStale()
          Get the printer information validity period.
 Dataset getPrinterInfo(boolean forceQuery)
           
 java.lang.String getPrinterStatus()
           
 java.lang.String getPrinterStatusInfo()
           
 AssociationRequestor getRequestor()
           
 boolean isAnnotationEnabled()
           
 boolean isAutoRefPLUT()
           
 boolean isColorPrintEnabled()
           
 boolean isCreateRQwithIUID()
           
 boolean isGrayscalePrintEnabled()
           
 boolean isNegotiateAnnotation()
          Get whether a presentation context for setting Annotations was negotiated on the corresponding association.
 boolean isNegotiateColorPrint()
          Get whether a presentation context for Color printing was negotiated on the corresponding association.
 boolean isNegotiateExplicitVR()
           
 boolean isNegotiateGrayscalePrint()
          Get whether a presentation context for Grayscale printing was negotiated on the corresponding association.
 boolean isNegotiatePLUT()
          Get whether a presentation context for sending a Presentation Look-up Table (P-LUT) was negotiated on the corresponding association.
 boolean isPLUTEnabled()
           
 int printFilmBox()
          Prints the current Film Box.
 int printFilmSession()
          Prints the current Film Session.
 int setAnnotationBox(int index, java.lang.String text)
           
 void setAutoRefPLUT(boolean autoRefPLUT)
          If true and a P-LUT has been created, this PrintSCU will automatically place a Referenced P-LUT Sequence and the reference to a created P-LUT in a created Film Box's attributes.
 void setCreateRQwithIUID(boolean createRQwithIUID)
          Set whether a UID should be generated by this instance.
 int setImageBox(int index, java.io.File file, java.io.File psFile, Dataset attr, boolean burnInOverlays, boolean autoScale)
          Sets a Image Box.
 void setInfoAttrList(int[] infoAttrList)
           
 void setMaxPrinterInfoStale(int maxPrinterInfoStale)
          Set the printer information validity period.
 void setNegotiateAnnotation(boolean negotiateAnnotation)
           
 void setNegotiateColorPrint(boolean negotiateColorPrint)
           
 void setNegotiateExplicitVR(boolean negotiateExplicitVR)
          Set whether an Explicit VR (Value Representation) should be negotiated on the association.
 void setNegotiateGrayscalePrint(boolean negotiateGrayscalePrint)
          Set whether to negotiate a presentation context for Grayscale printing on the corresponding association.
 void setNegotiatePLUT(boolean negotiatePLUT)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final java.lang.String NORMAL
See Also:
Constant Field Values

WARNING

public static final java.lang.String WARNING
See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
See Also:
Constant Field Values
Constructor Detail

PrintSCU

public PrintSCU(AssociationRequestor requestor)
Method Detail

isNegotiateGrayscalePrint

public boolean isNegotiateGrayscalePrint()
Get whether a presentation context for Grayscale printing was negotiated on the corresponding association.

Returns:
true if the PrintSCU has negotiated this presentation context, false otherwise

setNegotiateGrayscalePrint

public void setNegotiateGrayscalePrint(boolean negotiateGrayscalePrint)
Set whether to negotiate a presentation context for Grayscale printing on the corresponding association.

Parameters:
negotiateGrayscalePrint - true if this presentation syntax should be negotiated, false otherwise

isNegotiateColorPrint

public boolean isNegotiateColorPrint()
Get whether a presentation context for Color printing was negotiated on the corresponding association.

Returns:
true if the PrintSCU has negotiated this presentation context, false otherwise

setNegotiateColorPrint

public void setNegotiateColorPrint(boolean negotiateColorPrint)
Parameters:
negotiateColorPrint -

isNegotiatePLUT

public boolean isNegotiatePLUT()
Get whether a presentation context for sending a Presentation Look-up Table (P-LUT) was negotiated on the corresponding association.

Returns:
true if the PrintSCU has negotiated this presentation context, false otherwise

setNegotiatePLUT

public void setNegotiatePLUT(boolean negotiatePLUT)
Parameters:
negotiatePLUT -

isNegotiateAnnotation

public boolean isNegotiateAnnotation()
Get whether a presentation context for setting Annotations was negotiated on the corresponding association.

Returns:
true if the PrintSCU has negotiated this presentation context, false otherwise

setNegotiateAnnotation

public void setNegotiateAnnotation(boolean negotiateAnnotation)
Parameters:
negotiateAnnotation -

isCreateRQwithIUID

public boolean isCreateRQwithIUID()
Returns:
true if a UID will be generated by this instance, false if the user is expected to pass this to create* or set* methods requiring a UID.

setCreateRQwithIUID

public void setCreateRQwithIUID(boolean createRQwithIUID)
Set whether a UID should be generated by this instance. Set to false if the user is expected to pass this to create* or set* methods requiring a UID.


isAutoRefPLUT

public boolean isAutoRefPLUT()
Returns:
true if this PrintSCU will automatically place a Referenced P-LUT Sequence and the reference to a created P-LUT in a created Film Box's attributes, false otherwise

setAutoRefPLUT

public void setAutoRefPLUT(boolean autoRefPLUT)
If true and a P-LUT has been created, this PrintSCU will automatically place a Referenced P-LUT Sequence and the reference to a created P-LUT in a created Film Box's attributes.


getRequestor

public AssociationRequestor getRequestor()
Returns:
the AssociationRequestor associated with this PrintSCU

isNegotiateExplicitVR

public boolean isNegotiateExplicitVR()
Returns:
returns whether an Explicit VR (Value Representation) was negotiated on the association.

setNegotiateExplicitVR

public void setNegotiateExplicitVR(boolean negotiateExplicitVR)
Set whether an Explicit VR (Value Representation) should be negotiated on the association.

Parameters:
negotiateExplicitVR - true if the PrintSCU should negotiated this presentation context, false otherwise

isGrayscalePrintEnabled

public boolean isGrayscalePrintEnabled()

isColorPrintEnabled

public boolean isColorPrintEnabled()
Returns:
true if Color printing is enabled on an active association

isPLUTEnabled

public boolean isPLUTEnabled()
Returns:
true if P-LUTs are enabled on an active association

isAnnotationEnabled

public boolean isAnnotationEnabled()
Returns:
true if Annotations are enabled on an active association

getInfoAttrList

public int[] getInfoAttrList()
Returns:
array of printer attributes

setInfoAttrList

public void setInfoAttrList(int[] infoAttrList)
Parameters:
infoAttrList - array of printer attributes

getMaxPrinterInfoStale

public int getMaxPrinterInfoStale()
Get the printer information validity period.

Returns:
the maximum length of time (in milliseconds) to elapse before the printer information is considered "stale" and will be re-queried on the next call to a method that needs printer information.

setMaxPrinterInfoStale

public void setMaxPrinterInfoStale(int maxPrinterInfoStale)
Set the printer information validity period.

Parameters:
maxStatusStale - the maximum length of time (in milliseconds) to elapse before the printer information is considered "stale" and will be re-queried on the next call to a method that needs printer information.

getPrinterInfo

public Dataset getPrinterInfo(boolean forceQuery)
                       throws java.lang.InterruptedException,
                              java.io.IOException,
                              DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

getPrinterStatus

public java.lang.String getPrinterStatus()
                                  throws java.lang.InterruptedException,
                                         java.io.IOException,
                                         DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

getPrinterStatusInfo

public java.lang.String getPrinterStatusInfo()
                                      throws java.lang.InterruptedException,
                                             java.io.IOException,
                                             DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

createPLUT

public java.lang.String createPLUT(Dataset attr)
                            throws java.lang.InterruptedException,
                                   java.io.IOException,
                                   DcmServiceException
Creates a P-LUT (Presentation Look-up Table).

Parameters:
attr - The P-LUT attributes. See DICOM ps 3.3, appendix B.18: Presentation LUT Information Object Definition for more information.
Returns:
the UID of the created P-LUT
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

createPLUT

public java.lang.String createPLUT(java.lang.String shape)
                            throws java.lang.InterruptedException,
                                   java.io.IOException,
                                   DcmServiceException
Creates a P-LUT (Presentation Look-up Table) using a given predfined shape.

Parameters:
shape - The P-LUT shape. See DICOM ps 3.3, appendix B.18: Presentation LUT Information Object Definition for more information.
Returns:
the UID of the created P-LUT
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

deletePLUT

public int deletePLUT(java.lang.String iuid)
               throws java.lang.InterruptedException,
                      java.io.IOException,
                      DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

checkAssociation

public void checkAssociation()

setAnnotationBox

public int setAnnotationBox(int index,
                            java.lang.String text)
                     throws java.lang.InterruptedException,
                            java.io.IOException,
                            DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

createFilmSession

public int createFilmSession(Dataset attr,
                             boolean color)
                      throws java.lang.InterruptedException,
                             java.io.IOException,
                             DcmServiceException
Creates a Film Session.

Parameters:
attr - The Film Session attributes. See DICOM ps 3.3, appendix B.7: Basic Film Session Information Object Definition for more information.
color - true if this is a color Film Session, false otherwise
Returns:
the status of the created Film Session
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

deleteFilmSession

public int deleteFilmSession()
                      throws java.lang.InterruptedException,
                             java.io.IOException,
                             DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

createFilmBox

public int createFilmBox(Dataset attr)
                  throws java.lang.InterruptedException,
                         java.io.IOException,
                         DcmServiceException
Creates a Film Box.

Parameters:
attr - The Film Box attributes. See DICOM ps 3.3, appendix B.8: Basic Film Box Information Object Definition for more information.
Returns:
the status of the created Film Box
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

deleteFilmBox

public int deleteFilmBox()
                  throws java.lang.InterruptedException,
                         java.io.IOException,
                         DcmServiceException
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

countImageBoxes

public int countImageBoxes()

countAnnotationBoxes

public int countAnnotationBoxes()

setImageBox

public int setImageBox(int index,
                       java.io.File file,
                       java.io.File psFile,
                       Dataset attr,
                       boolean burnInOverlays,
                       boolean autoScale)
                throws java.lang.InterruptedException,
                       java.io.IOException,
                       DcmServiceException
Sets a Image Box.

Parameters:
file - The file representing the DICOM image to send
index - The index of the Basic Film Box that this Image Box will be assigned to.
attr - The Image Box attributes. See DICOM ps 3.3, appendix B.9: Basic Image Box Information Object Definition for more information.
Returns:
the status of the created Image Box
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

printFilmBox

public int printFilmBox()
                 throws java.lang.InterruptedException,
                        java.io.IOException,
                        DcmServiceException
Prints the current Film Box.

Returns:
The status of the print request
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException

printFilmSession

public int printFilmSession()
                     throws java.lang.InterruptedException,
                            java.io.IOException,
                            DcmServiceException
Prints the current Film Session.

Returns:
The status of the print request
Throws:
java.lang.InterruptedException
java.io.IOException
DcmServiceException