public class Point3Dviewer extends ScreenSelectorClass implements ij.plugin.PlugIn, java.lang.Runnable
This permits one to display points submitted as a 3D array of short, int, or float.
1. The object can be rotated in any direction using a mouse-drag (hold left button down while
"dragging in the direction of rotation and while the HAND icon is selected on the ImageJ toolbar).
2. The object can be rotated hands-free (continuously, without input = spinning) by 'throwing'
"the mouse cursor (release the mouse button while dragging in the desired direction). To stop
"the automatic rotation, click the mouse anywhere on the window or hit the space bar.
3. Clipping permitted as a % of total viewing depth, where max depth is when viewing dataset
"from the side or from the top (phi or theta = 90 degrees).
4. A movie (AVI) can be created by getting the object in continuous motion in the
"desired direction and hitting the AVI button.
The projection calculation is done in real-time. Large datasets may need to be cropped or resized
(Toolbar->Image->Scale) beforehand to speed up the interaction.\n\n");
Details of implementation: 1. this is an extension of the screenSelectorClass (and not SScanvas). Events are handled
by the SScanvas and SScanvas then may invoke these SSclass functions secondarily.
Some potentially needed code modifications:
1. I hold all the data in a single 6D array, this forces the same number of array elements (e.g. same # of slices/set,
same #pts/contour) which is wasteful.
MIPSviewer, MIPSviewerColor
Modifier and Type | Class and Description |
---|---|
protected class |
Point3Dviewer.Updater |
Modifier and Type | Field and Description |
---|---|
protected GenericRecallableDialog |
gd |
protected HeartSegm |
heartSegmentor |
int |
imgHeight |
int |
imgWidth |
protected int |
pointDisplaySize |
protected static ScreenSelectorCanvas |
this_canvas |
protected Point3Dviewer.Updater |
updater |
protected ArrayDisplay |
view3DAd |
Constructor and Description |
---|
Point3Dviewer() |
Point3Dviewer(float[][] A) |
Point3Dviewer(float[][][] A) |
Point3Dviewer(float[][][][] A) |
Point3Dviewer(float[][][][][][] A) |
Point3Dviewer(HeartSegm HS) |
Modifier and Type | Method and Description |
---|---|
void |
addLandmark(float[] newlm) |
void |
addLandmark(Point3D newlmpt) |
void |
destroy() |
void |
drawOnArrayDisplay() |
int |
getAdScreenHeight() |
int |
getGdScreenHeight() |
protected void |
getInitView() |
protected ij.gui.Roi |
getRoi() |
void |
hide() |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
refreshGD() |
void |
resetLandmark(int lmat,
float[] newlm) |
void |
resetLandmark(int lmat,
Point3D newlmpt) |
void |
resetView() |
void |
run() |
void |
run(java.lang.String arg)
This method is called when the plugin is loaded.
|
void |
runGUI() |
void |
saveImage(java.lang.String type) |
void |
setAdMagnification(float mag) |
void |
setAdScreenLocation(int x,
int y) |
void |
setGdLocation(int x,
int y) |
void |
setup(float[][] A) |
void |
setup(float[][][] A) |
void |
setup(float[][][][] A) |
void |
setup(float[][][][][][] A) |
void |
setup(HeartSegm HS) |
void |
setWindowScale() |
void |
show() |
void |
toFront() |
void |
transformConPoints(float[][] rotmtx,
float shiftX,
float shiftY,
float shiftZ) |
void |
updateConCoords(int curSeries,
int curSlice,
int curEndoEpi,
int snakeTime,
int npts,
float[][] newpts) |
void |
updateCumRot(float thetaincr,
float phiincr) |
void |
updateCumRot(float theta,
float phi,
float psi) |
void |
updatePt3Dview() |
void |
updatePtCoords(float[][] A) |
void |
updatePtCoords(float[][][] A) |
void |
UpdateScreen() |
void |
UpdateSelection(int a,
int b,
java.lang.String keytype) |
void |
winLevel() |
void |
zoomIn() |
keyPressed
protected GenericRecallableDialog gd
public int imgWidth
public int imgHeight
protected int pointDisplaySize
protected ArrayDisplay view3DAd
protected static ScreenSelectorCanvas this_canvas
protected Point3Dviewer.Updater updater
protected HeartSegm heartSegmentor
public Point3Dviewer()
public Point3Dviewer(float[][] A)
public Point3Dviewer(float[][][] A)
public Point3Dviewer(float[][][][] A)
public Point3Dviewer(float[][][][][][] A)
public Point3Dviewer(HeartSegm HS)
public void setup(HeartSegm HS)
public void setup(float[][] A)
public void setup(float[][][] A)
public void setup(float[][][][] A)
public void setup(float[][][][][][] A)
public void setWindowScale()
public void run(java.lang.String arg)
ij.plugin.PlugIn
run
in interface ij.plugin.PlugIn
public void run()
run
in interface java.lang.Runnable
public void runGUI()
public void destroy()
public void saveImage(java.lang.String type)
public void winLevel()
protected void getInitView()
public void drawOnArrayDisplay()
public void resetView()
public void refreshGD()
public void updatePtCoords(float[][] A)
public void updatePtCoords(float[][][] A)
public void updateConCoords(int curSeries, int curSlice, int curEndoEpi, int snakeTime, int npts, float[][] newpts)
public void updatePt3Dview()
public void updateCumRot(float thetaincr, float phiincr)
public void updateCumRot(float theta, float phi, float psi)
public void transformConPoints(float[][] rotmtx, float shiftX, float shiftY, float shiftZ)
public void addLandmark(Point3D newlmpt)
public void addLandmark(float[] newlm)
public void resetLandmark(int lmat, float[] newlm)
public void resetLandmark(int lmat, Point3D newlmpt)
public void zoomIn()
public void toFront()
public void hide()
public void show()
public void UpdateScreen()
UpdateScreen
in class ScreenSelectorClass
public void UpdateSelection(int a, int b, java.lang.String keytype)
UpdateSelection
in class ScreenSelectorClass
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in class ScreenSelectorClass
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in class ScreenSelectorClass
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in class ScreenSelectorClass
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in class ScreenSelectorClass
protected ij.gui.Roi getRoi()
public void setAdMagnification(float mag)
public void setAdScreenLocation(int x, int y)
public int getAdScreenHeight()
public void setGdLocation(int x, int y)
public int getGdScreenHeight()