public class NativeFrameConverterOp extends BaseFrameConverterOp
Constructor and Description |
---|
NativeFrameConverterOp(TransferSyntaxUID targetTransferSyntaxUID)
Creates a new NativeFrameConverterOp.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(DicomObject dcm)
check if the transfer syntax in the file meta information of the specified DicomObject
is one of the supported source transfer syntaxes.
|
byte[] |
convert(byte[] frame,
ImageInfo imageInfo)
converts a frame.
|
long |
getConvertedPixelDataLength(DicomObject dcm,
long originalPixelDataLength,
int originalType)
base implementation that returns the pixel data length of the source
see
FrameConverterOp.getConvertedPixelDataLength(DicomObject, long, int) |
int |
getConvertedPixelDataType(DicomObject dcm,
long originalPixelDataLength,
int originalType)
always take OW.
|
TransferSyntaxUID |
getConvertedTransferSyntax(DicomObject dcm)
returns the new transfer syntax of the image to which this frame conversion operation has been applied
Eg: If the operation compresses frames according to a particular codec, then the encapsulated transfer syntax
corresponding to this transfer syntax should be returned.
|
DicomObject |
modifyDicomObject(DicomObject dcm)
modifies the outgoing dicom stream before frames are appended
- new transfer syntax in file meta
- force photometric interpretation of RGB for images with 3 samples per pixel.
|
public NativeFrameConverterOp(TransferSyntaxUID targetTransferSyntaxUID)
ImplicitVRLittleEndianUID
ExplicitVRLittleEndianUID
ExplicitVRBigEndianUID
targetTransferSyntaxUID
- public boolean canConvert(DicomObject dcm)
dcm
- the source DicomObjectpublic TransferSyntaxUID getConvertedTransferSyntax(DicomObject dcm) throws DicomException
FrameConverterOp
dcm
- the source DicomObject (read up until the pixeldata data element)DicomException
- an exceptionpublic long getConvertedPixelDataLength(DicomObject dcm, long originalPixelDataLength, int originalType) throws DicomException
BaseFrameConverterOp
FrameConverterOp.getConvertedPixelDataLength(DicomObject, long, int)
getConvertedPixelDataLength
in interface FrameConverterOp
getConvertedPixelDataLength
in class BaseFrameConverterOp
dcm
- the source DicomObjectoriginalPixelDataLength
- the length of the source pixel dataoriginalType
- the type of the source pixel dataDicomException
public int getConvertedPixelDataType(DicomObject dcm, long originalPixelDataLength, int originalType) throws DicomException
getConvertedPixelDataType
in interface FrameConverterOp
getConvertedPixelDataType
in class BaseFrameConverterOp
dcm
- the source DicomObjectoriginalPixelDataLength
- the source pixel data lengthoriginalType
- the data type of the source pixel dataDicomException
- -public DicomObject modifyDicomObject(DicomObject dcm) throws DicomException
modifyDicomObject
in interface FrameConverterOp
modifyDicomObject
in class BaseFrameConverterOp
dcm
- the source DicomObjectDicomException
- -public byte[] convert(byte[] frame, ImageInfo imageInfo) throws DicomException
FrameConverterOp
frame
- the source pixel frameimageInfo
- relevant information of the imageDicomException
- an exception