org.eclipse.ohf.wado.client.impl
Class WADORequestImpl

java.lang.Object
  extended by org.eclipse.ohf.wado.client.impl.WADORequestImpl
All Implemented Interfaces:
WADORequest

public class WADORequestImpl
extends java.lang.Object
implements WADORequest


Field Summary
 
Fields inherited from interface org.eclipse.ohf.wado.client.WADORequest
DICOM_MIME_TYPE, JPEG_MIME_TYPE
 
Constructor Summary
WADORequestImpl()
           
 
Method Summary
 java.lang.String generateWadoUrl(java.lang.String wadoServerPath)
          The method takes a WADORequest object and generates a valid WADO URL that contain all the parameters defined in the request.
 int getFrameNumber()
           
 int getImageQuality()
           
 int getNumberOfPixelColumns()
           
 int getNumberOfPixelRows()
           
 java.lang.String getObjectUID()
           
 java.lang.String getPresentationObjectUID()
           
 java.lang.String getPresentationSeriesUID()
           
 ImageRegion getRegionOfTheImage()
           
 java.lang.String getResponseCharset()
           
 java.lang.String getResponseMimeType()
           
 java.lang.String getSeriesUID()
           
 java.lang.String getStudyUID()
           
 java.lang.String getTransferSyntaxUID()
           
 double getWindowCenterOfTheImage()
           
 double getWindowWidthOfTheImage()
           
 boolean isAnnonymizeObject()
           
 boolean isPatientAnnotation()
           
 boolean isTechniqueAnnotation()
           
 void setAnnonymizeObject(boolean annonymizeObject)
          Sets the removal of all patient identification information from within the DICOM object, if not already done, as defined in PS 3.15.
 void setFrameNumber(int frameNumber)
          Specifies that the single frame with that number within a multi-frame image object, as defined in PS 3.3 that shall be returned.
 void setImageQuality(int imageQuality)
          If the requested MIME type is for a lossy compressed image (e.g.
 void setNumberOfPixelColumns(int numberOfPixelColumns)
          Sets the image width to be returned.
 void setNumberOfPixelRows(int numberOfPixelRows)
          Sets the image height to be returned.
 void setObjectUID(java.lang.String objectUID)
          Set the SOP Instance UID of the requested DICOM object.
 void setPatientAnnotation(boolean patientAnnotation)
          Sets the requested annotation of an object retrieved and displayed as an image.
 void setPresentationObjectUID(java.lang.String presentationObjectUID)
          Sets the SOP Instance UID of the presentation state storage object to be applied to the image.
 void setPresentationSeriesUID(java.lang.String presentationSeriesUID)
          Sets the Series Instance UID of the series containing the presentation state storage object to be applied on the image.
 void setRegionOfTheImage(ImageRegion regionOfTheImage)
          Allows selection of a rectangular region of an image matrix to be retrieved.
 void setResponseCharset(java.lang.String responseCharset)
          Sets the character set with which the returned object is to be encoded, as defined in the IETF RFC2616.
 void setResponseMimeType(java.lang.String responseMimeType)
          MIME type(s) desired for the response from the Server, as defined in the IETF RFC2616.
 void setSeriesUID(java.lang.String seriesUID)
          Set the series Instance UID of the requested DICOM object.
 void setStudyUID(java.lang.String studyUID)
          Set the study Instance UID of the requested DICOM object.
 void setTechniqueAnnotation(boolean techniqueAnnotation)
          Sets the requested annotation of an object retrieved and displayed as an image.
 void setTransferSyntaxUID(java.lang.String transferSyntaxUID)
          Sets the Transfer Syntax to be used within the DICOM image object, as specified in PS 3.6.
 void setWindowCenterOfTheImage(double windowCenterOfTheImage)
          Controls the luminosity of the image as defined in PS 3.3.
 void setWindowWidthOfTheImage(double windowWidthOfTheImage)
          Controls the contrast of the image as defined in PS 3.3.
 java.util.List<java.lang.String> validateWADORequest()
          The method will go over the parameters in the WADORequest object and make sure that they are valid and no contradictions between them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WADORequestImpl

public WADORequestImpl()
Method Detail

generateWadoUrl

public java.lang.String generateWadoUrl(java.lang.String wadoServerPath)
Description copied from interface: WADORequest
The method takes a WADORequest object and generates a valid WADO URL that contain all the parameters defined in the request.

Specified by:
generateWadoUrl in interface WADORequest
Parameters:
wadoServerPath - The URL prefix for the WADO server
Returns:
The generated WADO URL

validateWADORequest

public java.util.List<java.lang.String> validateWADORequest()
Description copied from interface: WADORequest
The method will go over the parameters in the WADORequest object and make sure that they are valid and no contradictions between them.

Specified by:
validateWADORequest in interface WADORequest

isAnnonymizeObject

public boolean isAnnonymizeObject()
Specified by:
isAnnonymizeObject in interface WADORequest
Returns:

setAnnonymizeObject

public void setAnnonymizeObject(boolean annonymizeObject)
Description copied from interface: WADORequest
Sets the removal of all patient identification information from within the DICOM object, if not already done, as defined in PS 3.15. It shall only be present if content type is application/dicom.
This parameter is optional.

Specified by:
setAnnonymizeObject in interface WADORequest
Parameters:
annonymizeObject - Whether to anonymize or not. Default is false.

getFrameNumber

public int getFrameNumber()
Specified by:
getFrameNumber in interface WADORequest
Returns:

setFrameNumber

public void setFrameNumber(int frameNumber)
Description copied from interface: WADORequest
Specifies that the single frame with that number within a multi-frame image object, as defined in PS 3.3 that shall be returned.
It is optional and shall be ignored in the case of all objects other than multi-frame objects. It shall not be present if contentType is application/dicom.

Specified by:
setFrameNumber in interface WADORequest
Parameters:
frameNumber - The desired single frame number

getImageQuality

public int getImageQuality()
Specified by:
getImageQuality in interface WADORequest
Returns:

setImageQuality

public void setImageQuality(int imageQuality)
Description copied from interface: WADORequest
If the requested MIME type is for a lossy compressed image (e.g. image/jpeg), this parameter indicates the required quality of the image to be returned within the range 1 to 100, 100 being the best quality.
This parameter is optional. It shall not be present if contentType is application/dicom, except if the transferSyntax parameter is present and corresponds to a lossy compression.

Specified by:
setImageQuality in interface WADORequest
Parameters:
imageQuality - The required quality of the image to be returned within the range 1 to 100, 100 being the best quality.

getNumberOfPixelColumns

public int getNumberOfPixelColumns()
Specified by:
getNumberOfPixelColumns in interface WADORequest
Returns:

setNumberOfPixelColumns

public void setNumberOfPixelColumns(int numberOfPixelColumns)
Description copied from interface: WADORequest
Sets the image width to be returned. It shall not be present if contentType is application/dicom.
This parameter is optional.

Specified by:
setNumberOfPixelColumns in interface WADORequest
Parameters:
numberOfPixelColumns - The number of pixel columns

getNumberOfPixelRows

public int getNumberOfPixelRows()
Specified by:
getNumberOfPixelRows in interface WADORequest
Returns:

setNumberOfPixelRows

public void setNumberOfPixelRows(int numberOfPixelRows)
Description copied from interface: WADORequest
Sets the image height to be returned. It shall not be present if contentType is application/dicom.
This parameter is optional.

Specified by:
setNumberOfPixelRows in interface WADORequest
Parameters:
numberOfPixelRows - The number of pixel rows

getObjectUID

public java.lang.String getObjectUID()
Specified by:
getObjectUID in interface WADORequest
Returns:

setObjectUID

public void setObjectUID(java.lang.String objectUID)
Description copied from interface: WADORequest
Set the SOP Instance UID of the requested DICOM object.
This parameter is required.

Specified by:
setObjectUID in interface WADORequest
Parameters:
objectUID - The SOP Instance UID

isPatientAnnotation

public boolean isPatientAnnotation()
Specified by:
isPatientAnnotation in interface WADORequest
Returns:

setPatientAnnotation

public void setPatientAnnotation(boolean patientAnnotation)
Description copied from interface: WADORequest
Sets the requested annotation of an object retrieved and displayed as an image. It shall not be present if contentType is application/dicom, or is a non-image MIME type (e.g., text/*). When it is not present for an image object, no annotation may be burnt in.
This parameter is optional.

Specified by:
setPatientAnnotation in interface WADORequest
Parameters:
patientAnnotation - For displaying patient information on the image (e.g. patient name, birth date,…)
See Also:
WADORequest.setTechniqueAnnotation(boolean)

getPresentationObjectUID

public java.lang.String getPresentationObjectUID()
Specified by:
getPresentationObjectUID in interface WADORequest
Returns:

setPresentationObjectUID

public void setPresentationObjectUID(java.lang.String presentationObjectUID)
Description copied from interface: WADORequest
Sets the SOP Instance UID of the presentation state storage object to be applied to the image.
It is optional and shall not be present if contentType is application/dicom.

Specified by:
setPresentationObjectUID in interface WADORequest
Parameters:
presentationObjectUID - The SOP Instance UID of the presentation state storage object.

getPresentationSeriesUID

public java.lang.String getPresentationSeriesUID()
Specified by:
getPresentationSeriesUID in interface WADORequest
Returns:

setPresentationSeriesUID

public void setPresentationSeriesUID(java.lang.String presentationSeriesUID)
Description copied from interface: WADORequest
Sets the Series Instance UID of the series containing the presentation state storage object to be applied on the image.
It is optional and shall only be present if "presentationUID" is present.

Specified by:
setPresentationSeriesUID in interface WADORequest
Parameters:
presentationSeriesUID - The Series Instance UID of the series containing the presentation state storage object.

getRegionOfTheImage

public ImageRegion getRegionOfTheImage()
Specified by:
getRegionOfTheImage in interface WADORequest
Returns:

setRegionOfTheImage

public void setRegionOfTheImage(ImageRegion regionOfTheImage)
Description copied from interface: WADORequest
Allows selection of a rectangular region of an image matrix to be retrieved. The purpose of this parameter is to allow a user to view a selected area of the image matrix, for example at higher magnification.
The decimal parameters shall be values in a normalized coordinate system relative to the size of the original image matrix measured in rows and columns, with values ranging from 0.0 to 1.0.
This parameter is optional.

Specified by:
setRegionOfTheImage in interface WADORequest
Parameters:
regionOfTheImage - The region to be retrieved

getResponseCharset

public java.lang.String getResponseCharset()
Specified by:
getResponseCharset in interface WADORequest
Returns:

setResponseCharset

public void setResponseCharset(java.lang.String responseCharset)
Description copied from interface: WADORequest
Sets the character set with which the returned object is to be encoded, as defined in the IETF RFC2616.
This parameter is optional.

Specified by:
setResponseCharset in interface WADORequest
Parameters:
responseCharset - List of character sets, separated by a "," character, and potentially associated with relative degree of preference, as specified in IETF RFC2616. Default is no charset conversion.

getResponseMimeType

public java.lang.String getResponseMimeType()
Specified by:
getResponseMimeType in interface WADORequest
Returns:

setResponseMimeType

public void setResponseMimeType(java.lang.String responseMimeType)
Description copied from interface: WADORequest
MIME type(s) desired for the response from the Server, as defined in the IETF RFC2616.
This parameter is optional.

Specified by:
setResponseMimeType in interface WADORequest
Parameters:
responseMimeType - List of MIME types, separated by a "," character, and potentially associated with relative degree of preference, as specified in IETF RFC2616. Default is any content type.

getSeriesUID

public java.lang.String getSeriesUID()
Specified by:
getSeriesUID in interface WADORequest
Returns:

setSeriesUID

public void setSeriesUID(java.lang.String seriesUID)
Description copied from interface: WADORequest
Set the series Instance UID of the requested DICOM object.
This parameter is required.

Specified by:
setSeriesUID in interface WADORequest
Parameters:
seriesUID - The series Instance UID

getStudyUID

public java.lang.String getStudyUID()
Specified by:
getStudyUID in interface WADORequest
Returns:

setStudyUID

public void setStudyUID(java.lang.String studyUID)
Description copied from interface: WADORequest
Set the study Instance UID of the requested DICOM object.
This parameter is required.

Specified by:
setStudyUID in interface WADORequest
Parameters:
studyUID - The study Instance UID

isTechniqueAnnotation

public boolean isTechniqueAnnotation()
Specified by:
isTechniqueAnnotation in interface WADORequest
Returns:

setTechniqueAnnotation

public void setTechniqueAnnotation(boolean techniqueAnnotation)
Description copied from interface: WADORequest
Sets the requested annotation of an object retrieved and displayed as an image. It shall not be present if contentType is application/dicom, or is a non-image MIME type (e.g., text/*). When it is not present for an image object, no annotation may be burnt in.
This parameter is optional.

Specified by:
setTechniqueAnnotation in interface WADORequest
Parameters:
techniqueAnnotation - For displaying technique information of the image (e.g. image number, study date, image position,…)
See Also:
WADORequest.setPatientAnnotation(boolean)

getTransferSyntaxUID

public java.lang.String getTransferSyntaxUID()
Specified by:
getTransferSyntaxUID in interface WADORequest
Returns:

setTransferSyntaxUID

public void setTransferSyntaxUID(java.lang.String transferSyntaxUID)
Description copied from interface: WADORequest
Sets the Transfer Syntax to be used within the DICOM image object, as specified in PS 3.6. By default the DICOM object(s) returned shall be encoded in Explicit VR Little Endian. Neither Implicit VR, nor Big Endian shall be used. The response shall be the Transfer Syntax requested if possible. If it is not possible for the response to be sent using the requested transfer syntax then the Explicit VR Little Endian Uncompressed Transfer Syntax shall be used.
It is optional and shall not be present if contentType is application/dicom.

Specified by:
setTransferSyntaxUID in interface WADORequest
Parameters:
transferSyntaxUID - The Transfer Syntax to be used within the DICOM image object.

getWindowWidthOfTheImage

public double getWindowWidthOfTheImage()
Specified by:
getWindowWidthOfTheImage in interface WADORequest
Returns:

setWindowWidthOfTheImage

public void setWindowWidthOfTheImage(double windowWidthOfTheImage)
Description copied from interface: WADORequest
Controls the contrast of the image as defined in PS 3.3.
This parameter is reuired if WindowCenterOfTheImage has been set. This parameter shall not be present if the PresentationObjectUID parameter has been set. It shall not be present if ResponseMimeType is application/dicom.

Specified by:
setWindowWidthOfTheImage in interface WADORequest
Parameters:
windowWidthOfTheImage - The desired contrast of the image

getWindowCenterOfTheImage

public double getWindowCenterOfTheImage()
Specified by:
getWindowCenterOfTheImage in interface WADORequest
Returns:

setWindowCenterOfTheImage

public void setWindowCenterOfTheImage(double windowCenterOfTheImage)
Description copied from interface: WADORequest
Controls the luminosity of the image as defined in PS 3.3.
This parameter is reuired if WindowWidthOfTheImage has been set. This parameter shall not be present if the PresentationObjectUID parameter has been set. It shall not be present if ResponseMimeType is application/dicom.

Specified by:
setWindowCenterOfTheImage in interface WADORequest
Parameters:
windowCenterOfTheImage - The desired luminosity of the image