Woolz Image Processing Version 1.4.0
Wlz3DWarpMQ_S.c File Reference

Generates a regular tetrahedral mesh for a 3D domain. More...

Data Structures

struct  _WlzMeshScanDElm
 Mesh scanning element. More...
struct  _WlzMeshScanItv
 Scan interval within an element. More...
struct  _WlzMeshScanWSp2D5

Defines

#define IN_RECORD_MAX   (1024)

Typedefs

typedef struct _WlzMeshScanDElm WlzMeshScanDElm
typedef struct _WlzMeshScanItv WlzMeshScanItv
typedef struct _WlzMeshScanWSp2D5 WlzMeshScanWSp2D5

Functions

double WlzGeomTriangle2SnArea3 (WlzDVertex3 *a, int i, int j, int k)
 output the cut plane in VTK format to a file.
void WlzEffWriteMeshTransform3DWithoutDisplacementVTK (FILE *fp, WlzMeshTransform3D *wmt3D)
 output the orginal mesh.
void WlzEffWriteMeshTransform3DWithDisplacementVTK (FILE *fp, WlzMeshTransform3D *wmt3D)
 output the transformed mesh.
void WlzEffWriteOriginalPlaneVTKByDis (FILE *fp, WlzMeshTransform2D5 *wmt2D5)
 output the orginal surface corresponding to the cut plane represented by the postion of the same mesh.
void WlzEffWriteOriginalPlaneVTKByPos (FILE *fp, WlzMeshTransform2D5 *wmt2D5)
 output the cutted plane.
WlzErrorNum write_Wlz2D5Mesh (FILE *fp, char *cstr, WlzMeshTransform2D5 *wmt2D5)
 Write 2D5 mesh for inspections.
WlzErrorNum Write_WlzCutScanLines (FILE *fp, char *cstr, WlzMeshScanWSp2D5 *mSnWSp)
 Write the section view parameters in the bibtex style record using the bibFile library.
WlzErrorNum WlzGetTransformedMesh (WlzMeshTransform3D *wmt3D, WlzBasisFnTransform *basisTr)
 Get a 3D mesh transfrom from a basis transform and a 3D mesh.
WlzObjectWlzMeshTransformObj_3D (WlzObject *srcObj, WlzMeshTransform3D *wmt3D, WlzInterpolationType interp, WlzErrorNum *dstErr)
WlzIBox3 WlzMQ3DTransformBBoxI3 (WlzMeshTransform3D *wmt3D, WlzErrorNum *errNum)
int WlzIsSinglePointCutMesh (const WlzMeshTransform2D5 *wmt2D5)
int WlzNoAreaGreaterThanOne (const WlzMeshTransform2D5 *wmt2D5)
void WlzGet2D5Transform (const WlzMeshTransform3D *wmt3D, int cutPosition, WlzMeshTransform2D5 *wmt2D5, WlzErrorNum *dsterrNum)
 Creates a new plane domain from a given bounding box.
void WlzInitializeWmt2D5 (WlzMeshTransform2D5 *wmt2D5)
 initialize the 2D5 mesh.
WlzErrorNum read_WlzTiePoints (FILE *fp, int *nTiePP, WlzDVertex3 **vxVec01, WlzDVertex3 **vxVec11, const int ReadDisplacement)
 Get the index of the tetrahedrons which intersect with a giving z = constant plane.
WlzMeshTransform3DWlzTetrahedronMeshFromObj (WlzObject *wObjC, const WlzDBox3 bBoxS, const int numOfElemAlonX, const int numOfElemAlonY, const int numOfElemAlonZ, WlzErrorNum *errNums)
WlzMeshTransform2D5Wlz2D5TransformFromCut3Dmesh (double zConst, WlzMeshTransform3D *wmt3D, WlzErrorNum *dstErr)
 Get a 2D5 mesh from a transformed 3D mesh by cuting it into a plane.
WlzErrorNum WlzTetrahedronProducerFromCube (int neighbourLeft, int neighbourRight, int neighbourBack, int neighbourFront, int neighbourDown, int neighbourUp, int nxmax, int nymax, int nzmax, int nx, int ny, int nz, int indexOfNextFirst, WlzMeshElem3D *elements)
 Divide a cuboid into six tetrahedral elements.
int WlzIsoIntersectWithTetrahadronIndex (double zConst, const WlzMeshTransform3D *wmt3D, int *intersectIndex, WlzDVertex3 *planepoints, int **linkList, int *noRedundancyCutingNum, int *numTotalTrangularElem)
 Get the index of the tetrahedrons which intersect with a giving z = constant plane.
void WlzMakeAffine3D4pointsTrFn (WlzDVertex3 sr0, WlzDVertex3 sr1, WlzDVertex3 sr2, WlzDVertex3 sr3, WlzDVertex3 targ0, WlzDVertex3 targ1, WlzDVertex3 targ2, WlzDVertex3 targ3, double **Affine3D4pointsTrFun)
 Get 3D Affine transformation from the nodes of a source tetrahedron and the nodes from a target tetrahedron.

Detailed Description

Generates a regular tetrahedral mesh for a 3D domain.

Author:
Jianguo Rao
Date:
September 2003
Version:
Id:
b35d8870b00095b0e8623099009ed550dbda705b
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Define Documentation

#define IN_RECORD_MAX   (1024)

Referenced by read_WlzTiePoints().


Typedef Documentation


Function Documentation

WlzObject * WlzMeshTransformObj_3D ( WlzObject srcObj,
WlzMeshTransform3D wmt3D,
WlzInterpolationType  interp,
WlzErrorNum dstErr 
)
WlzIBox3 WlzMQ3DTransformBBoxI3 ( WlzMeshTransform3D wmt3D,
WlzErrorNum errNum 
)
  • Function: WlzMeshTransform3DObj
  • Ingroup: WlzTransform
  • Returns: WlzObject *: Transformed object, NULL on error.
  • Purpose: Transforms a woolz object using a the given mesh transform.
  • Global refs: -
  • Parameters:
    1. *srcObj: Woolz Object to be transformed.
      1. *wmt3D: Given mesh transform to apply.
      2. *wmt2D5: Given 2D5 mesh transform fram.
      3. interp: Level of interpolation to use.
      4. *dstErr: Destination error pointer, may be NULL.
  • Author: J. Rao, R. Baldock and B. Hill
  • Function: WlzMeshTransformObjPrv3D
  • Ingroup: WlzTransform.
  • Returns: WlzObject *: Transformed object, NULL on error.
  • Purpose: Private version of WlzMeshTransformObj3D() which transforms a woolz object using a the given mesh transform.
  • Global refs: -
  • Parameters:
    1. *srcObj: Woolz object to be transformed.
      1. *mesh: Given mesh transform to apply.
      2. *mesh: Given 2D5 mesh transform frame to apply.
      3. interp: Level of interpolation touse.
      4. *dstErr: Destination error pointer, may be NULL.
  • Author: J. Rao, R. Baldock and B. Hill
  • Function: WlzMQ3DTransformBBoxI3
  • Ingroup: WlzTransform.
  • Returns: Wlooz Integer Bounding box.
  • Purpose: Get a bounding box for the transformed mesh.
  • Global refs: -
  • Parameters:
    1. *wmt3D: Given mesh transform.
    2. *errNum: Woolz Error number
  • Author: J. Rao, R. Baldock and B. Hill

References _WlzMeshTransform3D::nNodes, _WlzMeshTransform3D::nodes, WLZ_ERR_NONE, WLZ_ERR_TRANSFORM_TYPE, _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzMeshTransformObj_3D().

int WlzIsSinglePointCutMesh ( const WlzMeshTransform2D5 wmt2D5)
  • Function: WlzIsSinglePointCutMesh
  • Returns: an integer >0 Yes. =0 No.
  • Ingroup: WlzAccess
  • Purpose: judge whether it is a single point cut.
  • Global refs: -
  • Parameters:
    1. *wmt2D5: the 2D5 mesh transform.
  • Author: J. Rao, R. Baldock and B. Hill

References _WlzMeshTransform2D5::nElem, _WlzMeshTransform2D5::nodes, _WlzDVertex2::vtX, and _WlzDVertex2::vtY.

int WlzNoAreaGreaterThanOne ( const WlzMeshTransform2D5 wmt2D5)
  • Function: WlzNoAreaGreaterThanOne
  • Returns: an integer >0 Yes. =0 No.
  • Ingroup: WlzAccess
  • Purpose: judge whether there is no area greater than one.
  • Global refs: -
  • Parameters:
    1. *wmt2D5: the 2D5 mesh transform.
  • Author: J. Rao, R. Baldock and B. Hill

References _WlzMeshTransform2D5::elements, _WlzMeshTransform2D5::nElem, _WlzMeshTransform2D5::nodes, _WlzDVertex2::vtX, _WlzDVertex2::vtY, and WlzGeomTriangleSnArea2().

WlzMeshTransform3D * WlzTetrahedronMeshFromObj ( WlzObject wObjC,
const WlzDBox3  bBoxS,
const int  numOfElemAlonX,
const int  numOfElemAlonY,
const int  numOfElemAlonZ,
WlzErrorNum errNums 
)
  • Project: Woolz
  • Return: none
  • Ingroup: WlzTransform
  • Title: AllocateMemForElemAndNodes
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: Allocate memories for 3D mesh transform
  • Parameters:
    1. wmt3D: a 3D mesh transform.
    2. nxynumber: number of cuboids in xy plane
    3. nxnumber: number of cuboids along the x-direction.
    4. xmin: the starting positoin in x-direction.
    5. ymin: the starting positoin in y-direction.
    6. zmin: the starting positoin in z-direction.
    7. xdelta: the size of the cuboid in x-direction.
    8. ydelta: the size of the cuboid in y-direction.
    9. zdelta: the size of the cuboid in z-direction.
  • Project: Woolz
  • Return: Woolz 3D MQ mesh transform
  • Ingroup: WlzTransform
  • Title: WlzTetrahedronMeshFromObj.c
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: Warp a Woolz object by a 3D mesh transform
  • Parameters: wObjC: Woolz object to be warped. input
    1. wmt3D: a 3D mesh transform. input
    2. bBoxS: A bounding box which specified by the user generally covering the input Woolz object.
    3. numOfElemAlonX: number of cuboids along the x-direction.
    4. numOfElemAlonY: number of cuboids along the y-direction.
    5. numOfElemAlonZ: number of cuboids along the z-direction.
    6. errNums: Destination error pointer, may be null. in and output

References AlcCalloc(), AlcRealloc(), _WlzMeshTransform3D::elements, _WlzMeshTransform3D::nElem, _WlzMeshTransform3D::nNodes, _WlzMeshTransform3D::nodes, WLZ_3D_DOMAINOBJ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WlzHasIntersection(), WlzMakeCuboidObject(), WlzShiftObject(), WlzTetrahedronProducerFromCube(), _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.