public class WrapperFloatMatrix3D extends FloatMatrix3D
Constructor and Description |
---|
WrapperFloatMatrix3D(FloatMatrix3D newContent) |
Modifier and Type | Method and Description |
---|---|
void |
dct2Slices(boolean scale)
Computes the 2D discrete cosine transform (DCT-II) of each slice of this
matrix.
|
void |
dct3(boolean scale)
Computes the 3D discrete cosine transform (DCT-II) of this matrix.
|
void |
dht2Slices()
Computes the 2D discrete Hertley transform (DHT) of each column of this
matrix.
|
void |
dht3()
Computes the 3D discrete Hartley transform (DHT) of this matrix.
|
void |
dst2Slices(boolean scale)
Computes the 2D discrete sine transform (DST-II) of each slice of this
matrix.
|
void |
dst3(boolean scale)
Computes the 3D discrete sine transform (DST-II) of this matrix.
|
Object |
elements()
Returns the elements of this matrix.
|
void |
fft3()
Computes the 3D discrete Fourier transform (DFT) of this matrix.
|
DenseLargeFComplexMatrix3D |
getFft2Slices()
Returns new complex matrix which is the 2D discrete Fourier transform
(DFT) of each slice of this matrix.
|
DenseLargeFComplexMatrix3D |
getFft3()
Returns new complex matrix which is the 3D discrete Fourier transform
(DFT) of this matrix.
|
DenseLargeFComplexMatrix3D |
getIfft2Slices(boolean scale)
Returns new complex matrix which is the 2D inverse of the discrete
Fourier transform (IDFT) of each slice of this matrix.
|
DenseLargeFComplexMatrix3D |
getIfft3(boolean scale)
Returns new complex matrix which is the 3D inverse of the discrete
Fourier transform (IDFT) of this matrix.
|
float |
getQuick(int slice,
int row,
int column)
Returns the matrix cell value at coordinate [slice,row,column].
|
void |
idct2Slices(boolean scale)
Computes the 2D inverse of the discrete cosine transform (DCT-III) of
each slice of this matrix.
|
void |
idct3(boolean scale)
Computes the 3D inverse of the discrete cosine transform (DCT-III) of
this matrix.
|
void |
idht2Slices(boolean scale)
Computes the 2D inverse of the discrete Hartley transform (DHT) of each
slice of this matrix.
|
void |
idht3(boolean scale)
Computes the 3D inverse of the discrete Hartley transform (DHT) of this
matrix.
|
void |
idst2Slices(boolean scale)
Computes the 2D inverse of the discrete sine transform (DST-III) of each
slice of this matrix.
|
void |
idst3(boolean scale)
Computes the 3D inverse of the discrete size transform (DST-III) of this
matrix.
|
void |
ifft3(boolean scale)
Computes the 3D inverse of the discrete Fourier transform (IDFT) of this
matrix.
|
FloatMatrix3D |
like(int slices,
int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type
as the receiver, having the specified number of slices, rows and columns.
|
FloatMatrix2D |
like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic
type, sharing the same cells.
|
void |
setQuick(int slice,
int row,
int column,
float value)
Sets the matrix cell at coordinate [slice,row,column] to the
specified value.
|
FloatMatrix1D |
vectorize()
Returns a vector obtained by stacking the columns of each slice of the
matrix on top of one another.
|
FloatMatrix2D |
viewColumn(int column)
Constructs and returns a new 2-dimensional slice view representing
the slices and rows of the given column.
|
FloatMatrix3D |
viewColumnFlip()
Constructs and returns a new flip view along the column axis.
|
FloatMatrix3D |
viewDice(int axis0,
int axis1,
int axis2)
Constructs and returns a new dice view; Swaps dimensions (axes);
Example: 3 x 4 x 5 matrix --> 4 x 3 x 5 matrix.
|
FloatMatrix3D |
viewPart(int slice,
int row,
int column,
int depth,
int height,
int width)
Constructs and returns a new sub-range view that is a
depth x height x width sub matrix starting at
[slice,row,column]; Equivalent to
view().part(slice,row,column,depth,height,width); Provided for
convenience only.
|
FloatMatrix2D |
viewRow(int row)
Constructs and returns a new 2-dimensional slice view representing
the slices and columns of the given row.
|
FloatMatrix3D |
viewRowFlip()
Constructs and returns a new flip view along the row axis.
|
FloatMatrix3D |
viewSelection(int[] sliceIndexes,
int[] rowIndexes,
int[] columnIndexes)
Constructs and returns a new selection view that is a matrix
holding the indicated cells.
|
FloatMatrix2D |
viewSlice(int slice)
Constructs and returns a new 2-dimensional slice view representing
the rows and columns of the given slice.
|
FloatMatrix3D |
viewSliceFlip()
Constructs and returns a new flip view along the slice axis.
|
FloatMatrix3D |
viewStrides(int _sliceStride,
int _rowStride,
int _columnStride)
Constructs and returns a new stride view which is a sub matrix
consisting of every i-th cell.
|
aggregate, aggregate, aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assign, cardinality, copy, equals, equals, get, getMaxLocation, getMinLocation, getNegativeValues, getNonZeros, getPositiveValues, like, normalize, set, toArray, toString, viewSelection, viewSorted, zAssign27Neighbors, zSum
checkShape, checkShape, columns, columnStride, index, rows, rowStride, size, slices, sliceStride, toStringShort
ensureCapacity, isView, trimToSize
clone
public WrapperFloatMatrix3D(FloatMatrix3D newContent)
public Object elements()
FloatMatrix3D
elements
in class FloatMatrix3D
public void dct3(boolean scale)
scale
- if true then scaling is performedpublic void dct2Slices(boolean scale)
scale
- if true then scaling is performedpublic void dst3(boolean scale)
scale
- if true then scaling is performedpublic void dst2Slices(boolean scale)
scale
- if true then scaling is performedpublic void dht3()
public void dht2Slices()
public void fft3()
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real forward transform, use
getFft3
. To get back the original
data, use ifft3
.IllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public DenseLargeFComplexMatrix3D getFft3()
public DenseLargeFComplexMatrix3D getIfft3(boolean scale)
public DenseLargeFComplexMatrix3D getFft2Slices()
public DenseLargeFComplexMatrix3D getIfft2Slices(boolean scale)
public void idct3(boolean scale)
scale
- if true then scaling is performedpublic void idct2Slices(boolean scale)
scale
- if true then scaling is performedpublic void idst3(boolean scale)
scale
- if true then scaling is performedpublic void idst2Slices(boolean scale)
scale
- if true then scaling is performedpublic void idht3(boolean scale)
scale
- if true then scaling is performedpublic void idht2Slices(boolean scale)
scale
- if true then scaling is performedpublic void ifft3(boolean scale)
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real inverse transform, use
getIfft3
.scale
- if true then scaling is performedIllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public float getQuick(int slice, int row, int column)
FloatMatrix3D
Provided with invalid parameters this method may return invalid objects without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
getQuick
in class FloatMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.public FloatMatrix3D like(int slices, int rows, int columns)
FloatMatrix3D
like
in class FloatMatrix3D
slices
- the number of slices the matrix shall have.rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.public void setQuick(int slice, int row, int column, float value)
FloatMatrix3D
Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
setQuick
in class FloatMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.value
- the value to be filled into the specified cell.public FloatMatrix1D vectorize()
FloatMatrix3D
vectorize
in class FloatMatrix3D
public FloatMatrix2D viewColumn(int column)
FloatMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewColumn
in class FloatMatrix3D
column
- the index of the column to fix.FloatMatrix3D.viewSlice(int)
,
FloatMatrix3D.viewRow(int)
public FloatMatrix3D viewColumnFlip()
FloatMatrix3D
viewColumnFlip
in class FloatMatrix3D
FloatMatrix3D.viewSliceFlip()
,
FloatMatrix3D.viewRowFlip()
public FloatMatrix2D viewSlice(int slice)
FloatMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewSlice
in class FloatMatrix3D
slice
- the index of the slice to fix.FloatMatrix3D.viewRow(int)
,
FloatMatrix3D.viewColumn(int)
public FloatMatrix3D viewSliceFlip()
FloatMatrix3D
viewSliceFlip
in class FloatMatrix3D
FloatMatrix3D.viewRowFlip()
,
FloatMatrix3D.viewColumnFlip()
public FloatMatrix3D viewDice(int axis0, int axis1, int axis2)
FloatMatrix3D
viewDice
in class FloatMatrix3D
axis0
- the axis that shall become axis 0 (legal values 0..2).axis1
- the axis that shall become axis 1 (legal values 0..2).axis2
- the axis that shall become axis 2 (legal values 0..2).public FloatMatrix3D viewPart(int slice, int row, int column, int depth, int height, int width)
FloatMatrix3D
viewPart
in class FloatMatrix3D
slice
- The index of the slice-coordinate.row
- The index of the row-coordinate.column
- The index of the column-coordinate.depth
- The depth of the box.height
- The height of the box.width
- The width of the box.public FloatMatrix2D viewRow(int row)
FloatMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewRow
in class FloatMatrix3D
row
- the index of the row to fix.FloatMatrix3D.viewSlice(int)
,
FloatMatrix3D.viewColumn(int)
public FloatMatrix3D viewRowFlip()
FloatMatrix3D
viewRowFlip
in class FloatMatrix3D
FloatMatrix3D.viewSliceFlip()
,
FloatMatrix3D.viewColumnFlip()
public FloatMatrix3D viewSelection(int[] sliceIndexes, int[] rowIndexes, int[] columnIndexes)
FloatMatrix3D
FloatMatrix2D.viewSelection(int[],int[])
.
Note that modifying the index arguments after this call has returned has no effect on the view. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
viewSelection
in class FloatMatrix3D
sliceIndexes
- The slices of the cells that shall be visible in the new view.
To indicate that all slices shall be visible, simply
set this parameter to null.rowIndexes
- The rows of the cells that shall be visible in the new view.
To indicate that all rows shall be visible, simply set
this parameter to null.columnIndexes
- The columns of the cells that shall be visible in the new
view. To indicate that all columns shall be visible,
simply set this parameter to null.public FloatMatrix3D viewStrides(int _sliceStride, int _rowStride, int _columnStride)
FloatMatrix3D
viewStrides
in class FloatMatrix3D
_sliceStride
- the slice step factor._rowStride
- the row step factor._columnStride
- the column step factor.public FloatMatrix2D like2D(int rows, int columns)
FloatMatrix3D
like2D
in class FloatMatrix3D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.Jump to the Parallel Colt Homepage