public class DicomTextureContent extends ReferenceCountedBase implements TextureContent
| Modifier and Type | Class and Description |
|---|---|
static class |
DicomTextureContent.ImagePanel
Simple class to help debug storage
|
TextureContent.ContentFormat| Modifier and Type | Field and Description |
|---|---|
static int |
COL_ROW_PLANE |
static int |
COL_SLICE_PLANE |
static int |
ROW_SLICE_PLANE |
| Constructor and Description |
|---|
DicomTextureContent(DicomImage image) |
| Modifier and Type | Method and Description |
|---|---|
DicomTextureContent |
acquire()
Signal the resource that something is holding a reference to it.
|
java.awt.image.BufferedImage |
createImage() |
void |
dispose() |
int |
getColumn() |
void |
getData(java.nio.ByteBuffer out)
Get raw byte data of content, rasterized in
row-major form, with (0,0) in the bottom-left
corner.
|
void |
getData(Rectangle rect,
java.nio.ByteBuffer out)
Get raw byte data for a region, rasterized in row-major
form with (0,0) in the bottom-left corner.
|
Rectangle |
getDirty()
The portion of the texture that has been modified (marked "dirty")
|
TextureContent.ContentFormat |
getFormat()
Format of data returned by
TextureContent.getData(java.nio.ByteBuffer) |
int |
getHeight()
Number of pixels across height in content
|
java.lang.Object |
getKey()
A key for referring to this texture.
|
int |
getPixelSize()
Size of pixels in bytes
|
int |
getRow() |
int |
getSlice() |
double |
getT()
Normalized time to use
|
Point2d[] |
getTextureCoordinates(int plane)
Texture coordinates for a given plane (
COL_ROW_PLANE,
ROW_SLICE_PLANE, or COL_SLICE_PLANE), starting with the
bottom-left corner and working around clockwise. |
int |
getTime() |
int |
getWidth()
Number of pixels across width in content
|
DicomWindowPixelInterpolator |
getWindowConverter() |
double |
getX()
Normalized row-slice plane position within volume
|
double |
getY()
Normalized col-slice plane position within volume
|
double |
getZ()
Normalized col-row plane position within volume
|
boolean |
isDirty()
All or part of the texture has been marked as "dirty" (i.e.
|
void |
markClean()
Mark the entire texture as being clean
|
void |
prerender()
Prepares texture content for rendering
|
void |
setColumn(int c)
column to use for the row-slice plane
|
void |
setRow(int r)
Row to use for the column-slice plane
|
void |
setSlice(int s)
Slice to use on col-row plane
|
void |
setT(double t)
Normalized time to use
|
void |
setTime(int t)
For 4D DICOM images, sets the time index for all slices
|
void |
setX(double x)
Normalized row-slice plane position within volume
|
void |
setY(double y)
Normalized col-slice plane position within volume
|
void |
setZ(double z)
Normalized col-row plane position within volume
|
void |
showTexture() |
acquireAndCount, getReferenceCount, release, releaseAndCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndCount, getReferenceCount, release, releaseAndCountpublic static final int COL_ROW_PLANE
public static final int COL_SLICE_PLANE
public static final int ROW_SLICE_PLANE
public DicomTextureContent(DicomImage image)
public DicomWindowPixelInterpolator getWindowConverter()
public void setColumn(int c)
c - column indexpublic int getColumn()
public void setRow(int r)
r - row indexpublic int getRow()
public void setSlice(int s)
s - slice indexpublic int getSlice()
public void setTime(int t)
t - time indexpublic int getTime()
public void setX(double x)
x - normalized column [0,1]public double getX()
public void setY(double y)
y - normalized row [0,1]public double getY()
public void setZ(double z)
z - normalized slice [0,1]public double getZ()
public void setT(double t)
t - normalized time [0,1]public double getT()
public int getWidth()
TextureContentgetWidth in interface TextureContentpublic int getHeight()
TextureContentgetHeight in interface TextureContentpublic Point2d[] getTextureCoordinates(int plane)
COL_ROW_PLANE,
ROW_SLICE_PLANE, or COL_SLICE_PLANE), starting with the
bottom-left corner and working around clockwise.plane - plane index to compute coordinates ofpublic int getPixelSize()
TextureContentgetPixelSize in interface TextureContentpublic void prerender()
public void getData(java.nio.ByteBuffer out)
TextureContentgetData in interface TextureContentpublic void getData(Rectangle rect, java.nio.ByteBuffer out)
TextureContentgetData in interface TextureContentrect - rectangular region to acquire data forout - buffer to fillpublic void showTexture()
public java.awt.image.BufferedImage createImage()
public boolean isDirty()
TextureContentisDirty in interface TextureContentpublic Rectangle getDirty()
TextureContentgetDirty in interface TextureContentpublic void markClean()
TextureContentmarkClean in interface TextureContentpublic TextureContent.ContentFormat getFormat()
TextureContentTextureContent.getData(java.nio.ByteBuffer)getFormat in interface TextureContentTextureContent.getData(java.nio.ByteBuffer)public java.lang.Object getKey()
TextureContentgetKey in interface TextureContentpublic DicomTextureContent acquire()
ReferenceCountedacquire in interface TextureContentacquire in interface ReferenceCountedacquire in class ReferenceCountedBasepublic void dispose()