In file graphics2D/SliceCamera.h:

class SliceCamera ifdef GRAPHICS : public Camera2D, public Owner<ScaleCamera>, public Scalable endif

2D camera that can change displayed scene slice

Inheritance:


Public Classes

enum SLICE_ORIENTATION
the different geometry of a slice of a volumetric image
SLICE_X
slice with X (column) = constant
SLICE_Y
slice with Y (row) = constant
SLICE_Z
slice with Z (plane) = constant
SLICE_ALPHA
slice with alpha (angle in XY) = constant
enum GEOMETRY
the different image kinds
CARTESIAN
standard 3D image
CYLINDRICAL
cylindrical geometry (Z = plane angle, Y = elevation, Z = in plane radius)
SPHERICAL
spherical geometry (Z = plane angle, Y = in plane angle, X = radius)

Public Methods

void backgroundDying (void)
dying inrimage callback
void setBackground (SliceCameraBackground *_background)
set the background of the slice camera
void updateSliceables ()
recompute the display list of all sliceable in the scene
virtual void update ()
recompute the display list of all sliceable in the scene
ScaleCamera* getScaleCamera () const
returns the (slice) scale attached to the camera
void setScaleCamera (ScaleCamera *sc)
sets the (slice) scale attached to the camera
void resetScaleCamera ()
resets the (slice) scale attached to the camera
virtual void dying (const ObjectPointer<ScaleCamera>& obj)
slicescale owner callback
virtual TclString objectName (void) const
Scalable objectName method callback
virtual void scaleValue (const TclScale *scale, double val)
slice scale value changed
virtual const char* sliceName (SliceCamera::SLICE_ORIENTATION geom) const
returns slice name string by geometry
virtual SliceCamera::SLICE_ORIENTATION geomByName (const char *name) const
returns geometry by slice name string
double getSlice (void) const
returns slice number
double getThickness (void) const
returns slice thickness
SLICE_ORIENTATION getGeometry (void) const
returns slice scene geometry
void setThickness (double d)
set new slice thickness
void setGeometry (SLICE_ORIENTATION geom)
Change slice geometry
void setSlice (double val)
shows new slice
virtual void translateCamera (Vec2 &t)
translates camera center and call sliceable objects recompute method
virtual void scaleCamera (double s)
scales camera and call sliceable objects recompute method
SliceCameraBackground* getBackground (void) const
returns slice camera background
void changeBackground (SliceCameraBackground *b)
set a new inrimage in scene
virtual double getMin (const TclScale *scale) const
get min possible scale value for this scalable
virtual double getMax (const TclScale *scale) const
get max possible scale value for this scalable
Vec2 getOffset () const
get the offset for drawing background
void doFocus (void)
overloads the computation of the center and scale of the camera
virtual void focusOnBackground (void)
reset camera size to background size and focus camera on background center
TclSliceCamera* getInterface (void) const
returns camera interface

Public

constructor
SliceCamera (Scene2D *scene, double slice = 0.0, SLICE_ORIENTATION geom = SLICE_Z, double zoom = 1.0, ScaleCamera *sc=0)
build new camera
destructor

Protected Fields

double slice
visible slice
double thickness
slice thickness
SLICE_ORIENTATION geometry
visible slice geometry
bool dieOnBackground
flag indicating whether to die on inrimage deletion
SliceCameraBackground* background
the camera background (if any) or 0
Vec2 offset
offset when drawing with a visible area

Inherited from Camera2D:

Public Methods

Vec2 getCameraCenter(void) const
virtual void pickObject(const Vec2 &pixel)
virtual void init(void)
virtual void resize(void)
virtual void startComputation(void)
virtual void stopComputation(void)
virtual void resize(unsigned int w, unsigned int h)
virtual void rotateCamera(Rotation2D& rot)
void mapToWorld(const Vec2 &pixel, Vec2 &position)
void mapToScreen(const Vec2 &position, Vec2 &pixel)
virtual void bindMouseMotion(bool on)
virtual void applyObjectSelection(Data2D *obj)
virtual void applyObjectUnselection(Data2D *obj)
virtual void drawBoundingBox(Data2D *obj) const
void displayBoundingBox()
void hideBoundingBox()
virtual void grab(const TclString& filename)
virtual void updateDisplay(void)
static void doUpdateDisplay(ClientData cam)

Public

Constructor

Camera2D(Scene2D *scn = 0, unsigned int h = 0, unsigned int w = 0, double scale = DEFAULT_CAMERA_SCALE)
Creates a new camera

Destructor

Protected Fields

static const double initialAspectRatio
Vec2 cameraCenter
bool updatePending

Protected Methods

virtual Vec2 getTrackballVector(int x, int y) const
virtual Rotation2D getTrackballRotation(const Vec2&a, const Vec2&b)
virtual double getTrackballScale(const Vec2&a, const Vec2&b)
virtual Vec2 getTrackballTranslation(const Vec2& a, const Vec2& b)
virtual Vec2 getTrackballZTranslation(const double a)

Protected

protected constructor

Camera2D(Camera2D *)
constructor that does not create any scene

Private Methods

void initCamera(void)

Inherited from Scalable:

Public Methods

virtual void scaleTo(const TclScale *scale, double val)
virtual double getStep(const TclScale *scale) const

Documentation

2D camera that can change displayed scene slice
enum SLICE_ORIENTATION
the different geometry of a slice of a volumetric image

SLICE_X
slice with X (column) = constant

SLICE_Y
slice with Y (row) = constant

SLICE_Z
slice with Z (plane) = constant

SLICE_ALPHA
slice with alpha (angle in XY) = constant

enum GEOMETRY
the different image kinds

CARTESIAN
standard 3D image

CYLINDRICAL
cylindrical geometry (Z = plane angle, Y = elevation, Z = in plane radius)

SPHERICAL
spherical geometry (Z = plane angle, Y = in plane angle, X = radius)

double slice
visible slice

double thickness
slice thickness

SLICE_ORIENTATION geometry
visible slice geometry

bool dieOnBackground
flag indicating whether to die on inrimage deletion

SliceCameraBackground* background
the camera background (if any) or 0

Vec2 offset
offset when drawing with a visible area

constructor

SliceCamera(Scene2D *scene, double slice = 0.0, SLICE_ORIENTATION geom = SLICE_Z, double zoom = 1.0, ScaleCamera *sc=0)
build new camera
Parameters:
scene - viewn scene
slice - slice to display
geom - slice geometry
zoom - scale factor
sc - a slider controlling the slice value

destructor

void backgroundDying(void)
dying inrimage callback

void setBackground(SliceCameraBackground *_background)
set the background of the slice camera

void updateSliceables()
recompute the display list of all sliceable in the scene

virtual void update()
recompute the display list of all sliceable in the scene

ScaleCamera* getScaleCamera() const
returns the (slice) scale attached to the camera

void setScaleCamera(ScaleCamera *sc)
sets the (slice) scale attached to the camera

void resetScaleCamera()
resets the (slice) scale attached to the camera

virtual void dying(const ObjectPointer<ScaleCamera>& obj)
slicescale owner callback

virtual TclString objectName(void) const
Scalable objectName method callback
Returns:
object name

virtual void scaleValue(const TclScale *scale, double val)
slice scale value changed
Parameters:
scale - calling scale object
val - new scale value

virtual const char* sliceName(SliceCamera::SLICE_ORIENTATION geom) const
returns slice name string by geometry
Returns:
slice name
Parameters:
geom - slice geometry

virtual SliceCamera::SLICE_ORIENTATION geomByName(const char *name) const
returns geometry by slice name string
Returns:
slice geometry
Parameters:
name - slice name

double getSlice(void) const
returns slice number

double getThickness(void) const
returns slice thickness

SLICE_ORIENTATION getGeometry(void) const
returns slice scene geometry

void setThickness(double d)
set new slice thickness

void setGeometry(SLICE_ORIENTATION geom)
Change slice geometry. Cause recompute method to be called. Set slice number to 0.0

void setSlice(double val)
shows new slice

virtual void translateCamera(Vec2 &t)
translates camera center and call sliceable objects recompute method
Parameters:
t - translation vector

virtual void scaleCamera(double s)
scales camera and call sliceable objects recompute method
Parameters:
s - scale

SliceCameraBackground* getBackground(void) const
returns slice camera background

void changeBackground(SliceCameraBackground *b)
set a new inrimage in scene

virtual double getMin(const TclScale *scale) const
get min possible scale value for this scalable
Returns:
min possible value
Parameters:
scale - calling scale object

virtual double getMax(const TclScale *scale) const
get max possible scale value for this scalable
Returns:
max possible value
Parameters:
scale - calling scale object

Vec2 getOffset() const
get the offset for drawing background

void doFocus(void)
overloads the computation of the center and scale of the camera

virtual void focusOnBackground(void)
reset camera size to background size and focus camera on background center

TclSliceCamera* getInterface(void) const
returns camera interface


Direct child classes:
Scene2D
Data2D

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de