public class Image3DUniverse extends DefaultAnimatableUniverse
DefaultUniverse.GlobalTransform
Modifier and Type | Field and Description |
---|---|
static ArrayList<Image3DUniverse> |
universes |
ANIMATE_TG, ATTRIBUTE_COORD_SYSTEM, ATTRIBUTE_SCALEBAR, attributesSwitch, bounds, CENTER_TG, contentTransformer, frameBehavior, globalCenter, globalCoord, globalMax, globalMin, light, mouseBehavior, picker, ROTATION_TG, scalebar, scene, TRANSLATE_TG, ui, useToFront, viewTransformer, win, ZOOM_TG
locale, viewer
ROTATE, TRANSLATE
Constructor and Description |
---|
Image3DUniverse()
Default constructor.
|
Image3DUniverse(int width,
int height)
Constructs a new universe with the specified width and height.
|
Modifier and Type | Method and Description |
---|---|
Content |
addContent(Content c)
Add the specified Content to the universe.
|
Content |
addContent(ij.ImagePlus image,
Color3f color,
String name,
int thresh,
boolean[] channels,
int resf,
int type)
Add the specified image as a new Content to the universe.
|
Content |
addContent(ij.ImagePlus image,
int type)
Add the specified image as a new Content to the universe.
|
Content |
addContent(ij.ImagePlus image,
int type,
int res)
Add the specified image as a new Content to the universe.
|
Collection<Future<Content>> |
addContentLater(Collection<Content> cc)
Add the specified collection of Content to the universe.
|
Future<Content> |
addContentLater(Content c)
Add the specified Content to the universe.
|
Collection<Future<Content>> |
addContentLater(String file) |
Content |
addCustomMesh(CustomMesh mesh,
String name)
Add a custom mesh to the universe.
|
Content |
addCustomMesh(CustomMultiMesh mesh,
String name)
Add a CustomMultiMesh to the universe.
|
Content |
addIcospheres(List<Point3f> points,
Color3f color,
int subdivisions,
float radius,
String name)
At every
Point3f in @param points, place an icosphere created with @param
subdivisions and @param radius. |
Content |
addLineMesh(List<Point3f> mesh,
Color3f color,
String name,
boolean strips)
Add a custom mesh, in particular a line mesh (a set of lines in 3D) to the
universe.
|
Content |
addMesh(ij.ImagePlus img)
Add a new image as a content, displaying it as an isosurface.
|
Content |
addMesh(ij.ImagePlus image,
Color3f color,
String name,
int threshold,
boolean[] channels,
int resamplingF)
Add a new image as a content, displaying it as an iso-surface.
|
Content |
addMesh(ij.ImagePlus img,
int res)
Add a new image as a content, displaying it as an isosurface.
|
Content |
addMesh(List<Point3f> mesh,
Color3f color,
String name,
int threshold)
Deprecated.
This method will not be supported in the future. Use
addTriangleMesh instead.
|
Content |
addMesh(List mesh,
Color3f color,
String name,
float scale,
int threshold)
Deprecated.
This method will not be supported in the future. The specified
'scale' will be ignored, and the applied scale will be
calculated automatically from the minimum and maximum
coordinates of the specified mesh. Use addTriangleMesh instead.
|
VolumeOctree |
addOctree(String imageDir,
String name)
Deprecated.
The octree methods will be outsourced into a different plugin.
|
Content |
addOrthoslice(ij.ImagePlus image)
Add a new image as a content, displaying it as orthoslices.
|
Content |
addOrthoslice(ij.ImagePlus image,
Color3f color,
String name,
int thresh,
boolean[] channels,
int resamplingF)
Add a new image as a content, displaying it as orthoslices.
|
Content |
addOrthoslice(ij.ImagePlus image,
int res)
Add a new image as a content, displaying it as orthoslices.
|
Content |
addPointMesh(List<Point3f> mesh,
Color3f color,
float ptsize,
String name)
Add a custom mesh, in particular a point mesh, to the universe.
|
Content |
addPointMesh(List<Point3f> mesh,
Color3f color,
String name)
Add a custom mesh, in particular a point mesh, to the universe.
|
Content |
addQuadMesh(List<Point3f> mesh,
Color3f color,
String name)
Add a custom mesh, in particular a mesh consisting of quads, to the
universe.
|
Content |
addSurfacePlot(ij.ImagePlus image)
Add a new image as a content, displaying it as a 2D surface plot.
|
Content |
addSurfacePlot(ij.ImagePlus image,
Color3f color,
String name,
int thresh,
boolean[] channels,
int resamplingF)
Add a new image as a content, displaying it as a 2D surface plot.
|
Content |
addSurfacePlot(ij.ImagePlus image,
int res)
Add a new image as a content, displaying it as a 2D surface plot.
|
void |
addTimelapseListener(TimelapseListener l) |
Content |
addTriangleMesh(List<Point3f> mesh,
Color3f color,
String name)
Add a custom mesh, in particular a triangle mesh, to the universe.
|
Content |
addTriangleMesh(List<Point3f> mesh,
List<Color3f> colors,
String name)
Add a custom mesh, in particular a triangle mesh, to the universe.
|
Content |
addVoltex(ij.ImagePlus image)
Add a new image as a content, displaying it as a volume rendering.
|
Content |
addVoltex(ij.ImagePlus image,
Color3f color,
String name,
int thresh,
boolean[] channels,
int resamplingF)
Add a new image as a content, displaying it as a volume rendering.
|
Content |
addVoltex(ij.ImagePlus image,
int res)
Add a new image as a content, displaying it as a volume rendering.
|
void |
adjustView()
Fit all contents optimally into the canvas.
|
void |
adjustView(Content c)
Fit the specified content optimally into the canvas.
|
void |
adjustView(Content c,
int dir)
Fit the specified content optimally into the canvas.
|
void |
adjustView(int dir)
Fit all contents optimally into the canvas.
|
void |
adjustView(Iterable<Content> contents)
Fit the specified contents optimally into the canvas.
|
void |
adjustView(Iterable<Content> contents,
int dir)
Fit the specified contents optimally into the canvas.
|
String |
allContentsString() |
void |
cancelOctree()
Deprecated.
The octree methods will be outsourced into a different plugin.
|
void |
centerAt(Point3d p)
Center the universe at the given point.
|
void |
centerSelected(Content c)
Select the view at the selected Content.
|
void |
cleanup()
Close this universe.
|
void |
clearSelection()
If any Content is selected, deselects it.
|
boolean |
contains(String name)
Returns true if a Content with the specified name is present in this
universe.
|
Iterator |
contents()
Return an Iterator which iterates through all the contents of this
universe.
|
Content |
createContent(CustomMesh mesh,
String name)
Create a Content object from the mesh.
|
Content |
createContent(CustomMultiMesh node,
String name) |
boolean |
getAutoAdjustView()
autoAdjustView indicates, whether the view is adjusted to fit the whole
universe each time a Content is added.
|
Content |
getContent(String name)
Returns the Content with the specified name.
|
Collection |
getContents()
Returns a Collection containing the references to all the contents of this
universe.
|
int |
getCurrentTimepoint() |
int |
getEndTime() |
Executer |
getExecuter()
Returns a reference to the Executer used by this universe.
|
Point3d |
getGlobalCenterPoint()
Get a reference to the global center point.
|
void |
getGlobalCenterPoint(Point3d p)
Copies the global center point into the specified Point3d.
|
void |
getGlobalMaxPoint(Point3d p)
Copies the global maximum point into the specified Point3d.
|
void |
getGlobalMinPoint(Point3d p)
Copies the global minimum point into the specified Point3d.
|
JMenuBar |
getMenuBar()
Returns a reference to the menu bar used by this universe.
|
PointListDialog |
getPointListDialog()
Returns a reference to the PointListDialog used by this universe
|
RegistrationMenubar |
getRegistrationMenuBar()
Returns a reference to the registration menu bar.
|
String |
getSafeContentName(String suggested) |
Content |
getSelected()
Returns the selected Content, or null if none is selected.
|
ShortCuts |
getShortcuts()
Returns a reference to the universe's shortcuts.
|
boolean |
getShowBoundingBoxUponSelection()
Returns true if the selection box is shown upon selecting a
Content(Instant).
|
int |
getStartTime() |
Timeline |
getTimeline() |
void |
hideAllLandmarks()
Hide point list dialog and all landmark points.
|
void |
init(ImageWindow3D window)
Initializes a 3D window.
|
boolean |
isFullScreen() |
void |
loadSession(String file) |
void |
loadView(String file)
Load view transformations from file
|
void |
recalculateGlobalMinMax()
Calculates the global minimum, maximum and center point depending on all
the available contents.
|
void |
recalculateGlobalMinMax(Content c)
If the specified Content is the only content in the universe, global
minimum, maximum and center point are set accordingly to this Content.
|
void |
removeAllContents()
Remove all the contents of this universe.
|
void |
removeContent(String name)
Remove the Content with the specified name from the universe.
|
void |
removeOctree()
Deprecated.
The octree methods will be outsourced into a different plugin.
|
void |
removeTimelapseListener(TimelapseListener l) |
void |
resetView()
Reset the transformations of the view side of the scene graph as if the
Contents of this universe were just displayed.
|
void |
rotateToNegativeXY()
Rotate the univere so that the user looks in the negative direction of the
z-axis.
|
void |
rotateToNegativeXZ()
Rotate the univere so that the user looks in the negative direction of the
y-axis.
|
void |
rotateToNegativeYZ()
Rotate the univere so that the user looks in the negative direction of the
x-axis.
|
void |
rotateToPositiveXY()
Rotate the univere so that the user looks in the positive direction of the
z-axis.
|
void |
rotateToPositiveXZ()
Rotate the univere so that the user looks in the positive direction of the
y-axis.
|
void |
rotateToPositiveYZ()
Rotate the univere so that the user looks in the positive direction of the
x-axis.
|
void |
rotateUniverse(Vector3d axis,
double angle)
Rotate the universe, using the given axis of rotation and angle; The center
of rotation is the global center.
|
void |
saveSession(String file) |
void |
saveView(String file)
Save the current view transformations to a file
|
void |
select(Content c)
Select the specified Content.
|
void |
setAutoAdjustView(boolean b)
autoAdjustView indicates, whether the view is adjusted to fit the whole
universe each time a Content is added.
|
void |
setFullScreen(boolean f)
Sets fullscreen mode on or of.
|
void |
setMenubar(JMenuBar mb)
Set a custom menu bar to the viewer
|
void |
setMenubar(MenuBar mb)
Deprecated.
Use swing instead.
|
void |
setShowBoundingBoxUponSelection(boolean b)
Show/Hide the selection box upon selecting a Content(Instant).
|
void |
setStatus(String text)
Shows the specified status string at the bottom of the viewer window.
|
void |
show()
Display this universe in a window (an ImageWindow3D).
|
void |
showTimepoint(int tp) |
void |
sync(boolean b)
Syncs this window.
|
void |
updateOctree()
Deprecated.
The octree methods will be outsourced into a different plugin.
|
void |
updateStartAndEndTime(int st,
int e) |
void |
updateTimeline() |
void |
updateTimelineGUI() |
getRotationAxis, getRotationInterval, pauseAnimation, record360, rotateX, rotateY, rotateZ, setRotationAxis, setRotationInterval, startAnimation, startFreehandRecording, stopFreehandRecording
addInteractiveBehavior, addUniverseListener, close, fireCanvasResized, fireContentAdded, fireContentChanged, fireContentRemoved, fireContentSelected, fireTransformationFinished, fireTransformationStarted, fireTransformationUpdated, fireUniverseClosed, getAnimationTG, getCenterTG, getContentTransformer, getGlobalTransform, getLight, getPicker, getRotationTG, getScalebar, getScene, getSize, getTranslateTG, getUseToFront, getViewPlatformTransformer, getVworldToCamera, getVworldToCameraInverse, getWindow, getZoomTG, isAttributeVisible, removeUniverseListener, setGlobalTransform, setInteractiveBehavior, setSize, setUseToFront, showAttribute, takeSnapshot, takeSnapshot, transformChanged, waitForNextFrame
addBranchGraph, getCanvas, getCanvas, getLocale, getPreferredConfiguration, getViewer, getViewingPlatform
addGraphStructureChangeListener, addRenderingErrorListener, addShaderErrorListener, getAllLocales, getJ3DThreadPriority, getProperties, numLocales, removeAllLocales, removeGraphStructureChangeListener, removeLocale, removeRenderingErrorListener, removeShaderErrorListener, setJ3DThreadPriority
public static ArrayList<Image3DUniverse> universes
public Image3DUniverse()
public Image3DUniverse(int width, int height)
width
- height
- public void show()
show
in class DefaultUniverse
public void init(ImageWindow3D window)
window
- 3D window to initialize. It is assumed that the window
already displays the Canvas3D
as obtained from calling
SimpleUniverse.getCanvas()
. If the
DefaultUniverse
obtained from
ImageWindow3D.getUniverse()
is not exactly this universe,
a RuntimeException
is thrown. This method acts as an
initialization of the ImageWindow3D, by adding the menubar to it
as well as initializing the PointListDialog
and adding a
WindowAdapter
to the window that does cleanup. The window
is not shown; that is, Window.pack()
and
Window.setVisible(boolean)
are not called.public void setFullScreen(boolean f)
public boolean isFullScreen()
public void cleanup()
cleanup
in class DefaultUniverse
public void setStatus(String text)
text
- @Deprecated public void setMenubar(MenuBar mb)
public void setMenubar(JMenuBar mb)
mb
- public JMenuBar getMenuBar()
public RegistrationMenubar getRegistrationMenuBar()
public Executer getExecuter()
public ShortCuts getShortcuts()
public PointListDialog getPointListDialog()
public void hideAllLandmarks()
public void saveSession(String file) throws IOException
IOException
public void loadSession(String file) throws IOException
IOException
public void addTimelapseListener(TimelapseListener l)
public void removeTimelapseListener(TimelapseListener l)
public Timeline getTimeline()
public void showTimepoint(int tp)
public int getCurrentTimepoint()
public int getStartTime()
public int getEndTime()
public void updateStartAndEndTime(int st, int e)
public void updateTimeline()
public void updateTimelineGUI()
public void select(Content c)
c
- public Content getSelected()
getSelected
in class DefaultUniverse
public void clearSelection()
public void setShowBoundingBoxUponSelection(boolean b)
public boolean getShowBoundingBoxUponSelection()
public void setAutoAdjustView(boolean b)
public boolean getAutoAdjustView()
public void recalculateGlobalMinMax()
public void recalculateGlobalMinMax(Content c)
c
- public Point3d getGlobalCenterPoint()
public void getGlobalCenterPoint(Point3d p)
p
- public void getGlobalMinPoint(Point3d p)
p
- public void getGlobalMaxPoint(Point3d p)
p
- @Deprecated public void updateOctree()
@Deprecated public void cancelOctree()
@Deprecated public void removeOctree()
@Deprecated public VolumeOctree addOctree(String imageDir, String name)
public Content addContent(ij.ImagePlus image, Color3f color, String name, int thresh, boolean[] channels, int resf, int type)
image
- the image to displaycolor
- the color in which the Content is displayedname
- a name for the Content to be addedthresh
- a thresholdchannels
- the color channels to display.resf
- a resampling factor.type
- the type which determines how the image is displayed.public Content addContent(ij.ImagePlus image, int type, int res)
image
- the image to displaytype
- the type which determines how the image is displayed.public Content addContent(ij.ImagePlus image, int type)
image
- the image to displaytype
- the type which determines how the image is displayed.public Content addVoltex(ij.ImagePlus image)
image
- the image to displaypublic Content addVoltex(ij.ImagePlus image, int res)
image
- the image to displaypublic Content addVoltex(ij.ImagePlus image, Color3f color, String name, int thresh, boolean[] channels, int resamplingF)
image
- the image to displaycolor
- the color in which this volume rendering is displayed.name
- the name of the displayed Content.thresh
- the threshold used for the displayed volume renderingchannels
- the displayed color channels, must be a boolean array of
length 3resamplingF
- a resampling factor.public Content addOrthoslice(ij.ImagePlus image)
image
- the image to displaypublic Content addOrthoslice(ij.ImagePlus image, int res)
image
- the image to displaypublic Content addOrthoslice(ij.ImagePlus image, Color3f color, String name, int thresh, boolean[] channels, int resamplingF)
image
- the image to displaycolor
- the color in which these orthoslices are displayed.name
- the name of the displayed Content.thresh
- the threshold used for the displayed orthosliceschannels
- the displayed color channels, must be a boolean array of
length 3resamplingF
- a resampling factor.public Content addSurfacePlot(ij.ImagePlus image)
image
- the image to displaypublic Content addSurfacePlot(ij.ImagePlus image, int res)
image
- the image to displaypublic Content addSurfacePlot(ij.ImagePlus image, Color3f color, String name, int thresh, boolean[] channels, int resamplingF)
image
- the image to displaycolor
- the color in which this surface plot is displayed.name
- the name of the displayed Content.thresh
- the threshold used for the displayed surface plotchannels
- the displayed color channels, must be a boolean array of
length 3resamplingF
- a resampling factor.public Content addMesh(ij.ImagePlus img)
img
- the image to displaypublic Content addMesh(ij.ImagePlus img, int res)
img
- the image to displayres
- public Content addMesh(ij.ImagePlus image, Color3f color, String name, int threshold, boolean[] channels, int resamplingF)
image
- the image to displaycolor
- the color in which this surface is displayed.name
- the name of the displayed Content.threshold
- the threshold used for generating the surfacechannels
- the displayed color channels, must be a boolean array of
length 3resamplingF
- a resampling factor.public Content addCustomMesh(CustomMesh mesh, String name)
mesh
- the CustomMesh to displayname
- the name for the added Contentpublic Content addCustomMesh(CustomMultiMesh mesh, String name)
mesh
- the CustomMultiMesh to displayname
- the name for the added Contentpublic Content createContent(CustomMesh mesh, String name)
mesh
- the CustomMesh to displayname
- the name for the added Contentpublic Content createContent(CustomMultiMesh node, String name)
public Content addLineMesh(List<Point3f> mesh, Color3f color, String name, boolean strips)
mesh
is a list of points which are connected pairwise,
i.e. the 1st point is connected to the 2nd, the 3rd to the 4th, and so on.mesh
is a list of points which are connected continuously,
i.e.the 1st point is connected to the 2nd, the 2nd to the 2rd, the 3rd to
the 4th, and so on.mesh
- a list of points which make up the meshcolor
- the color in which the line is displayedname
- a name for the added Contentstrips
- flag specifying wheter the line is continuously or pairwise
connectedpublic Content addPointMesh(List<Point3f> mesh, Color3f color, String name)
mesh
- a list of points which make up the mesh.color
- the color in which the points is displayedname
- a name for the added Contentpublic Content addPointMesh(List<Point3f> mesh, Color3f color, float ptsize, String name)
mesh
- a list of points which make up the mesh.color
- the color in which the points is displayedname
- a name for the added Contentptsize
- the size of the points.public Content addIcospheres(List<Point3f> points, Color3f color, int subdivisions, float radius, String name)
Point3f
in @param points, place an icosphere created with @param
subdivisions and @param radius. A reasonable @param subdivision value is 2.
Higher values will result in excessively detailed and very large meshes.public Content addQuadMesh(List<Point3f> mesh, Color3f color, String name)
mesh
- a list of points which make up the mesh.color
- the color in which the points is displayedname
- a name for the added Contentpublic Content addTriangleMesh(List<Point3f> mesh, Color3f color, String name)
mesh
- a list of points which make up the mesh. The number of points
must be devidable by 3. 3 successive points make up one triangle.color
- the color in which the line is displayedname
- a name for the added Contentpublic Content addTriangleMesh(List<Point3f> mesh, List<Color3f> colors, String name)
mesh
- a list of points which make up the mesh. The number of points
must be devidable by 3. 3 successive points make up one triangle.colors
- a List of the colors at each vertex in the meshname
- a name for the added Content@Deprecated public Content addMesh(List mesh, Color3f color, String name, float scale, int threshold)
@Deprecated public Content addMesh(List<Point3f> mesh, Color3f color, String name, int threshold)
public void removeAllContents()
public void removeContent(String name)
name
- public Iterator contents()
contents
in class DefaultUniverse
public Collection getContents()
public boolean contains(String name)
name
- public Content getContent(String name)
name
- public void sync(boolean b)
public void saveView(String file) throws IOException
IOException
public void loadView(String file) throws IOException
IOException
public void resetView()
public void rotateUniverse(Vector3d axis, double angle)
axis
- The axis of rotation (in the image plate coordinate system)angle
- The angle in radians.public void rotateToNegativeXY()
public void rotateToPositiveXY()
public void rotateToNegativeXZ()
public void rotateToPositiveXZ()
public void rotateToNegativeYZ()
public void rotateToPositiveYZ()
public void centerSelected(Content c)
public void centerAt(Point3d p)
public void adjustView()
public void adjustView(int dir)
dir
- One of ViewAdjuster.ADJUST_HORIZONTAL,
ViewAdjuster.ADJUST_VERTICAL or ViewAdjuster.ADJUST_BOTHpublic void adjustView(Iterable<Content> contents)
public void adjustView(Iterable<Content> contents, int dir)
dir
- One of ViewAdjuster.ADJUST_HORIZONTAL,
ViewAdjuster.ADJUST_VERTICAL or ViewAdjuster.ADJUST_BOTHpublic void adjustView(Content c, int dir)
dir
- One of ViewAdjuster.ADJUST_HORIZONTAL,
ViewAdjuster.ADJUST_VERTICAL or ViewAdjuster.ADJUST_BOTHpublic void adjustView(Content c)
public String allContentsString()
public Content addContent(Content c)
c
- public Future<Content> addContentLater(Content c)
c
- The Content to addpublic Collection<Future<Content>> addContentLater(String file)
public Collection<Future<Content>> addContentLater(Collection<Content> cc)
cc
- The Collection of Content to addCopyright © 2015–2021 Fiji. All rights reserved.