|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dcm4che2.image.LookupTable
public abstract class LookupTable
Field Summary | |
---|---|
protected int |
andmask
|
protected int |
inBits
|
static java.lang.String |
LINEAR
|
protected int |
off
|
protected int |
ormask
|
protected int |
outBits
|
protected boolean |
preserve
|
static java.lang.String |
SIGMOID
|
protected int |
signbit
|
Constructor Summary | |
---|---|
protected |
LookupTable(int inBits,
boolean signed,
int off,
int outBits,
boolean preserve)
|
Method Summary | |
---|---|
protected abstract LookupTable |
combine(LookupTable other,
int outBits,
boolean inverse,
short[] pval2out)
|
protected abstract LookupTable |
combine(LookupTable vlut,
LookupTable plut,
int outBits,
boolean inverse,
short[] pval2out)
|
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
DicomObject mLut,
DicomObject voiLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, non-linear Modality LUT and non-linear VOI LUT. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
DicomObject mLut,
DicomObject voiLut,
DicomObject pLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, non-linear Modality LUT, non-linear VOI LUT and non-linear Presentation LUT. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
DicomObject mLut,
float center,
float width,
java.lang.String vlutFct,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, non-linear Modality LUT and Window Center/Width. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
DicomObject mLut,
float center,
float width,
java.lang.String vlutFct,
DicomObject pLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, non-linear Modality LUT, Window Center/Width and non-linear Presentation LUT. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
float slope,
float intercept,
DicomObject voiLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, Rescale Slope/Intercept and non-linear VOI LUT. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
float slope,
float intercept,
DicomObject voiLut,
DicomObject pLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, Rescale Slope/Intercept, non-linear VOI LUT and non-linear Presentation LUT. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
float slope,
float intercept,
float center,
float width,
java.lang.String vlutFct,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create ramp or sigmoid LUT for given i/o range, Rescale Slope/Intercept and Window Center/Width. |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
float slope,
float intercept,
float center,
float width,
java.lang.String vlutFct,
DicomObject pLut,
boolean inverse,
short[] pval2out)
Deprecated. Please use createLut(int, boolean, int, float, float, float, float, String, DicomObject, boolean, short[], Integer, Integer)
Create LUT for given i/o range, Rescale Slope/Intercept, Window Center/Width and non-linear Presentation LUT. Apply no Window if Window Width = 0.
If |
static LookupTable |
createLut(int inBits,
boolean signed,
int outBits,
float slope,
float intercept,
float center,
float width,
java.lang.String vlutFct,
DicomObject pLut,
boolean inverse,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given i/o range, Rescale Slope/Intercept, Window Center/Width and non-linear Presentation LUT. |
static LookupTable |
createLutForImage(DicomObject img,
DicomObject mlutObj,
DicomObject voiObj,
DicomObject pLut,
float center,
float width,
java.lang.String vlutFct,
boolean inverse,
int outBits,
short[] pval2out)
Creates a LUT based on a set of provided objects. |
static LookupTable |
createLutForImage(DicomObject img,
int outBits,
short[] pval2out)
Create LUT for given DICOM image and output range. |
static LookupTable |
createLutForImageWithPR(DicomObject img,
DicomObject pr,
int frame,
float center,
float width,
java.lang.String vlutFct,
int outBits,
short[] pval2out)
Create LUT for given DICOM image with DICOM Presentation State and output range and possibly a window level over-ride. |
static LookupTable |
createLutFromVOISequence(DicomObject img,
DicomObject mLut,
DicomObject voiLut,
boolean inverse,
int outBits,
short[] pval2out)
Deprecated. Please use createLutFromVOISequence(DicomObject, DicomObject, DicomObject, boolean, int, short[], Integer, Integer)
Create LUT for given DICOM image, non-linear VOI LUT and output range.
If |
static LookupTable |
createLutFromVOISequence(DicomObject img,
DicomObject mLut,
DicomObject voiLut,
boolean inverse,
int outBits,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given DICOM image, non-linear VOI LUT and output range. |
static LookupTable |
createLutFromWL(DicomObject img,
DicomObject mLut,
float center,
float width,
java.lang.String vlutFct,
boolean inverse,
int outBits,
short[] pval2out)
Deprecated. Please use #createLut(DicomObject, DicomObject, float, float, String, boolean, int, short[], Integer, Integer)
Create LUT for given DICOM image, modality LUT, and Window Center/Width and output range. Apply no Window if Window Width = 0.
If |
static LookupTable |
createLutFromWL(DicomObject img,
DicomObject mLut,
float center,
float width,
java.lang.String vlutFct,
boolean inverse,
int outBits,
short[] pval2out,
java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
Create LUT for given DICOM image, modality LUT, and Window Center/Width and output range. |
static java.lang.Integer |
getIntPixelValue(DicomObject ds,
int tag,
boolean signed,
int stored)
Gets a pixel value from the given field - the field can be a regular integer or it can be ob data. |
static java.lang.Integer[] |
getMinMaxPixelPadding(java.lang.Integer pixelPaddingValue,
java.lang.Integer pixelPaddingRange)
|
int |
getOffset()
|
abstract int |
length()
|
byte[] |
lookup(byte[] src,
byte[] dst)
|
int[] |
lookup(byte[] src,
int[] dst,
int alpha)
|
abstract byte[] |
lookup(byte[] src,
int srcPos,
byte[] dst,
int dstPos,
int length,
int channels,
int skip)
|
abstract int[] |
lookup(byte[] src,
int srcPos,
int[] dst,
int dstPos,
int length,
int alpha)
|
void |
lookup(byte[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
byte[] dst,
int dstScanlineStride,
int channels,
int skip)
|
void |
lookup(byte[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
int[] dst,
int dstScanlineStride,
int alpha)
|
void |
lookup(byte[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
short[] dst,
int dstScanlineStride)
|
abstract short[] |
lookup(byte[] src,
int srcPos,
short[] dst,
int dstPos,
int length)
|
short[] |
lookup(byte[] src,
short[] dst)
|
void |
lookup(java.awt.image.DataBuffer src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
byte[] dst,
int dstScanlineStride,
int channels,
int skip,
int bank)
|
void |
lookup(java.awt.image.DataBuffer src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
int[] dst,
int dstScanlineStride,
int alpha)
|
void |
lookup(java.awt.image.DataBuffer src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
short[] dst,
int dstScanlineStride)
|
abstract int |
lookup(int in)
|
void |
lookup(java.awt.image.Raster src,
java.awt.image.Raster dst)
|
void |
lookup(java.awt.image.Raster src,
java.awt.image.Raster dst,
int alpha)
|
void |
lookup(java.awt.image.Raster src,
java.awt.image.Raster dst,
int alpha,
int channels,
int skip)
|
byte[] |
lookup(short[] src,
byte[] dst)
|
int[] |
lookup(short[] src,
int[] dst,
int alpha)
|
abstract byte[] |
lookup(short[] src,
int srcPos,
byte[] dst,
int dstPos,
int length)
|
abstract int[] |
lookup(short[] src,
int srcPos,
int[] dst,
int dstPos,
int length,
int alpha)
|
void |
lookup(short[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
byte[] dst,
int dstScanlineStride)
|
void |
lookup(short[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
int[] dst,
int dstScanlineStride,
int alpha)
|
void |
lookup(short[] src,
int srcWidth,
int srcHeight,
int srcScanlineStride,
short[] dst,
int dstScanlineStride)
|
short[] |
lookup(short[] src,
int srcPos,
short[] dst)
|
abstract short[] |
lookup(short[] src,
int srcPos,
short[] dst,
int dstPos,
int length)
|
abstract byte |
lookupByte(int in)
|
abstract short |
lookupShort(int in)
|
protected abstract LookupTable |
scale(int outBits,
boolean inverse,
short[] pval2out)
|
protected int |
toIndex(int in)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LINEAR
public static final java.lang.String SIGMOID
protected final int inBits
protected final int andmask
protected final int ormask
protected final int signbit
protected final boolean preserve
protected int outBits
protected int off
Constructor Detail |
---|
protected LookupTable(int inBits, boolean signed, int off, int outBits, boolean preserve)
Method Detail |
---|
public final int getOffset()
public abstract int length()
public abstract byte lookupByte(int in)
public abstract short lookupShort(int in)
public abstract int lookup(int in)
public abstract byte[] lookup(byte[] src, int srcPos, byte[] dst, int dstPos, int length, int channels, int skip)
public abstract short[] lookup(byte[] src, int srcPos, short[] dst, int dstPos, int length)
public abstract int[] lookup(byte[] src, int srcPos, int[] dst, int dstPos, int length, int alpha)
public abstract byte[] lookup(short[] src, int srcPos, byte[] dst, int dstPos, int length)
public abstract short[] lookup(short[] src, int srcPos, short[] dst, int dstPos, int length)
public abstract int[] lookup(short[] src, int srcPos, int[] dst, int dstPos, int length, int alpha)
public byte[] lookup(byte[] src, byte[] dst)
public short[] lookup(byte[] src, short[] dst)
public int[] lookup(byte[] src, int[] dst, int alpha)
public byte[] lookup(short[] src, byte[] dst)
public short[] lookup(short[] src, int srcPos, short[] dst)
public int[] lookup(short[] src, int[] dst, int alpha)
public void lookup(java.awt.image.Raster src, java.awt.image.Raster dst)
public void lookup(java.awt.image.Raster src, java.awt.image.Raster dst, int alpha)
public void lookup(java.awt.image.Raster src, java.awt.image.Raster dst, int alpha, int channels, int skip)
public void lookup(java.awt.image.DataBuffer src, int srcWidth, int srcHeight, int srcScanlineStride, byte[] dst, int dstScanlineStride, int channels, int skip, int bank)
public void lookup(java.awt.image.DataBuffer src, int srcWidth, int srcHeight, int srcScanlineStride, short[] dst, int dstScanlineStride)
public void lookup(java.awt.image.DataBuffer src, int srcWidth, int srcHeight, int srcScanlineStride, int[] dst, int dstScanlineStride, int alpha)
public void lookup(byte[] src, int srcWidth, int srcHeight, int srcScanlineStride, byte[] dst, int dstScanlineStride, int channels, int skip)
public void lookup(short[] src, int srcWidth, int srcHeight, int srcScanlineStride, byte[] dst, int dstScanlineStride)
public void lookup(byte[] src, int srcWidth, int srcHeight, int srcScanlineStride, short[] dst, int dstScanlineStride)
public void lookup(short[] src, int srcWidth, int srcHeight, int srcScanlineStride, short[] dst, int dstScanlineStride)
public void lookup(byte[] src, int srcWidth, int srcHeight, int srcScanlineStride, int[] dst, int dstScanlineStride, int alpha)
public void lookup(short[] src, int srcWidth, int srcHeight, int srcScanlineStride, int[] dst, int dstScanlineStride, int alpha)
protected abstract LookupTable scale(int outBits, boolean inverse, short[] pval2out)
protected abstract LookupTable combine(LookupTable other, int outBits, boolean inverse, short[] pval2out)
protected abstract LookupTable combine(LookupTable vlut, LookupTable plut, int outBits, boolean inverse, short[] pval2out)
protected final int toIndex(int in)
public static LookupTable createLut(int inBits, boolean signed, int outBits, float slope, float intercept, float center, float width, java.lang.String vlutFct, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If vlutFct
is null
or "LINEAR"
,
a ramp LUT will be created. If vlutFct
is
"SIGMOID"
, a sigmoid LUT will be created.
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangeslope
- Rescale Slope (0028,1053)intercept
- Rescale Intercept (0028,1052)center
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, DicomObject mLut, float center, float width, java.lang.String vlutFct, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangemLut
- item of Modality LUT Sequence (0028,3000)center
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, float slope, float intercept, DicomObject voiLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangeslope
- Rescale Slope (0028,1053)intercept
- Rescale Intercept (0028,1052)voiLut
- item of VOI LUT Sequence (0028,3010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, float slope, float intercept, float center, float width, java.lang.String vlutFct, DicomObject pLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangeslope
- Rescale Slope (0028,1053)intercept
- Rescale Intercept (0028,1052)center
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)pLut
- item of Presentation LUT Sequence (2050,0010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
@Deprecated public static LookupTable createLut(int inBits, boolean signed, int outBits, float slope, float intercept, float center, float width, java.lang.String vlutFct, DicomObject pLut, boolean inverse, short[] pval2out)
createLut(int, boolean, int, float, float, float, float, String, DicomObject, boolean, short[], Integer, Integer)
If pval2out
is not null
, the output
will be weighted according this function, where the highest
input value (p-value) maps to array index length-1 and the
highest output value (2^outBits-1) is represented by 0xFFFF.
Length of pval2out
must be equal to 2^inBits,
with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangeslope
- Rescale Slope (0028,1053)intercept
- Rescale Intercept (0028,1052)center
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)pLut
- item of Presentation LUT Sequence (2050,0010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, DicomObject mLut, DicomObject voiLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangemLut
- item of Modality LUT Sequence (0028,3000)voiLut
- item of VOI LUT Sequence (0028,3010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, float slope, float intercept, DicomObject voiLut, DicomObject pLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangeslope
- Rescale Slope (0028,1053)intercept
- Rescale Intercept (0028,1052)voiLut
- item of VOI LUT Sequence (0028,3010)pLut
- item of Presentation LUT Sequence (2050,0010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, DicomObject mLut, float center, float width, java.lang.String vlutFct, DicomObject pLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangemLut
- item of Modality LUT Sequence (0028,3000)center
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)pLut
- item of Presentation LUT Sequence (2050,0010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLut(int inBits, boolean signed, int outBits, DicomObject mLut, DicomObject voiLut, DicomObject pLut, boolean inverse, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
inBits
- number of significant bits within input valuessigned
- specifies if input values are signed or unsignedoutBits
- bit depth of output rangemLut
- item of Modality LUT Sequence (0028,3000)voiLut
- item of VOI LUT Sequence (0028,3010)pLut
- item of Presentation LUT Sequence (2050,0010)inverse
- specifies if output shall be invertedpval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLutForImage(DicomObject img, int outBits, short[] pval2out)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
img
- DICOM imageoutBits
- bit depth of output rangepval2out
- p-value to output map or null
@Deprecated public static LookupTable createLutFromWL(DicomObject img, DicomObject mLut, float center, float width, java.lang.String vlutFct, boolean inverse, int outBits, short[] pval2out)
#createLut(DicomObject, DicomObject, float, float, String, boolean, int, short[], Integer, Integer)
If pval2out
is not null
, the output
will be weighted according this function, where the highest
input value (p-value) maps to array index length-1 and the
highest output value (2^outBits-1) is represented by 0xFFFF.
Length of pval2out
must be equal to 2^inBits,
with inBits in the range [8, 16].
img
- DICOM imagemLut
- is the dicom object containing the modality LUT to applycenter
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)inverse
- is true when the output should be inverted.outBits
- bit depth of output rangepval2out
- p-value to output map or null
public static LookupTable createLutFromWL(DicomObject img, DicomObject mLut, float center, float width, java.lang.String vlutFct, boolean inverse, int outBits, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
img
- DICOM imagemLut
- is the dicom object containing the modality LUT to applycenter
- Window Center (0028,1050)width
- Window Width (0028,1051) or 0 (= no Window specified)vlutFct
- VOI LUT Function (0028,1056)inverse
- is true when the output should be inverted.outBits
- bit depth of output rangepval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
@Deprecated public static LookupTable createLutFromVOISequence(DicomObject img, DicomObject mLut, DicomObject voiLut, boolean inverse, int outBits, short[] pval2out)
createLutFromVOISequence(DicomObject, DicomObject, DicomObject, boolean, int, short[], Integer, Integer)
If pval2out
is not null
, the output
will be weighted according this function, where the highest
input value (p-value) maps to array index length-1 and the
highest output value (2^outBits-1) is represented by 0xFFFF.
Length of pval2out
must be equal to 2^inBits,
with inBits in the range [8, 16].
img
- DICOM imagemLut
- contains the modality LUT information.voiLut
- item of VOI LUT Sequence (0028,3010)outBits
- bit depth of output rangepval2out
- p-value to output map or null
public static LookupTable createLutFromVOISequence(DicomObject img, DicomObject mLut, DicomObject voiLut, boolean inverse, int outBits, short[] pval2out, java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
img
- DICOM imagemLut
- contains the modality LUT information.voiLut
- item of VOI LUT Sequence (0028,3010)outBits
- bit depth of output rangepval2out
- p-value to output map or null
pixelPaddingValue
- pixel padding value (0028, 0120) or null
pixelPaddingRange
- pixel padding range limit (0028, 0121) or null
public static LookupTable createLutForImageWithPR(DicomObject img, DicomObject pr, int frame, float center, float width, java.lang.String vlutFct, int outBits, short[] pval2out)
If pval2out
is not null
, the output will
be weighted according this function, where the highest input value
(p-value) maps to array index length-1 and the highest output value
(2^outBits-1) is represented by 0xFFFF. Length of pval2out
must be equal to 2^inBits, with inBits in the range [8, 16].
img
- DICOM image. Must not be null.pr
- DICOM Presentation State. If null, fall back to the image information.frame
- The frame number to use. Non-multi-frame objects can provide any value here, multi-frame objects must start this from frame 1 to frame n.center
- The window level centerwidth
- The window level widthvlutFct
- A function to use when applying the center/width. The center/width will only be used if this function is non-null.outBits
- bit depth of output range - typically 8, 10, 12 or 16pval2out
- p-value to output map or null
public static java.lang.Integer getIntPixelValue(DicomObject ds, int tag, boolean signed, int stored)
ds
- tag
-
public static LookupTable createLutForImage(DicomObject img, DicomObject mlutObj, DicomObject voiObj, DicomObject pLut, float center, float width, java.lang.String vlutFct, boolean inverse, int outBits, short[] pval2out)
img
- The image dicom object headermlutObj
- The object containing the modality LUT informationvoiObj
- The object containing the VOI LUT information (or null if none)pLut
- The Presentation LUT Sequence (or null if none)center
- An over-riding window centerwidth
- An over-riding window widthvlutFct
- An over-riding VOI LUT Function. Must be non-null to override.inverse
- True if the image should be inverted.outBits
- The number of output bits after everything.pval2out
- A p-value to output DDL (digital driving levels).
public static java.lang.Integer[] getMinMaxPixelPadding(java.lang.Integer pixelPaddingValue, java.lang.Integer pixelPaddingRange)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |