Woolz Image Processing  Version 1.7.5
WlzSectionTransform

## Files

file  Wlz3DSection.c
Functions for cutting 2D sections from 3D objects.

file  Wlz3DSectionFromGeoModel.c
Functions to cut a 2D geometric model from a 3D geometric model.

file  Wlz3DSectionSegmentObject.c
Segments a 3D object into 2 parts determined by the input section plane. The parts are the domains on either side of the plane.

file  Wlz3DSubSection.c
Return a sub-region of a 3D section via a 3D section transform.

file  Wlz3DViewStructUtils.c
Utility functions associated with 3D views.

file  WlzExplode3D.c
Explodes a 3D domain object into 2D domain objects.

## Data Structures

struct  _WlzThreeDViewStruct
Defines a planar section through a 3D volume. Typedef: WlzThreeDViewStruct. More...

## Enumerations

enum  _WlzThreeDStdViews {
WLZ_X_Y_VIEW,
WLZ_Y_Z_VIEW,
WLZ_Z_X_VIEW,
WLZ_ARBITRARY_VIEW
}
Standard 3D views. Typedef: WlzThreeDStdViews. More...

enum  _WlzThreeDViewMode {
WLZ_STATUE_MODE,
WLZ_UP_IS_UP_MODE,
WLZ_FIXED_LINE_MODE,
WLZ_ZERO_ZETA_MODE,
WLZ_ZETA_MODE
}
3D viewing modes which determine the angle at which the plane is cut through a 3D volume. Typedef: WlzThreeDViewMode. More...

## Functions

WlzObjectWlzGetSectionFromObject (WlzObject *obj, WlzThreeDViewStruct *view, WlzInterpolationType interp, WlzErrorNum *dstErr)
Cuts the 2D object which lies on the plane specified by the given view structure from the given 3D object. If the given object is a 3D domain object with grey values then a new 2D object is created with the same grey-type as the given object. Only grey values within the area defined by the view structure reference object are extracted. Returns a rectangular object and value table with size determined by the bounding box which encloses the bounding box of the original but in the viewing direction. More...

WlzObjectWlzGetMaskedSectionFromObject (WlzObject *obj, WlzThreeDViewStruct *view, WlzInterpolationType interp, WlzErrorNum *dstErr)
Cuts the 2D object which lies on the plane specified by the given view structure from the given 3D object. If the given object is a 3D domain object with grey values then a new 2D object is created with the same grey-type as the given object. Only grey values within the area defined by the view structure reference object are extracted. Returns an object with domain defined by the section cut through the reference object. The value table is rectangular and the same size as from WlzGetSectionFromObject. More...

WlzGMModelWlzGetSectionFromGMModel (WlzGMModel *gModel, WlzThreeDViewStruct *view, WlzErrorNum *dstErr)
Get a 2D geometric model which is the intersection a plane, specified by the 3D view structure, and the given 3D geometric model. More...

WlzErrorNum Wlz3DSectionSegmentObject (WlzObject *obj, WlzThreeDViewStruct *viewStr, int *numObjs, WlzObject ***rtnObjs)
Segment a given 3D object into 2 parts determined by the input section plane. The parts are the domains on either side of the plane. More...

WlzObjectWlzGetSubSectionFromObject (WlzObject *obj, WlzObject *subDomain, WlzThreeDViewStruct *view, WlzInterpolationType interp, WlzObject **maskRtn, WlzErrorNum *dstErr)
Computes a section through the given 3D object. More...

WlzThreeDViewStructWlzMake3DViewStructCopy (WlzThreeDViewStruct *given, WlzErrorNum *dstErr)
Allocates and intialises a new 3D view and sets it's parameters to those of the given view. The new transform's look up tables are not allocated. More...

WlzThreeDViewStructWlzMake3DViewStruct (WlzObjectType type, WlzErrorNum *dstErr)
Allocates and intialises a 3D view. The transform look up tables are not allocated. More...

WlzErrorNum WlzFree3DViewStruct (WlzThreeDViewStruct *viewStr)
Frees a view. More...

WlzErrorNum WlzInit3DViewStructAffineTransform (WlzThreeDViewStruct *viewStr)
Sets up the affine transform of the given view including scale. This does not require any initialisation. The intialisation mask will have the WLZ_3DVIEWSTRUCT_INIT_TRANS bit set. By default the scale parameters are not used. Scaling is enabled by setting bits in the voxelRescaleFlg: setting bit 1 will switch on voxel-size rescaling; setting bit 2 will enable global scaling. More...

WlzErrorNum Wlz3DViewStructSetupTransformLuts (WlzThreeDViewStruct *viewStr)
Sets up the transformation look up tables of the given view. More...

WlzErrorNum Wlz3DViewStructTransformBB (WlzObject *obj, WlzThreeDViewStruct *viewStr)
Set up the min and max vertex values for the transformed space. If the input object is a WLZ_3D_DOMAINOBJ then the bounding box will enclose the transformed bounding box of the input object. If the input object is a WLZ_2D_DOMAINOBJ then it is assumed that this is the transformed section and the min and max valuesa are those of the object itself. These values are padded to account for round-off errors. More...

WlzErrorNum WlzInit3DViewStruct (WlzThreeDViewStruct *viewStr, WlzObject *obj)
Initialises a 3D view with respect to the given view parameters and a 3D object. More...

WlzErrorNum Wlz3DSectionTransformVtx (WlzDVertex3 *vtx, WlzThreeDViewStruct *viewStr)
Transforms a 3D vertex using the section transform overwriting the vertex values. More...

WlzErrorNum Wlz3DSectionTransformVtxR (WlzThreeDViewStruct *viewStr, WlzDVertex3 vtx, WlzDVertex3 *dstVtx)
Transforms a 3D vertex using the section transform. More...

WlzErrorNum Wlz3DSectionTransformInvVtx (WlzDVertex3 *vtx, WlzThreeDViewStruct *viewStr)
Inverse transforms a 3D vertex using the section transform, overwriting the vertex values. More...

WlzErrorNum Wlz3DSectionTransformInvVtxR (WlzThreeDViewStruct *viewStr, WlzDVertex3 vtx, WlzDVertex3 *dstVtx)
Inverse transforms a 3D vertex using the section transform. More...

WlzErrorNum Wlz3DSectionIncrementDistance (WlzThreeDViewStruct *viewStr, double incr)
Increments the distance parameter of a 3D view resetting the look up tables as required. This is provided because changing the distance does not require the rotation matrix and all the look up tables only a single multiply and add per look up table entry instead of 2 multiplies and three adds plus all the y look up tables and the rotation matrix with many trigonometry calculations. More...

WlzDVertex2 Wlz3DViewGetIntersectionPoint (WlzThreeDViewStruct *v1, WlzThreeDViewStruct *v2, WlzErrorNum *dstErr)
Finds a point on the line of intersection of two 3D views. The point is returned in the coordinate system of the first view. This function together with Wlz3DViewGetIntersectionAngle() is useful for finding the line of intersection within one of the planes. More...

double Wlz3DViewGetIntersectionAngle (WlzThreeDViewStruct *v1, WlzThreeDViewStruct *v2, WlzErrorNum *dstErr)
Finds the angle of the ine of intersection of two views. More...

int Wlz3DViewGetBoundingBoxIntersection (WlzThreeDViewStruct *viewStr, WlzDVertex3 *rtnVtxs, WlzErrorNum *dstErr)
Gets the vertices of intersection between a section and the bounding box of the reference object. The vertices are returned in order to be used for display etc.. More...

int Wlz3DViewGetBoundingBoxIntersectionA (WlzThreeDViewStruct *viewStr, int *dstSizeArrayVtxs, WlzDVertex3 **dstArrayVtxs, WlzErrorNum *dstErr)
Gets the vertices of intersection between a section and the given bounding box. The vertices are returned in order to be used for display etc. More...

int Wlz3DViewGetGivenBBIntersection (WlzThreeDViewStruct *viewStr, WlzDVertex3 bbMin, WlzDVertex3 bbMax, WlzDVertex3 *rtnVtxs, WlzErrorNum *dstErr)
get the vertices of intersection between a section and the given bounding box. The vertices are returned in order to be used for display etc. More...

WlzErrorNum Wlz3DViewGetFixed (WlzThreeDViewStruct *vs, double *dstX, double *dstY, double *dstZ)
Gets the fixed point coordinates from a 3D view. More...

WlzErrorNum Wlz3DViewSetFixed (WlzThreeDViewStruct *vs, double x, double y, double z)
Sets the fixed point coordinates in a 3D view. More...

WlzErrorNum Wlz3DViewGetTheta (WlzThreeDViewStruct *vs, double *dstVal)
Gets the angle theta from the 3D view. More...

WlzErrorNum Wlz3DViewSetTheta (WlzThreeDViewStruct *vs, double val)
Sets the angle theta from the 3D view. More...

WlzErrorNum Wlz3DViewGetPhi (WlzThreeDViewStruct *vs, double *dstVal)
Gets the angle phi from the 3D view. More...

WlzErrorNum Wlz3DViewSetPhi (WlzThreeDViewStruct *vs, double val)
Sets the angle phi from the 3D view. More...

WlzErrorNum Wlz3DViewGetZeta (WlzThreeDViewStruct *vs, double *dstVal)
Gets the angle zeta from the 3D view. More...

WlzErrorNum Wlz3DViewSetZeta (WlzThreeDViewStruct *vs, double val)
Sets the angle zeta from the 3D view. More...

WlzErrorNum Wlz3DViewGetDist (WlzThreeDViewStruct *vs, double *dstVal)
Gets the increment distance from the 3D view. More...

WlzErrorNum Wlz3DViewSetDist (WlzThreeDViewStruct *vs, double val)
Sets the increment distance in the 3D view. More...

WlzErrorNum Wlz3DViewGetScale (WlzThreeDViewStruct *vs, double *dstVal)
Gets the scale from the 3D view. More...

WlzErrorNum Wlz3DViewSetScale (WlzThreeDViewStruct *vs, double val)
Sets the scale in the 3D view. More...

WlzErrorNum Wlz3DViewGetViewMode (WlzThreeDViewStruct *vs, WlzThreeDViewMode *dstVal)
Gets the view mode from the 3D view. More...

WlzErrorNum Wlz3DViewSetViewMode (WlzThreeDViewStruct *vs, WlzThreeDViewMode val)
Sets the view mode in the 3D view. More...

WlzErrorNum Wlz3DViewGetUp (WlzThreeDViewStruct *vs, double *dstX, double *dstY, double *dstZ)
Gets the up vector from the 3D view. More...

WlzErrorNum Wlz3DViewSetUp (WlzThreeDViewStruct *vs, double x, double y, double z)
Sets the up vector in the 3D view. More...

WlzErrorNum Wlz3DViewGetFixed2 (WlzThreeDViewStruct *vs, double *dstX, double *dstY, double *dstZ)
Gets the coordinates of the second fixed point from the 3D view. More...

WlzErrorNum Wlz3DViewSetFixed2 (WlzThreeDViewStruct *vs, double x, double y, double z)
Sets the coordinates of the second fixed point in the 3D view. More...

WlzErrorNum Wlz3DViewGetFixedLineAngle (WlzThreeDViewStruct *vs, double *dstVal)
Gets the fixed line angle from the 3D view. More...

WlzErrorNum Wlz3DViewSetFixedLineAngle (WlzThreeDViewStruct *vs, double val)
Sets the fixed line angle in the 3D view. More...

WlzErrorNum Wlz3DViewGetMaxvals (WlzThreeDViewStruct *vs, double *dstX, double *dstY, double *dstZ)
Gets the section maximum values from the 3D view. More...

WlzErrorNum Wlz3DViewGetMinvals (WlzThreeDViewStruct *vs, double *dstX, double *dstY, double *dstZ)
Gets the section minimum values from the 3D view. More...

void Wlz3DViewGetPlaneEqn (WlzThreeDViewStruct *view, double *dstA, double *dstB, double *dstC, double *dstD)
Computes the parameters of the equation of the plane defined by the given 3D view. More...

int Wlz3DViewIntersectAABB (WlzThreeDViewStruct *view, WlzDBox3 box)
Tests for an intersection between the plane defined by the given 3D view and the given axis aligned bounding box (AABB). More...

WlzThreeDViewStructWlz3DViewStructFromNormal (WlzDVertex3 nrm, WlzDVertex3 org, WlzDVertex3 up, WlzErrorNum *dstErr)
Creates a new 3D view structure with angles and fixed point set. More...

WlzErrorNum WlzExplode3D (int *dstExpObjCount, WlzObject ***dstExpObjVecP, WlzObject *srcObj)
Explodes the given 3D domain object into 2D domain objects. More...

## Enumeration Type Documentation

 enum _WlzThreeDStdViews

Standard 3D views. Typedef: WlzThreeDStdViews.

Enumerator
WLZ_X_Y_VIEW
WLZ_Y_Z_VIEW
WLZ_Z_X_VIEW
WLZ_ARBITRARY_VIEW
 enum _WlzThreeDViewMode

3D viewing modes which determine the angle at which the plane is cut through a 3D volume. Typedef: WlzThreeDViewMode.

Enumerator
WLZ_STATUE_MODE

Corresponds to "walking around a statue" so that if the view is say from the left-hand side then the section will have the top of the statue to the left.

WLZ_UP_IS_UP_MODE

The projection of the vector up onto the section image will be "up". This is ill-defined if the viewing direction is very close to "up".

WLZ_FIXED_LINE_MODE
WLZ_ZERO_ZETA_MODE
WLZ_ZETA_MODE

## Function Documentation

 WlzObject* WlzGetSectionFromObject ( WlzObject * obj, WlzThreeDViewStruct * view, WlzInterpolationType interp, WlzErrorNum * dstErr )

Cuts the 2D object which lies on the plane specified by the given view structure from the given 3D object. If the given object is a 3D domain object with grey values then a new 2D object is created with the same grey-type as the given object. Only grey values within the area defined by the view structure reference object are extracted. Returns a rectangular object and value table with size determined by the bounding box which encloses the bounding box of the original but in the viewing direction.

Returns
A new 2D object cut from the given 3D object.
Parameters
 obj Given 3D object. view The given view structure. interp Interpolation type - nearest neighbour or linear dstErr Destination pointer for error code, may be NULL.

Referenced by WlzGetMaskedSectionFromObject(), and WlzGetSubSectionFromObject().

 WlzObject* WlzGetMaskedSectionFromObject ( WlzObject * obj, WlzThreeDViewStruct * view, WlzInterpolationType interp, WlzErrorNum * dstErr )

Cuts the 2D object which lies on the plane specified by the given view structure from the given 3D object. If the given object is a 3D domain object with grey values then a new 2D object is created with the same grey-type as the given object. Only grey values within the area defined by the view structure reference object are extracted. Returns an object with domain defined by the section cut through the reference object. The value table is rectangular and the same size as from WlzGetSectionFromObject.

Returns
A new 2D object cut from the given 3D object.
Parameters
 obj Given 3D object. view The given view structure. interp Interpolation type - nearest neighbour or linear dstErr Destination pointer for error code, may be NULL.
 WlzGMModel* WlzGetSectionFromGMModel ( WlzGMModel * gModel, WlzThreeDViewStruct * view, WlzErrorNum * dstErr )

Get a 2D geometric model which is the intersection a plane, specified by the 3D view structure, and the given 3D geometric model.

Returns
New 2D geometric model or NULL on error.
Parameters
 gModel Given 3D geometric model. view Given view structure which specifies the plane. dstErr Destination pointer for an error code, may be NULL.

Referenced by WlzGetMaskedSectionFromObject().

 WlzErrorNum Wlz3DSectionSegmentObject ( WlzObject * obj, WlzThreeDViewStruct * viewStr, int * numObjs, WlzObject *** rtnObjs )

Segment a given 3D object into 2 parts determined by the input section plane. The parts are the domains on either side of the plane.

Returns
Error value.
Parameters
 obj Input object to be segmented. viewStr 3D view structure defining the cut plane. numObjs Number of objects returned. rtnObjs Array of object pointers, space is allocated for the returned object pointers and will need to be freed by the calling rountine.
Source:
Wlz3DSectionSegmentObject.c
 WlzObject* WlzGetSubSectionFromObject ( WlzObject * obj, WlzObject * subDomain, WlzThreeDViewStruct * view, WlzInterpolationType interp, WlzObject ** maskRtn, WlzErrorNum * dstErr )

Computes a section through the given 3D object.

Returns
New sub-section object.
Parameters
 obj Given 3D object. subDomain Given 2D domain within which to restrict the section. If NULL returned section will be have a rectangular domain which is the maximum for the given object and view transform when the given 3D object is a spatial domain object. view Given view transform. interp Interpolation, should be either WLZ_INTERPOLATION_NEAREST or WLZ_INTERPOLATION_LINEAR. maskRtn Destination pointer for returned domain mask. dstErr Destination error pointer, may be NULL.

Referenced by main(), Wlz3DSectionOcc(), WlzGetMaskedSectionFromObject(), and WlzGetSectionFromObject().

 WlzThreeDViewStruct* WlzMake3DViewStructCopy ( WlzThreeDViewStruct * given, WlzErrorNum * dstErr )

Allocates and intialises a new 3D view and sets it's parameters to those of the given view. The new transform's look up tables are not allocated.

Returns
New 3D view.
Parameters
 given Given view transform. dstErr Destination error pointer, may be NULL.

Referenced by Wlz3DSectionOcc(), WlzCopyDomain(), and WlzProj3DToSection().

 WlzThreeDViewStruct* WlzMake3DViewStruct ( WlzObjectType type, WlzErrorNum * dstErr )

Allocates and intialises a 3D view. The transform look up tables are not allocated.

Returns
A new view.
Parameters
 type Only WLZ_3D_VIEW_STRUCT is currently allowed. dstErr Destination pointer for an error code, may be NULL.
 WlzErrorNum WlzFree3DViewStruct ( WlzThreeDViewStruct * viewStr )

Frees a view.

Returns
Woolz error code.
Parameters
 viewStr Given view to free.
 WlzErrorNum WlzInit3DViewStructAffineTransform ( WlzThreeDViewStruct * viewStr )

Sets up the affine transform of the given view including scale. This does not require any initialisation. The intialisation mask will have the WLZ_3DVIEWSTRUCT_INIT_TRANS bit set. By default the scale parameters are not used. Scaling is enabled by setting bits in the voxelRescaleFlg: setting bit 1 will switch on voxel-size rescaling; setting bit 2 will enable global scaling.

Returns
Woolz error code.
Parameters
 viewStr Given view.

Referenced by WlzInit3DViewStruct(), and WlzProjectObjToPlane().

 WlzErrorNum Wlz3DViewStructSetupTransformLuts ( WlzThreeDViewStruct * viewStr )

Sets up the transformation look up tables of the given view.

Returns
Woolz error code.
Parameters
 viewStr Given view.

Referenced by WlzInit3DViewStruct().

 WlzErrorNum Wlz3DViewStructTransformBB ( WlzObject * obj, WlzThreeDViewStruct * viewStr )

Set up the min and max vertex values for the transformed space. If the input object is a WLZ_3D_DOMAINOBJ then the bounding box will enclose the transformed bounding box of the input object. If the input object is a WLZ_2D_DOMAINOBJ then it is assumed that this is the transformed section and the min and max valuesa are those of the object itself. These values are padded to account for round-off errors.

Returns
WlzErrorNum
Parameters
 obj Input object to define the required bounding box of transform range. viewStr 3D view structure with the transform initialised.
Source:
Wlz3DViewStructUtils.c

Referenced by WlzInit3DViewStruct(), and WlzProjectObjToPlane().

 WlzErrorNum WlzInit3DViewStruct ( WlzThreeDViewStruct * viewStr, WlzObject * obj )

Initialises a 3D view with respect to the given view parameters and a 3D object.

Returns
Woolz error code.
    Initialises a 3D view with respect to the given view parameters
and a 3D object. Initialisation involves calculating the bounds
of the section, setting up the look up tables to calculate the
section image, setting up the rotation matrix and attaching the
object as the reference object for this view. This view
structure can be reused for simple changes of the view
parameter "dist" but otherwise must be re-initialised.

This is a convenience rountine which checks previous memory
allocation then calls in turn WlzInit3DViewStructAffineTransform(),
Wlz3DViewStructTransformBB() and Wlz3DViewStructSetupTransformLuts()
and finally adds a link to the reference object.

Parameters
 viewStr View to be intialised. obj The 3D object to be sectioned.
 WlzErrorNum Wlz3DSectionTransformVtx ( WlzDVertex3 * vtx, WlzThreeDViewStruct * viewStr )

Transforms a 3D vertex using the section transform overwriting the vertex values.

Returns
Parameters
 vtx Given vertex, values are overwritten. viewStr Given view.

References _WlzThreeDViewStruct::trans, WLZ_ERR_NONE, and WlzAffineTransformVertexD3().

 WlzErrorNum Wlz3DSectionTransformVtxR ( WlzThreeDViewStruct * viewStr, WlzDVertex3 vtx, WlzDVertex3 * dstVtx )

Transforms a 3D vertex using the section transform.

Returns
Woolz error code.
Parameters
 viewStr Given view. vtx Vertex to be transformed. dstVtx destination pointer for the transformed vertex.
 WlzErrorNum Wlz3DSectionTransformInvVtx ( WlzDVertex3 * vtx, WlzThreeDViewStruct * viewStr )

Inverse transforms a 3D vertex using the section transform, overwriting the vertex values.

Returns
Woolz error code.
Parameters
 vtx Given 3D vertex, values are overwritten. viewStr Given view.

Referenced by Wlz3DSectionTransformInvVtxR(), and WlzGetProjectionFromObject().

 WlzErrorNum Wlz3DSectionTransformInvVtxR ( WlzThreeDViewStruct * viewStr, WlzDVertex3 vtx, WlzDVertex3 * dstVtx )

Inverse transforms a 3D vertex using the section transform.

Returns
Woolz error code.
Parameters
 viewStr Given view. vtx Vertex to be transformed. dstVtx Destination pointer for the transformed vertex.
 WlzErrorNum Wlz3DSectionIncrementDistance ( WlzThreeDViewStruct * viewStr, double incr )

Increments the distance parameter of a 3D view resetting the look up tables as required. This is provided because changing the distance does not require the rotation matrix and all the look up tables only a single multiply and add per look up table entry instead of 2 multiplies and three adds plus all the y look up tables and the rotation matrix with many trigonometry calculations.

Returns
Always returns WLZ_ERR_NONE because this fuction does no error checking!
Parameters
 viewStr Given view. incr The increment distance.
 WlzDVertex2 Wlz3DViewGetIntersectionPoint ( WlzThreeDViewStruct * v1, WlzThreeDViewStruct * v2, WlzErrorNum * dstErr )

Finds a point on the line of intersection of two 3D views. The point is returned in the coordinate system of the first view. This function together with Wlz3DViewGetIntersectionAngle() is useful for finding the line of intersection within one of the planes.

Returns
The point of intersection.
Parameters
 v1 First view. v2 Second view. dstErr Destination pointer for an error code, may be NULL.
 double Wlz3DViewGetIntersectionAngle ( WlzThreeDViewStruct * v1, WlzThreeDViewStruct * v2, WlzErrorNum * dstErr )

Finds the angle of the ine of intersection of two views.

Returns
The angle of intersection in radians.
Parameters
 v1 First view. v2 Second view. dstErr Destination pointer for an error code, may be NULL.
 int Wlz3DViewGetBoundingBoxIntersection ( WlzThreeDViewStruct * viewStr, WlzDVertex3 * rtnVtxs, WlzErrorNum * dstErr )

Gets the vertices of intersection between a section and the bounding box of the reference object. The vertices are returned in order to be used for display etc..

Returns
The number of vertices.
Parameters
 viewStr The section view. rtnVtxs Array of 12 vertices to return values. dstErr Destination pointer for an error code, may be NULL.

Referenced by Wlz3DViewGetBoundingBoxIntersectionA().

 int Wlz3DViewGetBoundingBoxIntersectionA ( WlzThreeDViewStruct * viewStr, int * dstSizeArrayVtxs, WlzDVertex3 ** dstArrayVtxs, WlzErrorNum * dstErr )

Gets the vertices of intersection between a section and the given bounding box. The vertices are returned in order to be used for display etc.

Returns
The number of vertices in the intersection.
Parameters
 viewStr The section View. dstSizeArrayVtxs Number of intersection verticies allocated, always 12 unless an error occurs. dstArrayVtxs Destination pointer for the array for computed vertices. The array will have 12 verticies allocated by AlcMalloc(). dstErr Destination pointer for error code, may be NULL.
 int Wlz3DViewGetGivenBBIntersection ( WlzThreeDViewStruct * viewStr, WlzDVertex3 bbMin, WlzDVertex3 bbMax, WlzDVertex3 * rtnVtxs, WlzErrorNum * dstErr )

get the vertices of intersection between a section and the given bounding box. The vertices are returned in order to be used for display etc.

Returns
The number of vertices in the intersection
Parameters
 viewStr The section View bbMin Vertex defining the minimum values of the bounding box bbMax Vertex defining the maximum values of the bounding box rtnVtxs Array of returned vertices, must be an array of at least 12 dstErr error return
Source:
Wlz3DViewStructUtils.c

Referenced by Wlz3DViewGetBoundingBoxIntersection().

 WlzErrorNum Wlz3DViewGetFixed ( WlzThreeDViewStruct * vs, double * dstX, double * dstY, double * dstZ )

Gets the fixed point coordinates from a 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstX Destination pointer for the fixed point X coordinate. dstY Destination pointer for the fixed point Y coordinate. dstZ Destination pointer for the fixed point Z coordinate.
 WlzErrorNum Wlz3DViewSetFixed ( WlzThreeDViewStruct * vs, double x, double y, double z )

Sets the fixed point coordinates in a 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. x Fixed point X coordinate. y Fixed point Y coordinate. z Fixed point Z coordinate.
 WlzErrorNum Wlz3DViewGetTheta ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the angle theta from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for theta.

References _WlzThreeDViewStruct::theta, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetTheta ( WlzThreeDViewStruct * vs, double val )

Sets the angle theta from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of theta.

References _WlzThreeDViewStruct::theta, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewGetPhi ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the angle phi from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for phi.

References _WlzThreeDViewStruct::phi, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetPhi ( WlzThreeDViewStruct * vs, double val )

Sets the angle phi from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of phi.

References _WlzThreeDViewStruct::phi, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewGetZeta ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the angle zeta from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for zeta.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and _WlzThreeDViewStruct::zeta.

 WlzErrorNum Wlz3DViewSetZeta ( WlzThreeDViewStruct * vs, double val )

Sets the angle zeta from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of zeta.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and _WlzThreeDViewStruct::zeta.

 WlzErrorNum Wlz3DViewGetDist ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the increment distance from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for the increment distance.

References _WlzThreeDViewStruct::dist, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetDist ( WlzThreeDViewStruct * vs, double val )

Sets the increment distance in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of the increment distance.

References _WlzThreeDViewStruct::dist, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewGetScale ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the scale from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for the scale.

References _WlzThreeDViewStruct::scale, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetScale ( WlzThreeDViewStruct * vs, double val )

Sets the scale in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of the scale.

References _WlzThreeDViewStruct::scale, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewGetViewMode ( WlzThreeDViewStruct * vs, WlzThreeDViewMode * dstVal )

Gets the view mode from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for the view mode.

References _WlzThreeDViewStruct::view_mode, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetViewMode ( WlzThreeDViewStruct * vs, WlzThreeDViewMode val )

Sets the view mode in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val Value of the view mode.
 WlzErrorNum Wlz3DViewGetUp ( WlzThreeDViewStruct * vs, double * dstX, double * dstY, double * dstZ )

Gets the up vector from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstX Destination pointer for the X coordinate of the up vector. dstY Destination pointer for the Y coordinate of the up vector. dstZ Destination pointer for the Z coordinate of the up vector.
 WlzErrorNum Wlz3DViewSetUp ( WlzThreeDViewStruct * vs, double x, double y, double z )

Sets the up vector in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. x X coordinate of the up vector. y Y coordinate of the up vector. z Z coordinate of the up vector.
 WlzErrorNum Wlz3DViewGetFixed2 ( WlzThreeDViewStruct * vs, double * dstX, double * dstY, double * dstZ )

Gets the coordinates of the second fixed point from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstX Destination pointer for the X coordinate of the second fixed point. dstY Destination pointer for the Y coordinate of the second fixed point. dstZ Destination pointer for the Z coordinate of the second fixed point.
 WlzErrorNum Wlz3DViewSetFixed2 ( WlzThreeDViewStruct * vs, double x, double y, double z )

Sets the coordinates of the second fixed point in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. x X coordinate of the second fixed point. y Y coordinate of the second fixed point. z Z coordinate of the second fixed point.
 WlzErrorNum Wlz3DViewGetFixedLineAngle ( WlzThreeDViewStruct * vs, double * dstVal )

Gets the fixed line angle from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstVal Destination pointer for the fixed line angle.

References _WlzThreeDViewStruct::fixed_line_angle, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewSetFixedLineAngle ( WlzThreeDViewStruct * vs, double val )

Sets the fixed line angle in the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. val The fixed line angle.

References _WlzThreeDViewStruct::fixed_line_angle, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

 WlzErrorNum Wlz3DViewGetMaxvals ( WlzThreeDViewStruct * vs, double * dstX, double * dstY, double * dstZ )

Gets the section maximum values from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstX Destination pointer for the X section maximum coordinate. dstY Destination pointer for the Y section maximum coordinate. dstZ Destination pointer for the Z section maximum coordinate.
 WlzErrorNum Wlz3DViewGetMinvals ( WlzThreeDViewStruct * vs, double * dstX, double * dstY, double * dstZ )

Gets the section minimum values from the 3D view.

Returns
Woolz error code.
Parameters
 vs Given view. dstX Destination pointer for the X section maximum coordinate. dstY Destination pointer for the Y section maximum coordinate. dstZ Destination pointer for the Z section maximum coordinate.
 void Wlz3DViewGetPlaneEqn ( WlzThreeDViewStruct * view, double * dstA, double * dstB, double * dstC, double * dstD )

Computes the parameters of the equation of the plane defined by the given 3D view.

Returns
void
    Computes the parameters of the equation of the plane


$ax + by + cz + d = 0$

defined by the given 3D view. None of the destination pointers may be NULL and the 3D view is assumed valid although only its theta, phi distance increment and fixed point are used.
Parameters
 view Given view. dstA Destination pointer for the X parameter. dstB Destination pointer for the Y parameter. dstC Destination pointer for the Z parameter. dstD Destination pointer for the other parameter.
 int Wlz3DViewIntersectAABB ( WlzThreeDViewStruct * view, WlzDBox3 box )

Tests for an intersection between the plane defined by the given 3D view and the given axis aligned bounding box (AABB).

Returns
Non zero if there is an intersection otherwise zero.
Parameters
 view Given view which defines a plane. box Given axis aligned bounding box.

References Wlz3DViewGetPlaneEqn(), and WlzGeomPlaneAABBIntersect().

Referenced by WlzGetSectionFromGMModel().

 WlzThreeDViewStruct* Wlz3DViewStructFromNormal ( WlzDVertex3 nrm, WlzDVertex3 org, WlzDVertex3 up, WlzErrorNum * dstErr )

Creates a new 3D view structure with angles and fixed point set.

Returns
New 3D view structure with angles and fixed point set or NULL on error.

Given normal $$\vec{n}$$ with $$\vec{n} = (n_x,n_y,n_z)$$, then:

\begin{eqnarray*} \cos(\phi) = \frac{n_z}{|\vec{n}|} \\ \tan(\theta) = \frac{n_y}{n_x} \end{eqnarray*}

Parameters
 nrm Normal to the view plane (need not be a unit normal). org Fixed point origin for the view structure. up Up vector which is only used if the length of the up vector is not close to zero ( $$|\vec{u}|^2 > 1.0e-06$$ ). When the up vector is used then the mode of the view structure is set to up-is-up. dstErr Destination error pointer, may be NULL.
 WlzErrorNum WlzExplode3D ( int * dstExpObjCount, WlzObject *** dstExpObjVecP, WlzObject * srcObj )

Explodes the given 3D domain object into 2D domain objects.

Returns
Error number.
Parameters
 dstExpObjCount Destination pointer for number of exploded Woolz objects. dstExpObjVecP Destination pointer for vector of exploded objects. srcObj Given woolz object.