Class AlgorithmTransform
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Also includes static methods to transform images. Once caution - these static methods are NOT run in a separate thread. Consequently, if a progress bar is sent into the method to update progress, it should not include a cancel button because the user is unable to cancel a static transformation. If we want a transformation to have the ability to be cancelled, we should NOT use the static method, but rather construct a new AlgorithmTransform and run the algorithm using the standard .run() method.
NOTE for possible improvements in the future. To move images into "mm" space we presently multiple by voxel resolutions as we loop through the dimensions. A more efficent method is to modify the scale values of the the transformation matrix (i.e. the diagonals). This would speed the process by reducing the number of mults and divisions. Not sure how much but faster is better. Change should happen here and in the JDialogTransform interface.
This version of AlgorithmTransform includes a flag (passed as the last parameter) indicating whether to pad the image volume.
- Version:
- 0.1 Nov, 1999
- Author:
- Delia McGarry, William Gandler, Matthew McAuliffe, Zohara Cohen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int[]DOCUMENT ME!static final intBiilinear interpolation.static final intCubic bspline interpolation.static final intQuadratic bspline interpolation.private intDOCUMENT ME!private WildMagic.LibFoundation.Mathematics.Vector3fDOCUMENT ME!private booleanDOCUMENT ME!static final intCubic lagrangian interpolation.private ModelImageDOCUMENT ME!private float[]DOCUMENT ME!private intDOCUMENT ME!private static int[]DOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private floatUsed for out of bounds values in the transformation routines.private booleanstatic final intHeptic lagrangian interpolation.private double[]DOCUMENT ME!private float[]DOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private static intDOCUMENT ME!private static float[]DOCUMENT ME!private final intDOCUMENT ME!private booleanflag for determining if the transform is for scanner anatomical (->AXIAL).private intprivate final intDOCUMENT ME!private floatDOCUMENT ME!private final intDOCUMENT ME!private floatDOCUMENT ME!private intprivate floatprivate static int[]DOCUMENT ME!private ModelImageDOCUMENT ME!static final intNearest neighbor interpolation.private intDOCUMENT ME!private final int[]DOCUMENT ME!private intDOCUMENT ME!private final floatDOCUMENT ME!private intDOCUMENT ME!private final floatDOCUMENT ME!private intDOCUMENT ME!private floatprivate booleanDOCUMENT ME!static final intQuintic lagrangian interpolation.private ModelImageDOCUMENT ME!private static floatDOCUMENT ME!private static floatprivate booleanprivate booleanDOCUMENT ME!private final TransMatrixDOCUMENT ME!static final intTrilinear interpolation.private static booleanDOCUMENT ME!static final intWindowed sinc interpolation.Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, boolean tVOI, boolean clip, boolean pad) 3D constructor for transformation algorithm.AlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, int[] units, boolean tVOI, boolean clip, boolean pad) Creates a new $class.name$ object.AlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, int[] units, boolean tVOI, boolean clip, boolean pad, boolean doCenter, WildMagic.LibFoundation.Mathematics.Vector3f center) Creates a new $class.name$ object.AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, boolean tVOI, boolean clip, boolean pad) 2D constructor for transformation algorithm.AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, int[] units, boolean tVOI, boolean clip, boolean pad) Creates a new AlgorithmTransform object.AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, int[] units, boolean tVOI, boolean clip, boolean pad, boolean doCenter, WildMagic.LibFoundation.Mathematics.Vector3f center) Creates a new AlgorithmTransform object. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelImagebspline(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on black and white image data.static ModelImagebspline4D(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on black and white image data in 4D image.static ModelImagebsplineC(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on color image data.static ModelImagebsplineC4D(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on color image data in 4D image.voidDispose of local variables that may be taking up lots of room.voidfinalize()Prepares this class for destruction.private int[]getImageMargins(ModelImage srcImage, TransMatrix transMatrix, float dxOut, float dyOut) Calculate necessary padding for image given applied transform.static int[]getImageMargins(ModelImage srcImage, TransMatrix transMatrix, float dxOut, float dyOut, float dzOut) Calculate necessary padding for image given applied transform.Returns transformed volume.static final TransMatrixmatrixtoInverseArray(TransMatrix transMatrix) Converts matrix to inverse array.voidStarts the program.voidsetCenter(WildMagic.LibFoundation.Mathematics.Vector3f center) DOCUMENT ME!voidsetDoCenter(boolean doCenter) DOCUMENT ME!voidsetFillValue(float fillValue) Set value for out of bounds transformation values.voidsetPadValue(float padValue) Deprecated.The value is not just used for padding.voidsetSuppressProgressBar(boolean suppressProgressBar) voidsetUpdateOriginFlag(boolean originFlag) Sets the origin flag used indicated that origin should be changed based using the supplied transformation matrix.voidsetUseScannerAnatomical(boolean useSA) Sets the tranform to set orientation to AXIAL (this is a scanner anatomical transform).private voidCreates buffer for new image, prepares transformation matrix, and calls transform function for interpolation specified.private voidtransform25DVOI(ModelImage image, double[] imgBuffer, TransMatrix kTM) Transforms and resamples a 3D VOI using nearest neighbor interpolation.private voidtransform2DVOI(ModelImage image, double[] imgBuffer, TransMatrix kTM) Transforms and resamples a 2D VOI using nearest neighbor interpolation.private voidtransform3DVOI(ModelImage image, double[] imgBuffer, TransMatrix kTM) Transforms and resamples a 3D VOI using nearest neighbor interpolation.private voidtransform3DVOIByte(ModelImage image, byte[] imgBuffer, TransMatrix kTM) Transforms and resamples a 3D VOI using nearest neighbor interpolation.private voidtransformAlgorithmBspline2D(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples volume using Bspline interpolation.private voidtransformAlgorithmBspline2DC(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples volume using Bspline interpolation.private voidtransformAlgorithmBspline3D(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples volume using Bspline interpolation.private voidtransformAlgorithmBspline3DC(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples volume using Bspline interpolation.private voidtransformAlgorithmBspline4D(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples volume using Bspline interpolation.private voidtransformAlgorithmBspline4DC(double[] imgBuf, TransMatrix kTM, int degree) Transforms and resamples color volume using Bspline interpolation.private voidtransformBilinear(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation.static final voidtransformBilinear(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres, ViewJProgressBar progressBar) Transforms using bilinear interpolation.static final voidtransformBilinear(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.static final voidtransformBilinear(float[] imgBuf, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, ViewJProgressBar progressBar) Transforms using bilinear interpolation.static final voidtransformBilinear(float[] imgBuf, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.static final voidtransformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar) Transforms using bilinear interpolation.static final voidtransformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.static final voidtransformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage, float fillValue) Transforms using bilinear interpolation.private voidtransformBilinear3D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation.private voidtransformBilinear3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation (2.5D) This version used with color images.private voidtransformBilinear4D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation (2.5D) Used as a slice only algorithm on 3D images.private voidtransformBilinear4DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation This version used with color images This alogorithm used on a slice by slice basis on 4D images.private voidtransformBilinearC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using bilinear interpolation.static final voidtransformBilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, float oXres, float oYres) Used on color images.static final voidtransformBilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, float oXres, float oYres, float fillValue) Used on color images.private voidtransformCubicLagrangian2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation.private voidtransformCubicLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation.private voidtransformCubicLagrangian3D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation.private voidtransformCubicLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation.private voidtransformCubicLagrangian3Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation Does a slice by slice cubic Lagrangian interpolation on a 3 dimensional object.private voidtransformCubicLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.private voidtransformCubicLagrangian4D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D cubic Lagrangian interpolation.private voidtransformCubicLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D cubic Lagrangian interpolation.private voidtransformCubicLagrangian4Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation Does a slice by slice cubic Lagrangian interpolation on a 4 dimensional object.private voidtransformCubicLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.private voidtransformHepticLagrangian2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation.private voidtransformHepticLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images.private voidtransformHepticLagrangian3D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation.private voidtransformHepticLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images.private voidtransformHepticLagrangian3Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation Does a slice by slice heptic Lagrangian interpolation on a 3 dimensional object.private voidtransformHepticLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.private voidtransformHepticLagrangian4D(double[] imgBuf, TransMatrix kTM, boolean clip) transforms and resamples 4 dimensional object using 3D heptic Lagrangian interpolation.private voidtransformHepticLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) transforms and resamples 4 dimensional object using 3D heptic Lagrangian interpolation.private voidtransformHepticLagrangian4Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation Does a slice by slice heptic Lagrangian interpolation on a 4 dimensional object.private voidtransformHepticLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.private voidtransformNearestNeighbor2D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.static final voidtransformNearestNeighbor2D(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int xdim, int ydim) Transforms using Nearest neighbor interpolation.static final voidtransformNearestNeighbor2D(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres) Transforms using Nearest neighbor interpolation.private voidtransformNearestNeighbor2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor3D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.static final voidtransformNearestNeighbor3D(float[] imgBuf, ModelImage transformedImg, int Xdim, int Ydim, int Zdim, TransMatrix trans) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor3Dim2D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor4D(double[] imgBuf, TransMatrix kTM) Transforms and resamples 4 dimensional object using 3D algorithm using nearest neighbor interpolation.private voidtransformNearestNeighbor4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM) Transforms and resamples 4 dimensional object using 3D algorithm using nearest neighbor interpolation.private voidtransformNearestNeighbor4Dim2D(double[] imgBuf, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformNearestNeighbor4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM) Transforms and resamples volume using nearest neighbor interpolation.private voidtransformQuinticLagrangian2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation.private voidtransformQuinticLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images.private voidtransformQuinticLagrangian3D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation.private voidtransformQuinticLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images.private voidtransformQuinticLagrangian3Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation Does a slice by slice quintic Lagrangian interpolation on a 3 dimensional object.private voidtransformQuinticLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.private voidtransformQuinticLagrangian4D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D quintic Lagrangian interpolation.private voidtransformQuinticLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional color object using 3D quintic Lagrangian interpolation.private voidtransformQuinticLagrangian4Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation Does a slice by slice quintic Lagrangian interpolation on a 4 dimensional object.private voidtransformQuinticLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.private voidtransformTrilinear(double[] imgBuffer, TransMatrix kTM) Transforms and resamples a 3D volume using trilinear interpolation.static final voidtransformTrilinear(float[] imgBuffer, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(float[] imgBuffer, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(float[] imgBuffer, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(float[] imgBuffer, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.static final voidtransformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage, float fillValue) Transforms and resamples volume using trilinear interpolation.private voidtransformTrilinear4D(double[] imgBuffer, TransMatrix kTM) Transforms and resamples 4 dimensional object using trilinear interpolation.static ModelImagetransformTrilinear4D(ModelImage image, ModelImage resultImage, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on black and white image data in a 4D image.private voidtransformTrilinear4DByteC(byte[] imgBuffer, byte[] imgBuffer2, TransMatrix kTM) Transforms and resamples 4 dimensional color ARGB object using trilinear interpolation.private voidtransformTrilinear4DC(double[] imgBuffer, float[] imgBuffer2, TransMatrix kTM) Transforms and resamples 4 dimensional color object using trilinear interpolation.private voidtransformTrilinearByteC(byte[] imgBuffer, byte[] imgBuffer2, TransMatrix kTM) Transforms and resamples volume using trilinear interpolation This version is used with ARGB color images.private voidtransformTrilinearC(double[] imgBuffer, float[] imgBuffer2, TransMatrix kTM) Transforms and resamples volume using trilinear interpolation This version is used with color images.static ModelImagetransformTrilinearC(ModelImage image, ModelImage resultImage, float[] imgBuffer, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on color image data.static final voidtransformTrilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres) Transforms and resamples volume using trilinear interpolation Use on color images USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE.static final voidtransformTrilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, float fillValue) Transforms and resamples volume using trilinear interpolation Use on color images USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE.static ModelImagetransformTrilinearC4D(ModelImage image, ModelImage resultImage, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on color image data in a 4D image.private voidtransformWSinc2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation.private voidtransformWSinc2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation This version used with color images.private voidtransformWSinc3D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation.private voidtransformWSinc3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation This version used with color images.private voidtransformWSinc3Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation Does a slice by slice windowed sinc interpolation on a 3 dimensional object.private voidtransformWSinc3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.private voidtransformWSinc4D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D windowed sinc interpolation.private voidtransformWSinc4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D windowed sinc interpolation.private voidtransformWSinc4Dim2D(double[] imgBuf, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation Does a slice by slice windowed sinc interpolation on a 4 dimensional object.private voidtransformWSinc4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using windowed sinc interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.private static voidupdateFileInfo(ModelImage image, ModelImage resultImage, float[] resolutions, int[] units, TransMatrix matrix, boolean useSATransform, AlgorithmBase srcAlg) Copy important file information to resultant image structure.private voidTranslate the image origin from image space to patient space (scanner space).private static voidupdateOrigin(TransMatrix xfrm) Update origin.private voidUpdate origin to reflect padding.private voidUpdate origin to reflect padding.Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
TRILINEAR
public static final int TRILINEARTrilinear interpolation.- See Also:
-
BILINEAR
public static final int BILINEARBiilinear interpolation.- See Also:
-
NEAREST_NEIGHBOR
public static final int NEAREST_NEIGHBORNearest neighbor interpolation.- See Also:
-
BSPLINE3
public static final int BSPLINE3Cubic bspline interpolation.- See Also:
-
BSPLINE4
public static final int BSPLINE4Quadratic bspline interpolation.- See Also:
-
CUBIC_LAGRANGIAN
public static final int CUBIC_LAGRANGIANCubic lagrangian interpolation.- See Also:
-
QUINTIC_LAGRANGIAN
public static final int QUINTIC_LAGRANGIANQuintic lagrangian interpolation.- See Also:
-
HEPTIC_LAGRANGIAN
public static final int HEPTIC_LAGRANGIANHeptic lagrangian interpolation.- See Also:
-
WSINC
public static final int WSINCWindowed sinc interpolation.- See Also:
-
updateOrigin
private static boolean updateOriginDOCUMENT ME! -
imgOrigin
private static float[] imgOriginDOCUMENT ME! -
imgOrient
private static int imgOrientDOCUMENT ME! -
axisOrient
private static int[] axisOrientDOCUMENT ME! -
direct
private static int[] directDOCUMENT ME! -
margins
private static int[] marginsDOCUMENT ME! -
startPos
private static float startPosDOCUMENT ME! -
startTime
private static float startTime -
bufferFactor
private int bufferFactorDOCUMENT ME! -
center
private WildMagic.LibFoundation.Mathematics.Vector3f centerDOCUMENT ME! -
clip
private boolean clipDOCUMENT ME! -
destResolutions
private float[] destResolutionsDOCUMENT ME! -
DIM
private int DIMDOCUMENT ME! -
do25D
private boolean do25DDOCUMENT ME! -
doCenter
private boolean doCenterDOCUMENT ME! -
imgBuf
private double[] imgBufDOCUMENT ME! -
imgBuf2
private float[] imgBuf2DOCUMENT ME! -
imgLength
private int imgLengthDOCUMENT ME! -
imgLength2
private int imgLength2DOCUMENT ME! -
interp
private final int interpDOCUMENT ME! -
isSATransform
private boolean isSATransformflag for determining if the transform is for scanner anatomical (->AXIAL). -
iXdim
private final int iXdimDOCUMENT ME! -
iYdim
private final int iYdimDOCUMENT ME! -
iZdim
private int iZdim -
iTdim
private int iTdim -
iXres
private float iXresDOCUMENT ME! -
iYres
private float iYresDOCUMENT ME! -
iZres
private float iZres -
oUnits
private final int[] oUnitsDOCUMENT ME! -
oXdim
private int oXdimDOCUMENT ME! -
oYdim
private int oYdimDOCUMENT ME! -
oZdim
private int oZdimDOCUMENT ME! -
oTdim
private int oTdimDOCUMENT ME! -
oXres
private final float oXresDOCUMENT ME! -
oYres
private final float oYresDOCUMENT ME! -
oZres
private float oZres -
pad
private boolean padDOCUMENT ME! -
fillValue
private float fillValueUsed for out of bounds values in the transformation routines. Set to (float)srcImage.getMin() in the constructors. -
srcImage
DOCUMENT ME! -
destImage
DOCUMENT ME! -
maskImage
DOCUMENT ME! -
transformVOI
private boolean transformVOIDOCUMENT ME! -
transMatrix
DOCUMENT ME! -
haveCentered
private boolean haveCentered -
suppressProgressBar
private boolean suppressProgressBar
-
-
Constructor Details
-
AlgorithmTransform
public AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, boolean tVOI, boolean clip, boolean pad) 2D constructor for transformation algorithm. Also used for 2.5D algorithms on 3D and 4D images.- Parameters:
srcImage- ModelImage to be transformedxfrm- Transformation matrix to be appliedinterp- Type of interpolation (NEAREST_NEIGHBOR, BILINEAR, BSPLINE3, BSPLINE4, etc)oXres- X resolution of output imageoYres- Y resolution of output imageoXdim- X dimension of output imageoYdim- Y dimension of output imagetVOI- iftruethe VOI should be transformed with the volumeclip- iftrueoutput range is clipped to input rangepad- iftrueoutput image is padded so that none of the image is clipped
-
AlgorithmTransform
public AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, int[] units, boolean tVOI, boolean clip, boolean pad) Creates a new AlgorithmTransform object.- Parameters:
srcImage- ModelImage to be transformedxfrm- Transformation matrix to be appliedinterp- Type of interpolation (NEAREST_NEIGHBOR, BILINEAR, BSPLINE3, BSPLINE4, etc)oXres- X resolution of output imageoYres- Y resolution of output imageoXdim- X dimension of output imageoYdim- Y dimension of output imageunits- DOCUMENT ME!tVOI- iftruethe VOI should be transformed with the volumeclip- iftrueoutput range is clipped to input rangepad- iftrueoutput image is padded so that none of the image is clipped
-
AlgorithmTransform
public AlgorithmTransform(ModelImage srcImage, TransMatrix xfrm, int interp, float oXres, float oYres, int oXdim, int oYdim, int[] units, boolean tVOI, boolean clip, boolean pad, boolean doCenter, WildMagic.LibFoundation.Mathematics.Vector3f center) Creates a new AlgorithmTransform object.- Parameters:
srcImage- DOCUMENT ME!xfrm- DOCUMENT ME!interp- DOCUMENT ME!oXres- DOCUMENT ME!oYres- DOCUMENT ME!oXdim- DOCUMENT ME!oYdim- DOCUMENT ME!units- DOCUMENT ME!tVOI- DOCUMENT ME!clip- DOCUMENT ME!pad- DOCUMENT ME!doCenter-center-
-
AlgorithmTransform
public AlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, boolean tVOI, boolean clip, boolean pad) 3D constructor for transformation algorithm. Also used for 3D algorithms on 4D images.- Parameters:
_srcImage- ModelImage to be transformedxfrm- Transformation matrix to be appliedinterp- Type of interpolation (NEAREST_NEIGHBOR, TRILINEAR, BSPLINE3, BSPLINE4, etc)_oXres- X resolution of output image_oYres- Y resolution of output image_oZres- Z resolution of output image_oXdim- X dimension of output image_oYdim- Y dimension of output image_oZdim- Z dimension of output imagetVOI- iftruethe VOI should be transformed with the volumeclip- iftrueoutput range is clipped to input rangepad- iftrueoutput image is padded so that none of the image is clipped
-
AlgorithmTransform
public AlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, int[] units, boolean tVOI, boolean clip, boolean pad) Creates a new $class.name$ object.- Parameters:
_srcImage- DOCUMENT ME!xfrm- DOCUMENT ME!interp- DOCUMENT ME!_oXres- DOCUMENT ME!_oYres- DOCUMENT ME!_oZres- DOCUMENT ME!_oXdim- DOCUMENT ME!_oYdim- DOCUMENT ME!_oZdim- DOCUMENT ME!units- DOCUMENT ME!tVOI- DOCUMENT ME!clip- DOCUMENT ME!pad- DOCUMENT ME!
-
AlgorithmTransform
public AlgorithmTransform(ModelImage _srcImage, TransMatrix xfrm, int interp, float _oXres, float _oYres, float _oZres, int _oXdim, int _oYdim, int _oZdim, int[] units, boolean tVOI, boolean clip, boolean pad, boolean doCenter, WildMagic.LibFoundation.Mathematics.Vector3f center) Creates a new $class.name$ object.- Parameters:
_srcImage- DOCUMENT ME!xfrm- DOCUMENT ME!interp- DOCUMENT ME!_oXres- DOCUMENT ME!_oYres- DOCUMENT ME!_oZres- DOCUMENT ME!_oXdim- DOCUMENT ME!_oYdim- DOCUMENT ME!_oZdim- DOCUMENT ME!units- DOCUMENT ME!tVOI- DOCUMENT ME!clip- DOCUMENT ME!pad- DOCUMENT ME!doCenter-center-
-
-
Method Details
-
setSuppressProgressBar
public void setSuppressProgressBar(boolean suppressProgressBar) - Parameters:
suppressProgressBar-
-
bspline
public static ModelImage bspline(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on black and white image data.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.degree- Degree of the spline algorithm, either 3 or 4.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
bspline4D
public static ModelImage bspline4D(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on black and white image data in 4D image. Works time slice by time slice.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.degree- Degree of the spline algorithm, either 3 or 4.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
bsplineC
public static ModelImage bsplineC(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on color image data.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.degree- Degree of the spline algorithm, either 3 or 4.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
bsplineC4D
public static ModelImage bsplineC4D(ModelImage image, ModelImage resultImage, int degree, TransMatrix xfrm, ViewJProgressBar progressBar) Performs bspline interpolation on color image data in 4D image. Works time slice by time slice.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.degree- Degree of the spline algorithm, either 3 or 4.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
getImageMargins
public static int[] getImageMargins(ModelImage srcImage, TransMatrix transMatrix, float dxOut, float dyOut, float dzOut) Calculate necessary padding for image given applied transform.- Parameters:
srcImage- DOCUMENT ME!transMatrix- array with transformation matrixdxOut- DOCUMENT ME!dyOut- DOCUMENT ME!dzOut- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
matrixtoInverseArray
Converts matrix to inverse array.- Parameters:
transMatrix- Matrix to convert.- Returns:
- The inverted array.
-
transformBilinear
public static final void transformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar) Transforms using bilinear interpolation.- Parameters:
image- Image to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliedprogressBar- Progress bar to update. Can be null. Should NOT have cancel button.
-
transformBilinear
public static final void transformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.- Parameters:
image- Image to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliedprogressBar- Progress bar to update. Can be null. Should NOT have cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformBilinear
public static final void transformBilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage, float fillValue) Transforms using bilinear interpolation.- Parameters:
image- Image to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliedprogressBar- Progress bar to update. Can be null. Should NOT have cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repaintingfillValue- value used for out of bounds pixels
-
transformBilinear
public static final void transformBilinear(float[] imgBuf, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, ViewJProgressBar progressBar) Transforms using bilinear interpolation.- Parameters:
imgBuf- Image buffer to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageprogressBar- Progress bar to update. Can be null. Should NOT have cancel button.
-
transformBilinear
public static final void transformBilinear(float[] imgBuf, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.- Parameters:
imgBuf- Image buffer to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageprogressBar- Progress bar to update. Can be null. Should NOT have cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformBilinear
public static final void transformBilinear(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres, ViewJProgressBar progressBar) Transforms using bilinear interpolation.- Parameters:
imgBuf- Image buffer to be transformedtImgBuf- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageoXdim- X dimension of output imageoYdim- Y dimension of output imageoXres- X resolution of output imageoYres- Y resolution of output imageprogressBar- Progress bar to be updated. Can be null. Should NOT have cancel button.
-
transformBilinear
public static final void transformBilinear(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres, ViewJProgressBar progressBar, boolean activeImage) Transforms using bilinear interpolation.- Parameters:
imgBuf- Image buffer to be transformedtImgBuf- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageoXdim- X dimension of output imageoYdim- Y dimension of output imageoXres- X resolution of output imageoYres- Y resolution of output imageprogressBar- Progress bar to be updated. Can be null. Should NOT have cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformBilinearC
public static final void transformBilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, float oXres, float oYres) Used on color images. USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE- Parameters:
image- Input image to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliedoXdim- Dimensions of output imageoYdim- Dimensions of output imageoXres- Resolutions of output imageoYres- Resolutions of output image
-
transformBilinearC
public static final void transformBilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, float oXres, float oYres, float fillValue) Used on color images. USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE- Parameters:
image- Input image to be transformedtransformedImg- Transformed imagetrans- Transformation matrix to be appliedoXdim- Dimensions of output imageoYdim- Dimensions of output imageoXres- Resolutions of output imageoYres- Resolutions of output imagefillValue- value used for out of bounds pixel transformations
-
transformNearestNeighbor2D
public static final void transformNearestNeighbor2D(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int xdim, int ydim) Transforms using Nearest neighbor interpolation.- Parameters:
imgBuf- Image buffer to be transformedtImgBuf- Transformed image buffertrans- Transformation matrix to be appliedxdim- X dimension of input AND output imageydim- Y dimension of input AND output image
-
transformNearestNeighbor2D
public static final void transformNearestNeighbor2D(float[] imgBuf, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, float iXres, float iYres, int oXdim, int oYdim, float oXres, float oYres) Transforms using Nearest neighbor interpolation.- Parameters:
imgBuf- Image buffer to be transformedtImgBuf- Transformed image buffertrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageoXdim- X dimension of output imageoYdim- Y dimension of output imageoXres- X resolution of output imageoYres- Y resolution of output image
-
transformNearestNeighbor3D
public static final void transformNearestNeighbor3D(float[] imgBuf, ModelImage transformedImg, int Xdim, int Ydim, int Zdim, TransMatrix trans) Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- Image array to transformtransformedImg- Transformed image.Xdim- X dimension of input imageYdim- Y dimension of input imageZdim- Z dimension of input imagetrans- Transformation matrix to be applied
-
transformTrilinear
public static final void transformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.- Parameters:
image- Image to transformtransformedImg- Transformed image.trans- Transformation matrix to be appliedprogressBar- The progress bar. Can be null. Should NOT have a cancel button.
-
transformTrilinear
public static final void transformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.- Parameters:
image- Image to transformtransformedImg- Transformed image.trans- Transformation matrix to be appliedprogressBar- The progress bar. Can be null. Should NOT have a cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformTrilinear
public static final void transformTrilinear(ModelImage image, ModelImage transformedImg, TransMatrix trans, ViewJProgressBar progressBar, boolean activeImage, float fillValue) Transforms and resamples volume using trilinear interpolation.- Parameters:
image- Image to transformtransformedImg- Transformed image.trans- Transformation matrix to be appliedprogressBar- The progress bar. Can be null. Should NOT have a cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repaintingfillValue- value used if transformed pixel is out of bounds
-
transformTrilinear
public static final void transformTrilinear(float[] imgBuffer, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.- Parameters:
imgBuffer- Image arraytransformedImg- Image after transformtrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiZdim- Z dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageiZres- Z resolution of input imageprogressBar- Progress bar to update. Can be null. Should NOT have a cancel button.
-
transformTrilinear
public static final void transformTrilinear(float[] imgBuffer, ModelImage transformedImg, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.- Parameters:
imgBuffer- Image arraytransformedImg- Image after transformtrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiZdim- Z dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageiZres- Z resolution of input imageprogressBar- Progress bar to update. Can be null. Should NOT have a cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformTrilinear
public static final void transformTrilinear(float[] imgBuffer, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, ViewJProgressBar progressBar) Transforms and resamples volume using trilinear interpolation.- Parameters:
imgBuffer- Image buffer to be transformedtImgBuf- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiZdim- Z dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageiZres- Z resolution of input imageoXdim- X dimension of output imageoYdim- Y dimension of output imageoZdim- Z dimension of output imageoXres- X resolution of output imageoYres- Y resolution of output imageoZres- Z resolution of output imageprogressBar- Progress bar. Can be null. Should NOT have cancel button.
-
transformTrilinear
public static final void transformTrilinear(float[] imgBuffer, float[] tImgBuf, TransMatrix trans, int iXdim, int iYdim, int iZdim, float iXres, float iYres, float iZres, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, ViewJProgressBar progressBar, boolean activeImage) Transforms and resamples volume using trilinear interpolation.- Parameters:
imgBuffer- Image buffer to be transformedtImgBuf- Transformed imagetrans- Transformation matrix to be appliediXdim- X dimension of input imageiYdim- Y dimension of input imageiZdim- Z dimension of input imageiXres- X resolution of input imageiYres- Y resolution of input imageiZres- Z resolution of input imageoXdim- X dimension of output imageoYdim- Y dimension of output imageoZdim- Z dimension of output imageoXres- X resolution of output imageoYres- Y resolution of output imageoZres- Z resolution of output imageprogressBar- Progress bar. Can be null. Should NOT have cancel button.activeImage- true if the algorithm is being run in a separate thread, false otherwise, to control progress bar repainting
-
transformTrilinear4D
public static ModelImage transformTrilinear4D(ModelImage image, ModelImage resultImage, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on black and white image data in a 4D image. Works time slice by time slice- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
transformTrilinearC
public static ModelImage transformTrilinearC(ModelImage image, ModelImage resultImage, float[] imgBuffer, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on color image data.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.imgBuffer- Buffer containing image data.xfrm- Transformation to apply.progressBar- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
transformTrilinearC
public static final void transformTrilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres) Transforms and resamples volume using trilinear interpolation Use on color images USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE.- Parameters:
image- Image to transformtransformedImg- Result image.trans- Transformation matrix to be appliedoXdim- DOCUMENT ME!oYdim- DOCUMENT ME!oZdim- DOCUMENT ME!oXres- DOCUMENT ME!oYres- DOCUMENT ME!oZres- DOCUMENT ME!
-
transformTrilinearC
public static final void transformTrilinearC(ModelImage image, ModelImage transformedImg, TransMatrix trans, int oXdim, int oYdim, int oZdim, float oXres, float oYres, float oZres, float fillValue) Transforms and resamples volume using trilinear interpolation Use on color images USE THIS IF OUTPUT IMAGE HAS DIFFERENT DIM/RES THAN INPUT IMAGE.- Parameters:
image- Image to transformtransformedImg- Result image.trans- Transformation matrix to be appliedoXdim- DOCUMENT ME!oYdim- DOCUMENT ME!oZdim- DOCUMENT ME!oXres- DOCUMENT ME!oYres- DOCUMENT ME!oZres- DOCUMENT ME!fillValue- value if transformed pixel is out of bounds
-
transformTrilinearC4D
public static ModelImage transformTrilinearC4D(ModelImage image, ModelImage resultImage, TransMatrix xfrm, ViewJProgressBar progressBar) Performs trilinear interpolation on color image data in a 4D image. Works time slice by time slice.- Parameters:
image- Image from which the data is derivedresultImage- Image to put result in; can be null.xfrm- Transformation to apply.progressBar- Buffer containing image data.- Returns:
- DOCUMENT ME!
-
disposeLocal
public void disposeLocal()Dispose of local variables that may be taking up lots of room. -
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getImageMargins
private int[] getImageMargins(ModelImage srcImage, TransMatrix transMatrix, float dxOut, float dyOut) Calculate necessary padding for image given applied transform.- Parameters:
srcImage- DOCUMENT ME!transMatrix- array with transformation matrixdxOut- DOCUMENT ME!dyOut- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getTransformedImage
Returns transformed volume.- Returns:
- destImage
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f center) DOCUMENT ME!- Parameters:
center- DOCUMENT ME!
-
setDoCenter
public void setDoCenter(boolean doCenter) DOCUMENT ME!- Parameters:
doCenter- DOCUMENT ME!
-
setFillValue
public void setFillValue(float fillValue) Set value for out of bounds transformation values. Set in constructors to a default of srcImage.getMin().- Parameters:
fillValue-
-
setPadValue
Deprecated.The value is not just used for padding. Please use setFillValue().Set value for out of bounds transformation values. Set in constructors to a default of srcImage.getMin().- Parameters:
padValue-
-
setUpdateOriginFlag
public void setUpdateOriginFlag(boolean originFlag) Sets the origin flag used indicated that origin should be changed based using the supplied transformation matrix.- Parameters:
originFlag- if true sets the updateOrigin flag to true
-
setUseScannerAnatomical
public void setUseScannerAnatomical(boolean useSA) Sets the tranform to set orientation to AXIAL (this is a scanner anatomical transform).- Parameters:
useSA- set to axial orientation
-
updateFileInfo
private static void updateFileInfo(ModelImage image, ModelImage resultImage, float[] resolutions, int[] units, TransMatrix matrix, boolean useSATransform, AlgorithmBase srcAlg) Copy important file information to resultant image structure.- Parameters:
image- Source image.resultImage- Resultant image.resolutions- DOCUMENT ME!units- DOCUMENT ME!matrix- DOCUMENT ME!useSATransform- DOCUMENT ME!m-
-
updateOrigin
Update origin. Translate the image origin from image space to patient space (scanner space). The basic ideas, tranlate the (0,0,0) point from scaner space to image space, then subtract the original image origin. The (0, 0, 0) point is the upper left corner of the scanner space's image.- Parameters:
xfrm- DOCUMENT ME!
-
updateOrigin
private void updateOrigin()Translate the image origin from image space to patient space (scanner space). The basic ideas, tranlate the (0,0,0) point from scaner space to image space, then multiply the resolution, and subtract the image origin. The (0, 0, 0) point is the upper left corner of the scanner space's image. -
transform
private void transform()Creates buffer for new image, prepares transformation matrix, and calls transform function for interpolation specified. -
transform2DVOI
Transforms and resamples a 2D VOI using nearest neighbor interpolation.-
For each VOI in VOIVector:
- Export VOIs as a mask image
- Transform mask
- Extract VOI contours from mask image and put in new image.
- Parameters:
image- Image where VOIs are storedimgBuffer- Image arrayxfrm- Transformation matrix to be applied
-
transform25DVOI
Transforms and resamples a 3D VOI using nearest neighbor interpolation.- Export VOIs as a mask image
- Transform mask
- Extract VOI contours from mask image and put in new image.
- Parameters:
image- Image where VOIs are storedimgBuffer- Image arraykTM- Transformation matrix to be applied
-
transform3DVOI
Transforms and resamples a 3D VOI using nearest neighbor interpolation.- Export VOIs as a mask image
- Transform mask
- Extract VOI contours from mask image and put in new image.
- Parameters:
image- Image where VOIs are storedimgBuffer- Image arraykTM- Transformation matrix to be applied
-
transform3DVOIByte
Transforms and resamples a 3D VOI using nearest neighbor interpolation.- Export VOIs as a mask image
- Transform mask
- Extract VOI contours from mask image and put in new image.
- Parameters:
image- Image where VOIs are storedimgBuffer- Image arraykTM- Transformation matrix to be applied use byte imgBuffer to save a factor of 4 in memory in 3D ARGB color images.
-
transformBilinear
Transforms and resamples volume using bilinear interpolation.- Parameters:
imgBuf- Image arraykTM- Matrix to be applied
-
transformBilinear3D
Transforms and resamples volume using bilinear interpolation. Used as a slice-only algorithm on 3D images.- Parameters:
imgBuf- Image arraykTM- Matrix to be applied
-
transformBilinear3DC
Transforms and resamples volume using bilinear interpolation (2.5D) This version used with color images. This alogorithm used on a slice by slice basis on 3D images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Matrix to be applied
-
transformBilinear4D
Transforms and resamples volume using bilinear interpolation (2.5D) Used as a slice only algorithm on 3D images.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be applied
-
transformBilinear4DC
Transforms and resamples volume using bilinear interpolation This version used with color images This alogorithm used on a slice by slice basis on 4D images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Matrix to be applied
-
transformBilinearC
Transforms and resamples volume using bilinear interpolation. This version used with color images- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Matrix to be applied
-
transformAlgorithmBspline2D
Transforms and resamples volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformAlgorithmBspline2DC
Transforms and resamples volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformAlgorithmBspline3D
Transforms and resamples volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformAlgorithmBspline3DC
Transforms and resamples volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformAlgorithmBspline4D
Transforms and resamples volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformAlgorithmBspline4DC
Transforms and resamples color volume using Bspline interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applieddegree- degree of polynomial
-
transformCubicLagrangian2D
Transforms and resamples volume using cubic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- iftrueclip output values to be within input range
-
transformCubicLagrangian2DC
private void transformCubicLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation. This version used with color images- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- if true clip output values to be within input range
-
transformCubicLagrangian3D
Transforms and resamples volume using cubic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformCubicLagrangian3DC
private void transformCubicLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation. This version used with color images- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformCubicLagrangian3Dim2D
Transforms and resamples volume using cubic Lagrangian interpolation Does a slice by slice cubic Lagrangian interpolation on a 3 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformCubicLagrangian3Dim2DC
private void transformCubicLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformCubicLagrangian4D
Transforms and resamples 4 dimensional object using 3D cubic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- iftrueclip output values to be within input range
-
transformCubicLagrangian4DC
private void transformCubicLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional object using 3D cubic Lagrangian interpolation.- Parameters:
imgBuf- Image arrayimgBuffer2-kTM- Transformation matrix to be appliedclip- iftrueclip output values to be within input range
-
transformCubicLagrangian4Dim2D
Transforms and resamples volume using cubic Lagrangian interpolation Does a slice by slice cubic Lagrangian interpolation on a 4 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformCubicLagrangian4Dim2DC
private void transformCubicLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using cubic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian2D
Transforms and resamples volume using heptic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian2DC
private void transformHepticLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian3D
Transforms and resamples volume using heptic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian3DC
private void transformHepticLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian3Dim2D
Transforms and resamples volume using heptic Lagrangian interpolation Does a slice by slice heptic Lagrangian interpolation on a 3 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian3Dim2DC
private void transformHepticLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian4D
transforms and resamples 4 dimensional object using 3D heptic Lagrangian interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be appliedclip- if true clip output values to be within input range
-
transformHepticLagrangian4DC
private void transformHepticLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) transforms and resamples 4 dimensional object using 3D heptic Lagrangian interpolation.- Parameters:
imgBuf- image arrayimgBuffer2-kTM- transformation matrix to be appliedclip- if true clip output values to be within input range
-
transformHepticLagrangian4Dim2D
Transforms and resamples volume using heptic Lagrangian interpolation Does a slice by slice heptic Lagrangian interpolation on a 4 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformHepticLagrangian4Dim2DC
private void transformHepticLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using heptic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformNearestNeighbor2D
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor2DC
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- input image arrayimgBuf2- output image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor3D
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor3DC
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- input image arrayimgBuf2- output image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor3Dim2D
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor3Dim2DC
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- input image arrayimgBuf2- output image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor4D
Transforms and resamples 4 dimensional object using 3D algorithm using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor4DC
Transforms and resamples 4 dimensional object using 3D algorithm using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be appliedimgBufffer2-
-
transformNearestNeighbor4Dim2D
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- image arraykTM- transformation matrix to be applied
-
transformNearestNeighbor4Dim2DC
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
imgBuf- input image arrayimgBuf2- output image arraykTM- transformation matrix to be applied
-
transformQuinticLagrangian2D
Transforms and resamples volume using quintic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian2DC
private void transformQuinticLagrangian2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian3D
Transforms and resamples volume using quintic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian3DC
private void transformQuinticLagrangian3DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian3Dim2D
Transforms and resamples volume using quintic Lagrangian interpolation Does a slice by slice quintic Lagrangian interpolation on a 3 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian3Dim2DC
private void transformQuinticLagrangian3Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian4DC
private void transformQuinticLagrangian4DC(double[] imgBuf, float[] imgBuffer2, TransMatrix kTM, boolean clip) Transforms and resamples 4 dimensional color object using 3D quintic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input rangeimgBuf2-
-
transformQuinticLagrangian4D
Transforms and resamples 4 dimensional object using 3D quintic Lagrangian interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian4Dim2D
Transforms and resamples volume using quintic Lagrangian interpolation Does a slice by slice quintic Lagrangian interpolation on a 4 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformQuinticLagrangian4Dim2DC
private void transformQuinticLagrangian4Dim2DC(double[] imgBuf, float[] imgBuf2, TransMatrix kTM, boolean clip) Transforms and resamples volume using quintic Lagrangian interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- iftrueclip output values to be within input range
-
transformTrilinear
Transforms and resamples a 3D volume using trilinear interpolation.- Parameters:
imgBuffer- Image arraykTM- Transformation matrix to be applied
-
transformTrilinear4D
Transforms and resamples 4 dimensional object using trilinear interpolation.- Parameters:
imgBuffer- Image arraykTM- Transformation matrix to be applied
-
transformTrilinear4DByteC
Transforms and resamples 4 dimensional color ARGB object using trilinear interpolation.- Parameters:
imgBuffer- Image arraykTM- Transformation matrix to be applied Byte buffers are used to reduce memory requirements by a factor of 4imgBuf2-
-
transformTrilinear4DC
Transforms and resamples 4 dimensional color object using trilinear interpolation.- Parameters:
imgBuffer- Image arraykTM- Transformation matrix to be appliedimgBuf2-
-
transformTrilinearC
Transforms and resamples volume using trilinear interpolation This version is used with color images.- Parameters:
imgBuffer- Input image arrayimgBuffer2- Output image arraykTM- Transformation matrix to be applied
-
transformTrilinearByteC
Transforms and resamples volume using trilinear interpolation This version is used with ARGB color images. Use byte[] rather than float[] to save memory- Parameters:
imgBuffer- Input image arrayimgBuffer2- Output image arraykTM- Transformation matrix to be applied
-
transformWSinc2D
Transforms and resamples volume using windowed sinc interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc2DC
Transforms and resamples volume using windowed sinc interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc3D
Transforms and resamples volume using windowed sinc interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc3DC
Transforms and resamples volume using windowed sinc interpolation This version used with color images.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc3Dim2D
Transforms and resamples volume using windowed sinc interpolation Does a slice by slice windowed sinc interpolation on a 3 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc3Dim2DC
Transforms and resamples volume using windowed sinc interpolation This version used with color images This version performs a slice by slice algorithm on a 3 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc4D
Transforms and resamples 4 dimensional object using 3D windowed sinc interpolation.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc4DC
Transforms and resamples 4 dimensional object using 3D windowed sinc interpolation.- Parameters:
imgBuf- Image arrayimgBuffer2-kTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
transformWSinc4Dim2D
Transforms and resamples volume using windowed sinc interpolation Does a slice by slice windowed sinc interpolation on a 4 dimensional object.- Parameters:
imgBuf- Image arraykTM- Transformation matrix to be appliedclip- Iftrue clip output values to be within input range
-
transformWSinc4Dim2DC
Transforms and resamples volume using windowed sinc interpolation This version used with color images This version performs a slice by slice algorithm on a 4 dimensional object.- Parameters:
imgBuf- Input image arrayimgBuf2- Output image arraykTM- Transformation matrix to be appliedclip- Iftrueclip output values to be within input range
-
updateOriginMargins
private void updateOriginMargins()Update origin to reflect padding. -
updateOriginMargins2D
private void updateOriginMargins2D()Update origin to reflect padding.
-