public class ObjectCreator3D
extends java.lang.Object
License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see
/** Create 3D shapes
cedric started 3 mars 2004
Constructor and Description |
---|
ObjectCreator3D(ImageHandler image)
Constructor for the ObjectCreator3D object
|
ObjectCreator3D(ImageStack stack) |
ObjectCreator3D(int sizex,
int sizey,
int sizez)
Constructor for the ObjectCreator3D object
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
createBrick(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
float value)
Create a brick in Z direction with centre and radius
|
void |
createBrick(int xmin,
int xmax,
int ymin,
int ymax,
int zmin,
int zmax,
float value)
Create brick with bounding box coordinates, in Z direction
|
void |
createBrick(Vector3D V,
double rx,
double ry,
double rz,
float val)
Description of the Method
|
void |
createBrickAxes(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
float value,
Matrix M)
Creation d'une ellipsoide
|
void |
createBrickAxes(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
float value,
Vector3D V) |
void |
createBrickAxesUnit(double centerx,
double centery,
double centerz,
double rx,
double ry,
double rz,
float value,
Vector3D V) |
void |
createBrickUnit(double centerx,
double centery,
double centerz,
double rx,
double ry,
double rz,
float value)
Description of the Method
|
void |
createBrickUnit(Vector3D V,
double rx,
double ry,
double rz,
float val)
Description of the Method
|
void |
createCone(int centerx,
int centery,
int centerz,
double rx0,
double ry0,
double rx1,
double ry1,
double height,
float value) |
void |
createConeAxes(int centerx,
int centery,
int centerz,
double rx0,
double ry0,
double rx1,
double ry1,
double height,
float value,
Matrix M) |
void |
createConeAxes(int centerx,
int centery,
int centerz,
double rx0,
double ry0,
double rx1,
double ry1,
double height,
float value,
Vector3D V,
Vector3D W) |
void |
createCylinder(int centerx,
int centery,
int centerz,
double rx,
double ry,
double height,
float value)
Creation d'un cylindre
|
void |
createCylinderAxes(int centerx,
int centery,
int centerz,
double rx,
double ry,
double height,
float value,
Matrix M)
Creation d'un cylindre
|
void |
createCylinderAxes(int centerx,
int centery,
int centerz,
double rx,
double ry,
double height,
float value,
Vector3D V,
Vector3D W) |
void |
createEllipsoid(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
float value,
boolean gauss)
Creation d'une ellipsoide
|
void |
createEllipsoid(Vector3D V,
double rx,
double ry,
double rz,
float col)
Description of the Method
|
void |
createEllipsoidAxes(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
float value,
Matrix M,
boolean gauss)
Creation d'une ellipsoide (data in pix)
|
void |
createEllipsoidAxesUnit(double centerx,
double centery,
double centerz,
double rx,
double ry,
double rz,
float value,
Vector3D V,
Vector3D W,
boolean gauss) |
void |
createEllipsoidUnit(double centerx,
double centery,
double centerz,
double rx,
double ry,
double rz,
float value,
boolean gauss)
Description of the Method
|
void |
createEllipsoidUnit(Vector3D V,
double rx,
double ry,
double rz,
float col)
Description of the Method
|
void |
createGradientCube(int centerx,
int centery,
int centerz,
double rx,
double ry,
double rz,
Gradient g)
Création d'un dégradé sur cube
|
void |
createGradientCube(Vector3D center,
double rx,
double ry,
double rz,
Gradient g)
Création d'un dégradé
|
void |
createGradientSphere(int centerx,
int centery,
int centerz,
double r,
Gradient g)
Création d'un gradient sur ellipsoïde
|
void |
createGradientSphere(Point3D center,
double r,
Gradient g)
Création d'un gradient sur sphère
|
void |
createLine(int x0,
int y0,
int z0,
int x1,
int y1,
int z1,
float val,
int rad)
Create a 3D line
|
void |
createLine(Point3D P1,
Point3D P2,
float val,
int rad) |
void |
createLine(Vector3D V1,
Vector3D V2,
float val,
int rad)
Description of the Method
|
void |
createLineUnit(Vector3D V1,
Vector3D V2,
float val,
int rad)
Description of the Method
|
void |
createPixel(int x,
int y,
int z,
int col)
Description of the Method
|
void |
createSphere(double centerx,
double centery,
double centerz,
double radius,
float value,
boolean gauss)
Description of the Method
|
void |
createSphereUnit(double centerx,
double centery,
double centerz,
double radius,
float value,
boolean gauss)
Description of the Method
|
void |
drawObject(Object3D obj) |
void |
drawVoxels(java.util.ArrayList<Voxel3D> voxels) |
Calibration |
getCalibration()
Gets the calibration attribute of the Object3D object
|
ImageHandler |
getImageHandler()
Gets the image3D attribute of the ObjectCreator3D object
|
Object3DVoxels |
getObject3DVoxels(int val) |
ImagePlus |
getPlus() |
ImageStack |
getStack()
Returns an ImageStack
|
void |
reset() |
void |
reset(int nb) |
void |
setCalibration(Calibration cal)
Sets the calibration attribute of the Object3D object
|
void |
setResolution(double rxy,
double rz,
java.lang.String u)
Sets the resolution attribute of the ObjectCreator3D object
|
public ObjectCreator3D(ImageHandler image)
image
- The image3D to draw insidepublic ObjectCreator3D(ImageStack stack)
stack
- public ObjectCreator3D(int sizex, int sizey, int sizez)
sizex
- Size x of the imagesizey
- Size y of the imagesizez
- Size z of the imagepublic void setResolution(double rxy, double rz, java.lang.String u)
rxy
- The new resolution in XYrz
- The new resolution in Zu
- The new resolution unitpublic Calibration getCalibration()
public void setCalibration(Calibration cal)
cal
- The new calibration valuepublic void createSphereUnit(double centerx, double centery, double centerz, double radius, float value, boolean gauss)
centerx
- Centre X of the spherecentery
- Centre Y of the spherecenterz
- Centre Z of the sphereradius
- Radius of the spherevalue
- Value of the pixel in the imagegauss
- Is gaussian decrease of the intensitypublic void createSphere(double centerx, double centery, double centerz, double radius, float value, boolean gauss)
centerx
- Centre X of the spherecentery
- Centre Y of the spherecenterz
- Centre Z of the sphereradius
- Radius of the spherevalue
- Value of the pixel in the imagegauss
- Is gaussian decrease of the intensitypublic void createEllipsoidUnit(double centerx, double centery, double centerz, double rx, double ry, double rz, float value, boolean gauss)
centerx
- Centre X of the ellipsoidcentery
- Centre Y of the ellipsoidcenterz
- Centre Z of the ellipsoidrx
- Radius X of the ellipsoidry
- Radius X of the ellipsoidrz
- Radius X of the ellipsoidvalue
- Value of the pixel in the imagegauss
- Is gaussian decrease of the intensitypublic void createEllipsoid(Vector3D V, double rx, double ry, double rz, float col)
V
- Description of the Parameterrx
- Description of the Parameterry
- Description of the Parameterrz
- Description of the Parametercol
- Description of the Parameterpublic void createEllipsoidUnit(Vector3D V, double rx, double ry, double rz, float col)
V
- Description of the Parameterrx
- Description of the Parameterry
- Description of the Parameterrz
- Description of the Parametercol
- Description of the Parameterpublic void createEllipsoid(int centerx, int centery, int centerz, double rx, double ry, double rz, float value, boolean gauss)
rx
- Rayon en x (unit)ry
- Rayon en y (unit)rz
- Rayon en z (unit)centerx
- Centre en xcentery
- Centre en ycenterz
- Centre en zvalue
- Valeur à remplirgauss
- uniform or ramp valuespublic void createEllipsoidAxes(int centerx, int centery, int centerz, double rx, double ry, double rz, float value, Matrix M, boolean gauss)
rx
- Rayon en xry
- Rayon en yrz
- Rayon en zcenterx
- Centre en xcentery
- Centre en ycenterz
- Centre en zvalue
- Valeur à remplirgauss
- uniform or ramp valuesM
- Description of the Parameterpublic void createBrickAxes(int centerx, int centery, int centerz, double rx, double ry, double rz, float value, Matrix M)
rx
- Rayon en x (unit)ry
- Rayon en y (unit)rz
- Rayon en z (unit)centerx
- Centre en xcentery
- Centre en ycenterz
- Centre en zvalue
- Valeur à remplirM
- Description of the Parameterpublic void createEllipsoidAxesUnit(double centerx, double centery, double centerz, double rx, double ry, double rz, float value, Vector3D V, Vector3D W, boolean gauss)
centerx
- centery
- centerz
- rx
- ry
- rz
- value
- V
- W
- gauss
- public void createBrickAxesUnit(double centerx, double centery, double centerz, double rx, double ry, double rz, float value, Vector3D V)
centerx
- centery
- centerz
- rx
- ry
- rz
- value
- V
- public void createBrickAxes(int centerx, int centery, int centerz, double rx, double ry, double rz, float value, Vector3D V)
centerx
- centery
- centerz
- rx
- ry
- rz
- value
- V
- public void createBrick(Vector3D V, double rx, double ry, double rz, float val)
V
- Description of the Parameterrx
- Description of the Parameterry
- Description of the Parameterrz
- Description of the Parameterval
- Description of the Parameterpublic void createBrickUnit(Vector3D V, double rx, double ry, double rz, float val)
V
- Description of the Parameterrx
- Description of the Parameterry
- Description of the Parameterrz
- Description of the Parameterval
- Description of the Parameterpublic void createBrickUnit(double centerx, double centery, double centerz, double rx, double ry, double rz, float value)
centerx
- Description of the Parametercentery
- Description of the Parametercenterz
- Description of the Parameterrx
- Description of the Parameterry
- Description of the Parameterrz
- Description of the Parametervalue
- Description of the Parameterpublic void createBrick(int xmin, int xmax, int ymin, int ymax, int zmin, int zmax, float value)
xmin
- X minimumxmax
- X maximumymin
- Y minimumymax
- Y maximumzmin
- Z minimumzmax
- Z maximumvalue
- value to drawpublic void createBrick(int centerx, int centery, int centerz, double rx, double ry, double rz, float value)
centerx
- centre Xcentery
- centre Ycenterz
- centre Zrx
- radius Xry
- radius Yrz
- radius Zvalue
- the value to drawpublic void createPixel(int x, int y, int z, int col)
x
- Description of the Parametery
- Description of the Parameterz
- Description of the Parametercol
- Description of the Parameterpublic void createLine(int x0, int y0, int z0, int x1, int y1, int z1, float val, int rad)
x0
- x originy0
- y originz0
- z originx1
- x endy1
- y endz1
- z endval
- pixel valuerad
- radius for the line (as small spheres) (pix)public void createLine(Vector3D V1, Vector3D V2, float val, int rad)
V1
- Description of the Parameterval
- Description of the Parameterrad
- Description of the ParameterV2
- Description of the Parameterpublic void createLine(Point3D P1, Point3D P2, float val, int rad)
P1
- P2
- val
- rad
- public void createLineUnit(Vector3D V1, Vector3D V2, float val, int rad)
V1
- Description of the ParameterV2
- Description of the Parameterval
- Description of the Parameterrad
- Description of the Parameterpublic void createCylinder(int centerx, int centery, int centerz, double rx, double ry, double height, float value)
centerx
- Centre sur l'axe Xcentery
- Centre sur l'axe Ycenterz
- Centre sur l'axe Zrx
- Rayon du cylindrery
- Rayon du cylindreheight
- Epaisseur du cylindrevalue
- Valeur associé au pixelpublic void createCone(int centerx, int centery, int centerz, double rx0, double ry0, double rx1, double ry1, double height, float value)
public void createConeAxes(int centerx, int centery, int centerz, double rx0, double ry0, double rx1, double ry1, double height, float value, Matrix M)
public void createCylinderAxes(int centerx, int centery, int centerz, double rx, double ry, double height, float value, Matrix M)
rx
- Rayon en x (unit)ry
- Rayon en y (unit)height
- Rayon en z (unit)centerx
- Centre en xcentery
- Centre en ycenterz
- Centre en zvalue
- Valeur à remplirM
- Description of the Parameterpublic void createCylinderAxes(int centerx, int centery, int centerz, double rx, double ry, double height, float value, Vector3D V, Vector3D W)
public void createConeAxes(int centerx, int centery, int centerz, double rx0, double ry0, double rx1, double ry1, double height, float value, Vector3D V, Vector3D W)
public void createGradientCube(Vector3D center, double rx, double ry, double rz, Gradient g)
center
- Coordonées du centre du cuberx
- Demi-largeur du cubery
- Demi-hauteur du cuberz
- Demi-profondeur du cubeg
- Gradientpublic void createGradientCube(int centerx, int centery, int centerz, double rx, double ry, double rz, Gradient g)
centerx
- Centre X du cubecentery
- Centre Y du cubecenterz
- Centre Z du cuberx
- Demi-largeur du cubery
- Demi-hauteur du cuberz
- Demi-profondeur du cubeg
- Gradientpublic void createGradientSphere(Point3D center, double r, Gradient g)
center
- Coordonées du centre de la sphèrer
- Rayon de la sphèreg
- Gradientpublic void createGradientSphere(int centerx, int centery, int centerz, double r, Gradient g)
centerx
- Centre X de la sphèrecentery
- Centre Y de la sphèrecenterz
- Centre Z de la sphèrer
- Rayon de la sphèreg
- Gradientpublic ImageStack getStack()
public ImagePlus getPlus()
public void clear()
public ImageHandler getImageHandler()
public Object3DVoxels getObject3DVoxels(int val)
public void reset()
public void drawVoxels(java.util.ArrayList<Voxel3D> voxels)
public void drawObject(Object3D obj)
public void reset(int nb)
nb
-