public class Volume extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
Volume.AverageByteLoader |
protected class |
Volume.ByteImage |
protected class |
Volume.ByteLoader |
protected static interface |
Volume.InputImage
Abstract interface for the input image.
|
protected class |
Volume.IntImage |
protected class |
Volume.IntLoader |
protected static interface |
Volume.Loader
Abstract interface for the loader classes.
|
protected class |
Volume.SaturatedIntLoader |
Modifier and Type | Field and Description |
---|---|
protected boolean |
average
Flag indicating that the channels should be averaged
|
static int |
BYTE_DATA
Data is read as byte data.
|
protected boolean[] |
channels
Channels in RGB images which should be loaded
|
protected int |
dataType
Indicates in which format the data is loaded.
|
protected Volume.InputImage |
image
Wraping the ImagePlus
|
protected ij.ImagePlus |
imp
The image holding the data
|
static int |
INT_DATA
Data is read as int data.
|
protected Volume.Loader |
loader
The loader, initialized depending on the data type
|
Point3d |
maxCoord
The maximum coordinate of the data
|
Point3d |
minCoord
The minimum coordinate of the data
|
double |
pd
The calibration of the data
|
double |
ph
The calibration of the data
|
double |
pw
The calibration of the data
|
protected boolean |
saturatedVolumeRendering
Flag indicating that channels should be saturated
|
int |
xDim
The dimensions of the data
|
int |
yDim
The dimensions of the data
|
int |
zDim
The dimensions of the data
|
Modifier | Constructor and Description |
---|---|
protected |
Volume()
Create instance with a null imp.
|
|
Volume(ij.ImagePlus imp)
Initializes this Volume with the specified image.
|
|
Volume(ij.ImagePlus imp,
boolean[] ch)
Initializes this Volume with the specified image and channels.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
getAlphaLUT(int[] lut)
Copies the current color table into the given array.
|
byte |
getAverage(int x,
int y,
int z)
Load the average value at the specified position
|
void |
getBlueLUT(int[] lut)
Copies the current color table into the given array.
|
int |
getDataType()
Get the current set data type.
|
void |
getGreenLUT(int[] lut)
Copies the current color table into the given array.
|
ij.ImagePlus |
getImagePlus() |
void |
getRedLUT(int[] lut)
Copies the current color table into the given array.
|
protected boolean |
initDataType()
Init the data type.
|
protected void |
initLoader()
Init the loader, based on the currently set data type, which is either
INT_DATA or BYTE_DATA.
|
boolean |
isAverage()
Returns true if specified channels are being averaged when reading the
image data.
|
boolean |
isDefaultLUT()
Checks if the LUTs of all the used color channels and of the alpha channel
have a default LUT.
|
boolean |
isSaturatedVolumeRendering()
Returns whether if saturatedVolumeRendering is set to true.
|
int |
load(int x,
int y,
int z)
Load the value at the specified position
|
int |
loadWithLUT(int x,
int y,
int z)
Load the color at the specified position
|
void |
restore(String path) |
void |
set(int x,
int y,
int z,
int v) |
boolean |
setAlphaLUTFullyOpaque()
Set the alpha channel to fully opaque.
|
boolean |
setAverage(boolean a)
If true, build an average byte from the specified channels (for each
pixel).
|
boolean |
setChannels(boolean[] ch)
Specify the channels which should be read from the image.
|
void |
setImage(ij.ImagePlus imp,
boolean[] ch) |
boolean |
setLUTs(int[] r,
int[] g,
int[] b,
int[] a)
Set the lookup tables for this volume.
|
void |
setNoCheck(int x,
int y,
int z,
int v) |
boolean |
setSaturatedVolumeRendering(boolean b)
If true, saturate the channels of RGB images; the RGB values of each pixels
are scaled so that at least one of the values is 255, the alpha value is
the average of the original RGB values.
|
void |
swap(String path) |
public static final int INT_DATA
public static final int BYTE_DATA
protected ij.ImagePlus imp
protected Volume.InputImage image
protected Volume.Loader loader
protected int dataType
protected boolean average
protected boolean saturatedVolumeRendering
protected boolean[] channels
public int xDim
public int yDim
public int zDim
public double pw
public double ph
public double pd
public final Point3d minCoord
public final Point3d maxCoord
protected Volume()
public Volume(ij.ImagePlus imp)
imp
- public Volume(ij.ImagePlus imp, boolean[] ch)
imp
- ch
- A boolean[] array of length three, which indicates whether the
red, blue and green channel should be read. This has only an
effect when reading color images.public void setImage(ij.ImagePlus imp, boolean[] ch)
public ij.ImagePlus getImagePlus()
public void clear()
public void swap(String path)
public void restore(String path)
public boolean isDefaultLUT()
public int getDataType()
public boolean setAverage(boolean a)
public boolean isAverage()
public boolean setSaturatedVolumeRendering(boolean b)
public boolean isSaturatedVolumeRendering()
public void getRedLUT(int[] lut)
public void getGreenLUT(int[] lut)
public void getBlueLUT(int[] lut)
public void getAlphaLUT(int[] lut)
public boolean setChannels(boolean[] ch)
public boolean setLUTs(int[] r, int[] g, int[] b, int[] a)
public boolean setAlphaLUTFullyOpaque()
protected void initLoader()
protected boolean initDataType()
public void setNoCheck(int x, int y, int z, int v)
public void set(int x, int y, int z, int v)
public int load(int x, int y, int z)
x
- y
- z
- public int loadWithLUT(int x, int y, int z)
x
- y
- z
- public byte getAverage(int x, int y, int z)
x
- y
- z
- Copyright © 2015–2021 Fiji. All rights reserved.