public class DicomPlaneTextureContent extends ReferenceCountedBase implements TextureContent
Modifier and Type | Class and Description |
---|---|
static class |
DicomPlaneTextureContent.ImagePanel
Simple class to help debug storage
|
TextureContent.ContentFormat
Constructor and Description |
---|
DicomPlaneTextureContent(DicomImage image,
RigidTransform3d plane,
Vector2d widths) |
DicomPlaneTextureContent(DicomImage image,
RigidTransform3d plane,
Vector2d widths,
Vector2i res) |
Modifier and Type | Method and Description |
---|---|
DicomPlaneTextureContent |
acquire()
Signal the resource that something is holding a reference to it.
|
java.awt.image.BufferedImage |
createImage() |
void |
dispose() |
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.
|
RigidTransform3d |
getLocation() |
int |
getPixelSize()
Size of pixels in bytes
|
boolean |
getSpatialInterpolation() |
double |
getT()
Normalized time to use
|
Point2d[] |
getTextureCoordinates()
Texture coordinates, starting with the
bottom-left corner and working around clockwise.
|
Vector2d |
getTextureCoordinateScaling() |
int |
getTime() |
int |
getWidth()
Number of pixels across width in content
|
DicomWindowPixelInterpolator |
getWindowConverter() |
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 |
setLocation(RigidTransform3d loc) |
void |
setSpatialInterpolation(boolean set)
Linearly interpolate between voxels
|
void |
setT(double t)
Normalized time to use
|
void |
setTime(int t)
For 4D DICOM images, sets the time index for all slices
|
void |
setWidths(Vector2d widths) |
void |
showTexture() |
acquireAndCount, getReferenceCount, release, releaseAndCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
acquireAndCount, getReferenceCount, release, releaseAndCount
public DicomPlaneTextureContent(DicomImage image, RigidTransform3d plane, Vector2d widths)
public DicomPlaneTextureContent(DicomImage image, RigidTransform3d plane, Vector2d widths, Vector2i res)
public DicomWindowPixelInterpolator getWindowConverter()
public void setSpatialInterpolation(boolean set)
set
- if true, interpolates, otherwise uses nearest voxelpublic boolean getSpatialInterpolation()
public void setLocation(RigidTransform3d loc)
public RigidTransform3d getLocation()
public void setWidths(Vector2d widths)
public void setTime(int t)
t
- time indexpublic int getTime()
public void setT(double t)
t
- normalized time [0,1]public double getT()
public int getWidth()
TextureContent
getWidth
in interface TextureContent
public int getHeight()
TextureContent
getHeight
in interface TextureContent
public Vector2d getTextureCoordinateScaling()
public Point2d[] getTextureCoordinates()
public int getPixelSize()
TextureContent
getPixelSize
in interface TextureContent
public void prerender()
public void getData(java.nio.ByteBuffer out)
TextureContent
getData
in interface TextureContent
public void getData(Rectangle rect, java.nio.ByteBuffer out)
TextureContent
getData
in interface TextureContent
rect
- rectangular region to acquire data forout
- buffer to fillpublic void showTexture()
public java.awt.image.BufferedImage createImage()
public boolean isDirty()
TextureContent
isDirty
in interface TextureContent
public Rectangle getDirty()
TextureContent
getDirty
in interface TextureContent
public void markClean()
TextureContent
markClean
in interface TextureContent
public TextureContent.ContentFormat getFormat()
TextureContent
TextureContent.getData(java.nio.ByteBuffer)
getFormat
in interface TextureContent
TextureContent.getData(java.nio.ByteBuffer)
public java.lang.Object getKey()
TextureContent
getKey
in interface TextureContent
public DicomPlaneTextureContent acquire()
ReferenceCounted
acquire
in interface TextureContent
acquire
in interface ReferenceCounted
acquire
in class ReferenceCountedBase
public void dispose()