Woolz Image Processing  Version 1.8.3
libWlzExt

Types data structures and functions for reading and writing external file formats to and from Woolz objects. See the libWlzExt for more detail. All procedures are detailed under different module headings. More...

Files

file  WlzExtFF.c
 Functions for reading and writting Woolz objects to and from external data formats.
 
file  WlzExtFF.h
 Main header file for external data file format support for the MRC Human Genetics Unit Woolz library.
 
file  WlzExtFFAm.c
 Functions for reading and writting Woolz objects to the Amira lattice file format.
 
file  WlzExtFFAnl.c
 Functions for reading and writting Woolz objects to the ANALYZE 7.5 format file.
 
file  WlzExtFFBibUtils.c
 Woolz IO bibfile utility functions to write and parse records written in bibfile format.
 
file  WlzExtFFBmp.c
 Functions for reading and writting Woolz objects to and from the portable anymap '.pnm' data format.
 
file  WlzExtFFDen.c
 Functions for reading and writting Woolz objects to and from the Stanford University '.den' data format.
 
file  WlzExtFFEMT.c
 Functions for reading and writting Woolz objects to and from the the Netgen neutral (tetrahedral) mesh file format.
 
file  WlzExtFFGif.c
 Functions for reading Woolz objects from Graphics Interchange Format (GIF) images.
 
file  WlzExtFFIcs.c
 Functions for reading and writting Woolz objects to and from the International Cytometry Standard '.ics'/'.ids' data format.
 
file  WlzExtFFIPL.c
 Functions for reading and writing IPLab image formats.
 
file  WlzExtFFJpeg.c
 Read and write procedures for Joint Expert Group image format JPEG.
 
file  WlzExtFFJSON.c
 Read and write Woolz objects as JSON encoded Woolz data structures.
 
file  WlzExtFFMesh.c
 Functions for reading and writting Woolz objects to and from the the tetrahedral mesh file format used by Pascal Frey's medit. See the INRIA technical report 0253 for a detailed explaination of the fromat. This file format is also used by the tetrhedral mesh generator tetgen.
 
file  WlzExtFFNifti.c
 Functions for reading and writting Woolz objects to the NIfTI format.
 
file  WlzExtFFNodeEle.c
 Functions for reading and writting Woolz objects to and from the the two part .node/.ele tetrahedral mesh file format used by Jonathan Shewchuk in Stellar.
 
file  WlzExtFFNrrd.c
 Functions for reading and writting Woolz objects to and from the Utah nearly raw raster data (NRRD) '.nrrd' single file data format.
 
file  WlzExtFFObj.c
 Functions for reading and writting Woolz objects to and from the the OBJ Wavefront geometry file format.
 
file  WlzExtFFPic.c
 Functions for reading and writting Woolz objects to and from the Biorad '.pic' data format.
 
file  WlzExtFFPly2.c
 Functions for reading and writting Woolz objects to and from the the Riken PLY2 file format.
 
file  WlzExtFFPnm.c
 Functions for reading and writting Woolz objects to and from the portable anymap '.pnm' data format.
 
file  WlzExtFFPvl.c
 Functions for reading and writting Woolz objects to the Drishti pvl.nc file format.
 
file  WlzExtFFRaw.c
 Read/write raw image data.
 
file  WlzExtFFSlc.c
 Functions for reading and writting Woolz objects to and from the '.slc' data format.
 
file  WlzExtFFSMesh.c
 Functions for reading and writting Woolz objects to and from the the GRUMMP surface mesh (smesh) file format.
 
file  WlzExtFFStack.c
 Functions for reading and writting Woolz objects to and from a stack of 2D files.
 
file  WlzExtFFStl.c
 Functions for reading and writting Woolz objects to and from the the stereolithography stl surface file sormat.
 
file  WlzExtFFTiff.c
 I/O functions for tiff format images.
 
file  WlzExtFFTxt.c
 Functions for writing Woolz objects to a simple text '.txt' data format.
 
file  WlzExtFFType.h
 Header file with data types for external data file format support for the MRC Human Genetics Unit Woolz library.
 
file  WlzExtFFVff.c
 Functions for reading and writting Woolz objects to and from the Sunvision '.vff' data format.
 
file  WlzExtFFVMesh.c
 Functions for reading and writting Woolz objects to and from the the GRUMMP VMESH tetrahedral mesh file format.
 
file  WlzExtFFVtk.c
 Functions for reading and writting Woolz objects to and from the VTK '.vtk' data format.
 

Data Structures

struct  _WlzEffAmMaterial
 Item in an Amira material list. Typedef: WlzEffAmMaterial. More...
 
struct  _WlzEffAmHead
 Head of a list of Amira materials. Typedef: WlzEffAmHead. More...
 
struct  _WlzEffAnlComplex
 Analyze 7.5 complex number representation. Typedef: WlzEffAnlComplex. More...
 
struct  _WlzEffAnlHeaderKey
 Analyze 7.5 file header key. Typedef: WlzEffAnlFileKey. More...
 
struct  _WlzEffAnlImageDim
 Analyze 7.5 file header structure for the image dimensions. Typedef: WlzEffAnlImageDim. More...
 
struct  _WlzEffAnlDataHistory
 Analyze 7.5 file header structure for the image history. Typedef: WlzEffAnlDataHistory. More...
 
struct  _WlzEffAnlDsr
 Analyze 7.5 file header. Typedef: WlzEffAnlDsr. More...
 

Enumerations

enum  _WlzEffFormat {
  WLZEFF_FORMAT_NONE = 0,
  WLZEFF_FORMAT_BMP,
  WLZEFF_FORMAT_DEN,
  WLZEFF_FORMAT_ICS,
  WLZEFF_FORMAT_PNM,
  WLZEFF_FORMAT_PIC,
  WLZEFF_FORMAT_SLC,
  WLZEFF_FORMAT_VFF,
  WLZEFF_FORMAT_VTK,
  WLZEFF_FORMAT_WLZ,
  WLZEFF_FORMAT_IPL,
  WLZEFF_FORMAT_TIFF,
  WLZEFF_FORMAT_RAW,
  WLZEFF_FORMAT_AM,
  WLZEFF_FORMAT_JPEG,
  WLZEFF_FORMAT_ANL,
  WLZEFF_FORMAT_GIF,
  WLZEFF_FORMAT_MESH,
  WLZEFF_FORMAT_NODEELE,
  WLZEFF_FORMAT_VMESH,
  WLZEFF_FORMAT_PLY2,
  WLZEFF_FORMAT_OBJ,
  WLZEFF_FORMAT_TXT,
  WLZEFF_FORMAT_NIFTI,
  WLZEFF_FORMAT_SMESH,
  WLZEFF_FORMAT_EMT,
  WLZEFF_FORMAT_STL,
  WLZEFF_FORMAT_PVL,
  WLZEFF_FORMAT_NRRD,
  WLZEFF_FORMAT_JSON,
  WLZEFF_FORMAT_COUNT
}
 enumeration of the file formats supported. Typedef: WlzEffFormat More...
 
enum  _WlzEffAmToken {
  WLZEFF_AM_TOKEN_NONE = (0),
  WLZEFF_AM_TOKEN_BOUNDINGBOX,
  WLZEFF_AM_TOKEN_CLOSE,
  WLZEFF_AM_TOKEN_COLOR,
  WLZEFF_AM_TOKEN_COLORMAP,
  WLZEFF_AM_TOKEN_CONTENT,
  WLZEFF_AM_TOKEN_COORDTYPE,
  WLZEFF_AM_TOKEN_DEFINE,
  WLZEFF_AM_TOKEN_EXPRESSION,
  WLZEFF_AM_TOKEN_HASH,
  WLZEFF_AM_TOKEN_ID,
  WLZEFF_AM_TOKEN_IMAGEDATA,
  WLZEFF_AM_TOKEN_LATTICE,
  WLZEFF_AM_TOKEN_MATERIALS,
  WLZEFF_AM_TOKEN_NAME,
  WLZEFF_AM_TOKEN_OPEN,
  WLZEFF_AM_TOKEN_PARAMETERS,
  WLZEFF_AM_TOKEN_SEEDS,
  WLZEFF_AM_TOKEN_LIMITS,
  WLZEFF_AM_TOKEN_TIFF,
  WLZEFF_AM_TOKEN_TRANSFORM
}
 Tokens for parsing the headers of Amira lattice files. Typedef: WlzEffAmToken. More...
 
enum  _WlzEffAmDim {
  WLZEFF_AM_DIM_NONE = (0),
  WLZEFF_AM_DIM_2 = (2),
  WLZEFF_AM_DIM_3 = (3)
}
 Dimension of the data. Typedef: WlzEffAmDim. More...
 
enum  _WlzEffAmEndian {
  WLZEFF_AM_ENDIAN_NONE = (0),
  WLZEFF_AM_ENDIAN_BIG = (10),
  WLZEFF_AM_ENDIAN_LITTLE = (11)
}
 Big or little endian binary data. The values endian enum must be kept distinct from the dimension enum values (apart from none). Typedef: WlzEffAmFormat. More...
 
enum  _WlzEffAmFormat {
  WLZEFF_AM_FMT_NONE = (0),
  WLZEFF_AM_FMT_BINARY = (1),
  WLZEFF_AM_FMT_ASCII = (2)
}
 ASCII or binary data. Typedef: WlzEffAmFormat. More...
 
enum  _WlzEffAmDatType {
  WLZEFF_AM_DATTYPE_NONE = (0),
  WLZEFF_AM_DATTYPE_BYTE = (1),
  WLZEFF_AM_DATTYPE_SHORT = (2)
}
 Type of data: byte, ... Typedef: WlzEffAmDatType. More...
 
enum  _WlzEffAmCoordType {
  WLZEFF_AM_COORDTYPE_NONE = (0),
  WLZEFF_AM_COORDTYPE_UNITFORM = (1)
}
 Type of coordinate system. Typedef: WlzEffAmCoordType. More...
 
enum  _WlzEffAmLatComp {
  WLZEFF_AM_LATCOMP_NONE = (0),
  WLZEFF_AM_LATCOMP_HXBYTERLE = (1)
}
 Type of compression used. Typedef: WlzEffAmLatComp. More...
 
enum  _WlzEffAmLatType {
  WLZEFF_AM_LATTYPE_NONE = (0),
  WLZEFF_AM_LATTYPE_DATA = (1),
  WLZEFF_AM_LATTYPE_LABELS = (2)
}
 Type of lattice: uniform, ... Typedef: WlzEffAmLatType. More...
 
enum  _WlzEffAnlDataType {
  WLZEFF_ANL_DT_NONE = 0,
  WLZEFF_ANL_DT_UNKOWN = 0,
  WLZEFF_ANL_DT_BINARY = 1,
  WLZEFF_ANL_DT_UNSIGNED_CHAR = 2,
  WLZEFF_ANL_DT_SIGNED_SHORT = 4,
  WLZEFF_ANL_DT_SIGNED_INT = 8,
  WLZEFF_ANL_DT_FLOAT = 16,
  WLZEFF_ANL_DT_COMPLEX = 32,
  WLZEFF_ANL_DT_DOUBLE = 64,
  WLZEFF_ANL_DT_RGB = 128,
  WLZEFF_ANL_DT_ALL = 255
}
 Valid Analyze data type values. Typedef: WlzEffAnlDataType. More...
 

Functions

WlzEffFormat WlzEffStringExtToFormat (const char *extStr)
 Returns a file format for the given file extension string. More...
 
WlzEffFormat WlzEffStringToFormat (const char *fmtStr)
 Returns a file format for the given file format string. More...
 
const char * WlzEffStringFromFormat (WlzEffFormat fileFmt, const char **dstExtStr)
 Returns a string which is suitable for displaying the given format and sets a destination pointer for the formats file extension. More...
 
WlzEffFormat WlzEffStringFormatFromFileName (const char *fNameStr)
 Returns a the file format implied by the file extension used in the given file name. If no match is found WlzEffFormat::WLZEFF_FORMAT_NONE is returned. More...
 
WlzObjectWlzEffReadObj (FILE *fP, const char *fName, WlzEffFormat fFmt, int split, int sTrans, int gTrans, WlzErrorNum *dstErr)
 Reads a woolz object from the the given file names(s) or opened file, where the file format is that given as a parameter. The ANL, ICS, PNM (and a few other multi file formats) require a file name, for all other formats either the file name or a file pointer may be given. More...
 
WlzErrorNum WlzEffWriteObj (FILE *fP, const char *fName, WlzObject *obj, WlzEffFormat fFmt)
 Writes a woolz object to the the given file stream, with the given file format. More...
 
int WlzEffNumberOfFormats (void)
 Retuns the number of file formats, ie WLZEFF_FORMAT_COUNT - 1. More...
 
char * WlzEffFormatTable (unsigned indWth, unsigned desWth, unsigned extWth, WlzErrorNum *dstErr)
 Creates an ascii table of the valid formats supported by WlzExtFF. This may be useful for giving usage information in binaries. More...
 
WlzObjectWlzEffReadObjAm (FILE *fP, int split, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file using the Amira lattice (.am file) format. More...
 
WlzErrorNum WlzEffWriteObjAm (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file using the Amira lattice (.am file) format. More...
 
WlzErrorNum WlzEffAnlFileNames (char **fileBody, char **hdrFileName, char **imgFileName, const char *gvnFileName)
 Builds the ANALYZE file names from the given file name. These strings should be free'd using AlcFree() when no longer required. More...
 
WlzObjectWlzEffReadObjAnl (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the ANALYZE 7.5 format. The given file name is used to generate the '.hdr' and '.img' filenames. More...
 
WlzErrorNum WlzEffWriteObjAnl (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to the given file(s) using the ANALYZE 7.5 file format. The given file name is used to generate the '.hdr' and '.img' filenames. More...
 
WlzThreeDViewStructWlzEffBibRead3DView (FILE *fP, char **dstMsg, WlzErrorNum *dstErr)
 Reads a 3D view from the given file pointer. More...
 
WlzErrorNum WlzEffBibWrite3DSectionViewParamsRecord (FILE *fp, char *recordName, WlzThreeDViewStruct *wlzViewStr)
 Write the section view parameters in the bibtex style record using the bibFile library. More...
 
WlzErrorNum WlzEffBibParse3DSectionViewParamsRecord (BibFileRecord *bibfileRecord, WlzThreeDViewStruct *wlzViewStr)
 Parse the bibfile record for a woolz 3D view structure setting paramters in the given view structure. More...
 
WlzErrorNum WlzEffBibWriteWarpTransformParamsRecord (FILE *fp, char *recordName, WlzFnType basisFnType, WlzTransformType affineType, WlzMeshGenMethod meshMthd, int meshMinDst, int meshMaxDst)
 Write the details of a warp transformation parameters. Note this does not write the warp transformation itself. More...
 
WlzErrorNum WlzEffBibParseWarpTransformParamsRecord (BibFileRecord *bibfileRecord, WlzFnType *basisFnType, WlzTransformType *affineType, WlzMeshGenMethod *meshMthd, int *meshMinDst, int *meshMaxDst)
 Parse the bibfile record for the warp transformation parameter settings. More...
 
WlzErrorNum WlzEffBibWriteTiePointVtxsRecord (FILE *fp, char *recordName, int index, WlzDVertex3 dstVtx, WlzDVertex3 srcVtx, int relativeFlg)
 Write a tie-point record in bibtex style. More...
 
WlzErrorNum WlzEffBibParseTiePointVtxsRecord (BibFileRecord *bibfileRecord, int *index, WlzDVertex3 *dstVtx, WlzDVertex3 *srcVtx, int *relativeFlg)
 Parse the bibfile record for a tie-point pair of vertices. The record should also include an index so that tie-point ordering is preserved. More...
 
WlzErrorNum WlzEffBibWriteFileRecord (FILE *fp, char *recordName, char *fileName, WlzEffFormat fileType)
 Write a bibfile record to record the file name and file type. More...
 
WlzErrorNum WlzEffBibParseFileRecord (BibFileRecord *bibfileRecord, int *dstIndex, char **dstFileName, WlzEffFormat *dstFileType)
 Parse a bibfile record for a filename and type. More...
 
WlzErrorNum WlzEffBibWriteWarpInputSegmentationParamsRecord (FILE *fp, char *recordName, int normFlg, int histoFlg, int shadeFlg, int gaussFlg, double width)
 Write a warp segmentation parameter record i.e. the image processing operations and paramters for extracting the gene-expression domain. More...
 
WlzErrorNum WlzEffBibParseWarpInputSegmentationParamsRecord (BibFileRecord *bibfileRecord, int *normFlg, int *histoFlg, int *shadeFlg, int *gaussFlg, double *width, int *threshLow, int *threshHigh)
 Parse the bibfile record for a MAPaint WarpInputSegmentationParams record. More...
 
WlzObjectWlzEffReadObjBmp (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file(s) using the '.pnm' file format. More...
 
WlzErrorNum WlzEffWriteObjBmp (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to the given file(s) using the '.pnm' file format. More...
 
WlzErrorNum WlzEffWriteObjBmp2D (const char *fNameStr, WlzObject *obj, WlzIVertex2 imgSz, WlzIVertex2 imgOrg, unsigned char *data, unsigned char bgd)
 Writes the given 2D Woolz object to the given file using the '.pnm' file format. More...
 
WlzErrorNum WlzEffReadObjBmpData2D (FILE *fP, WlzIVertex2 *gvnImgSz, unsigned char ***data)
 Reads the data from a pgm file into the data array given. More...
 
WlzObjectWlzEffReadObjDen (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the Stanford density file format. More...
 
WlzErrorNum WlzEffWriteObjDen (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the Stanford density file format. More...
 
WlzObjectWlzEffReadObjEMT (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format. More...
 
WlzErrorNum WlzEffWriteObjEMT (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the Netgen neutral mesh file format. More...
 
WlzObjectWlzEffReadObjGif (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the file pointer using the '.gif' file format. This function currently has the following limitations: More...
 
WlzErrorNum WlzEffIcsFileNames (char **fileBody, char **icsFileName, char **idsFileName, const char *gvnFileName)
 Builds the ics file names from the given file name. These strings should be free'd using AlcFree() when no longer required. More...
 
WlzObjectWlzEffReadObjIcs (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from a pair of files using the ICS format. The given file name is used to generate the '.ics' and '.ids' filenames. More...
 
WlzErrorNum WlzEffWriteObjIcs (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to a pair of files using the ICS format. The given file name is used to generate the '.ics' and '.ids' filenames. More...
 
WlzObjectWlzEffReadObjIPL (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the '.ipl' file format. More...
 
WlzErrorNum WlzEffWriteObjIPL (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the '.ipl' file format. More...
 
static WlzErrorNum WlzEffHeadWriteIPL (WlzEffIPLHeader *header, FILE *fP)
 Writes an IPL header to the given file stream. More...
 
WlzObjectWlzEffReadObjJpeg (FILE *fP, WlzErrorNum *dstErr)
 Reads a jpeg image frm the given file stream and returns a Woolz object. More...
 
WlzErrorNum WlzEffWriteObjJpeg (FILE *fP, WlzObject *obj, char *params)
 Writes the given object to a jpeg image. More...
 
WlzObjectWlzEffReadObjJsn (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file where the Woolz object is encoded using JSON. More...
 
WlzErrorNum WlzEffWriteObjJsn (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file where the Woolz object is encoded using JSON. More...
 
WlzObjectWlzEffReadObjMesh (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using Pascal Frey's tetrahedral mesh file format. The file must start with the records: More...
 
WlzErrorNum WlzEffWriteObjMesh (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using Pascal Frey's tetrahedral mesh file format. See WlzEffReadObjMesh() for details of the format. More...
 
WlzObjectWlzEffReadObjNifti (const char *gvnFileName, int sTrans, int gTrans, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the NIfTI format. In some cases (for example when the NIfTI object has complex values) a compound object may be returned. A text property is created for the returned object, containing various fields of the NIfTI header, some of which may not be used in the conversion. The qform transform/quaternion, mapping the image to it's source (scanner) coordinates is copied text property but no transform is either created of applied for it. The sform transform/quaternion is always applied if the parameter flag is set, otherwise it ionly is applied if it is a pure translation. If the sform transform is not applied then it will (if not an identity transform) be used to create a trans-obj. If affine transforms are applied then WLZ_INTERPOLATION_NEAREST is used. NIfTI allows the linear transformation of grey values. This will only be applied if the parameter flag is set. The grey scaling will result in floating point image grey values. More...
 
WlzErrorNum WlzEffWriteObjNifti (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to the given file(s) using the NIfTI file format. More...
 
WlzErrorNum WlzEffNodeEleFileNames (char **fileBody, char **nodeFileName, char **eleFileName, const char *gvnFileName)
 Builds the node/ele file names from the given file name. These strings should be free'd using AlcFree() when no longer required. More...
 
WlzObjectWlzEffReadObjNodeEle (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from a pair of files using the node/ele format. The given file name is used to generate the '.node' and '.ele' filenames. More...
 
WlzErrorNum WlzEffWriteObjNodeEle (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to a pair of files using the node/ele two part mesh file format. The given file name is used to generate the '.node' and '.ele' filenames. More...
 
WlzObjectWlzEffReadObjNrrd (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the NRRD file format. Not all NRRD files and not all encodings have been implemented. This function will currently only read pixel/voxel data, where this data is either raw or encoded using bzip2 or gzip compression. Use of these compression methods depends on their availability at compile time. If the input NRRD pixel/voxel type is either signed char or unsigned short then it is promoted to either signed short or signed int in the output Woolz object. Unused NRRD header fields are encoded as a text property of the output object. More...
 
WlzErrorNum WlzEffWriteObjNrrd (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the NRRD file format. This function will currently only write 2 or 3D domain objects. If the object has no values then unsigned byte values are written with background = 0 and forground = 255. If gzip compression is available at compile time the output file uses gzip compression, otherwise raw data are output. More...
 
WlzObjectWlzEffReadObjObj (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the Wavefront OBJ file format. This format consists of the following possible fields (one per line): Vertex data -v vertex geometry -vt ignored -vn vertex normal -vp ignored -cstype ignored -deg ignored -bmat ignored -step ignored Elements -p ignored -l ignored -f face -curv ignored -curv2 ignored -surf ignored Freeform elements -param ignored -trim ignored -hole ignored -scrv ignored -sp ignored -end ignored Freeform surface connectivity -con ignored Grouping -g ignored -o ignored -s ignored -mg ignored Rendering attributes -bevel ignored -c_interp ignored -d_interp ignored -lod ignored -usemtl ignored -mtllib ignored -shadow_obj ignored -trace_obj ignored -ctech ignored -stech ignored Comments

  1. ignored Only triangulated surface models can be read. All groupings will be amalgamated into one.
More...
 
WlzErrorNum WlzEffWriteObjObj (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file stream using the Wavefront OBJ file format, see WlzEffReadObjObj(). More...
 
WlzObjectWlzEffReadObjPic (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the BioRad Confocal '.pic' format. More...
 
WlzErrorNum WlzEffWriteObjPic (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the BioRad Confocal '.pic' format. More...
 
WlzObjectWlzEffReadObjPly2 (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the Riken PLY2 triangular mesh file format. This format simply consists of: More...
 
WlzErrorNum WlzEffWriteObjPly2 (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file stream using the Riken PLY2 triangular mesh file format, see WlzEffReadObjPly2(). More...
 
WlzObjectWlzEffReadObjPnm (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file(s) using the '.pnm' file format. More...
 
WlzErrorNum WlzEffWriteObjPnm (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to the given file(s) using the '.pnm' file format. More...
 
WlzErrorNum WlzEffWriteObjPnm2D (const char *fNameStr, WlzObject *obj, WlzIVertex2 imgSz, WlzIVertex2 imgOrg, unsigned char *data, unsigned char bgd)
 Writes the given 2D Woolz object to the given file using the '.pnm' file format. More...
 
WlzErrorNum WlzEffReadObjPnmData2D (FILE *fP, WlzIVertex2 *gvnImgSz, unsigned char ***data)
 Reads the data from a pgm file into the data array given. More...
 
WlzObjectWlzEffReadObjPvl (const char *gvnFileName, WlzErrorNum *dstErr)
 Reads a Woolz object from Drishti pvl.nc files. More...
 
WlzErrorNum WlzEffWriteObjPvl (const char *gvnFileName, WlzObject *obj)
 Writes the given Woolz object to a pair of files using the Derishti .pvl.nc file format. More...
 
WlzObjectWlzExtFFReadObjRaw (FILE *fp, int numKols, int numLines, int numPlanes, int bytesPerPixel, int bitsPerChannel, int numChannels, int byteOrder, WlzErrorNum *dstErr)
 Reads a raw 'brick of bytes' object into a Woolz object. More...
 
WlzObjectWlzEffReadObjSlc (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the '.slc' file format. More...
 
WlzErrorNum WlzEffWriteObjSlc (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the '.slc' file format. More...
 
WlzObjectWlzEffReadObjSMesh (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the GRUMMP smesh file format. This format is: More...
 
WlzErrorNum WlzEffWriteObjSMesh (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file stream using the GRUMMP smesh file format, see WlzEffReadObjSMesh(). More...
 
WlzObjectWlzEffReadObjStack (const char *gvnFileName, WlzEffFormat fFmt, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file(s) using the given (2D) file format. More...
 
WlzErrorNum WlzEffWriteObjStack (const char *gvnFileName, WlzEffFormat fFmt, WlzObject *obj)
 Writes the given Woolz object to the given file(s) using the given (2D) file format. More...
 
WlzObjectWlzEffReadObjStl (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the stereolithography stl surface file format. This format has surface definitions defined by a name and a collection of facet normals and loops. Each facet loop has the cooordinates of it's vertices. Only triangulated surface models can be read and all solids will be treated as one. More...
 
WlzErrorNum WlzEffWriteObjStl (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given file stream using the stereolithography stl file format, see WlzEffReadObjStl(). More...
 
WlzObjectWlzEffReadObjTiff (const char *tiffFileName, int split, WlzErrorNum *dstErr)
 Reads a Woolz object from the given file using the TIFF format. More...
 
WlzErrorNum WlzEffWriteObjTiff (const char *tiffFileName, WlzObject *obj)
 Writes the given Woolz object to the given file using the TIFF format. More...
 
WlzObjectWlzEffReadObjVff (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the Sunvision vff (rank 3) file format. More...
 
WlzErrorNum WlzEffWriteObjVff (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the Sunvision vff (rank 3) file format. More...
 
WlzObjectWlzEffReadObjVMesh (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format. More...
 
WlzErrorNum WlzEffWriteObjVMesh (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the GRUMP VMESH tetrahedral mesh file format. More...
 
WlzObjectWlzEffReadObjVtk (FILE *fP, WlzErrorNum *dstErr)
 Reads a Woolz object from the given stream using the Visualization Toolkit file format. There is no check on the major and minor version numbers since all files seem compatable. More...
 
WlzErrorNum WlzEffWriteObjVtk (FILE *fP, WlzObject *obj)
 Writes the given Woolz object to the given stream using the Visualization Toolkit file format. More...
 
WlzErrorNum WlzEffWritePointsVtk (FILE *fP, WlzObject *obj, int onlyDom)
 Writes the given Woolz points object to the given stream using the Visualization Toolkit polydata format, but without polygons. More...
 
WlzErrorNum WlzEffWritePointsVtkScalarValues (FILE *fP, WlzObject *obj)
 Writes the point scalar values of the given object to the given file. It is assumed that the points domain has already been written by WlzEffWritePointsVtk(). More...
 
WlzErrorNum WlzEffWritePointsVtkFieldValues (FILE *fP, WlzObject *obj)
 Writes the point field values of the given object to the given file. It is assumed that the points domain has already been written by WlzEffWritePointsVtk(). More...
 

Detailed Description

Types data structures and functions for reading and writing external file formats to and from Woolz objects. See the libWlzExt for more detail. All procedures are detailed under different module headings.

Enumeration Type Documentation

◆ _WlzEffFormat

enumeration of the file formats supported. Typedef: WlzEffFormat

Enumerator
WLZEFF_FORMAT_NONE 

None, used to indicating no match (equal to zero).

WLZEFF_FORMAT_BMP 

Microscoft bitmap.

WLZEFF_FORMAT_DEN 

Stanford density.

WLZEFF_FORMAT_ICS 

International cytometry standard.

WLZEFF_FORMAT_PNM 

Portable any map.

WLZEFF_FORMAT_PIC 

Biorad confocal pic format.

WLZEFF_FORMAT_SLC 

SLC volume files.

WLZEFF_FORMAT_VFF 

Sunvision volumes.

WLZEFF_FORMAT_VTK 

Visualization Toolkit.

WLZEFF_FORMAT_WLZ 

Woolz.

WLZEFF_FORMAT_IPL 

IP Lab.

WLZEFF_FORMAT_TIFF 

Tiff.

WLZEFF_FORMAT_RAW 

Raw data.

WLZEFF_FORMAT_AM 

Amira.

WLZEFF_FORMAT_JPEG 

Jpeg.

WLZEFF_FORMAT_ANL 

Analyze 7.5.

WLZEFF_FORMAT_GIF 

Graphics Interchange Format.

WLZEFF_FORMAT_MESH 

Pascal Frey's tetrahedral mesh format.

WLZEFF_FORMAT_NODEELE 

Jonathan Shewchuk's mesh format.

WLZEFF_FORMAT_VMESH 

GRUMMP tetrahedral mesh format.

WLZEFF_FORMAT_PLY2 

Riken PLY2 mesh format.

WLZEFF_FORMAT_OBJ 

Wavefront geometry format.

WLZEFF_FORMAT_TXT 

Simple ASCII text listing, csv format.

WLZEFF_FORMAT_NIFTI 

Neuroimaging Informatics Technology Initiative format based on Analyze 7.5.

WLZEFF_FORMAT_SMESH 

GRUMMP surface mesh format.

WLZEFF_FORMAT_EMT 

Netgen neutral mesh format.

WLZEFF_FORMAT_STL 

Stereolithography file format.

WLZEFF_FORMAT_PVL 

Drishti PVL dot NC format.

WLZEFF_FORMAT_NRRD 

Utah nearly raw raster data format.

WLZEFF_FORMAT_JSON 

JSON text encoding of Woolz.

WLZEFF_FORMAT_COUNT 

Keep last: Number of formats (including WLZEFF_FORMAT_NONE).

◆ _WlzEffAmToken

Tokens for parsing the headers of Amira lattice files. Typedef: WlzEffAmToken.

Enumerator
WLZEFF_AM_TOKEN_NONE 
WLZEFF_AM_TOKEN_BOUNDINGBOX 
WLZEFF_AM_TOKEN_CLOSE 
WLZEFF_AM_TOKEN_COLOR 
WLZEFF_AM_TOKEN_COLORMAP 
WLZEFF_AM_TOKEN_CONTENT 
WLZEFF_AM_TOKEN_COORDTYPE 
WLZEFF_AM_TOKEN_DEFINE 
WLZEFF_AM_TOKEN_EXPRESSION 
WLZEFF_AM_TOKEN_HASH 
WLZEFF_AM_TOKEN_ID 
WLZEFF_AM_TOKEN_IMAGEDATA 
WLZEFF_AM_TOKEN_LATTICE 
WLZEFF_AM_TOKEN_MATERIALS 
WLZEFF_AM_TOKEN_NAME 
WLZEFF_AM_TOKEN_OPEN 
WLZEFF_AM_TOKEN_PARAMETERS 
WLZEFF_AM_TOKEN_SEEDS 
WLZEFF_AM_TOKEN_LIMITS 
WLZEFF_AM_TOKEN_TIFF 
WLZEFF_AM_TOKEN_TRANSFORM 

◆ _WlzEffAmDim

Dimension of the data. Typedef: WlzEffAmDim.

Enumerator
WLZEFF_AM_DIM_NONE 

Dimension unknown.

WLZEFF_AM_DIM_2 

2D.

WLZEFF_AM_DIM_3 

3D.

◆ _WlzEffAmEndian

Big or little endian binary data. The values endian enum must be kept distinct from the dimension enum values (apart from none). Typedef: WlzEffAmFormat.

Enumerator
WLZEFF_AM_ENDIAN_NONE 

Unknown endianness.

WLZEFF_AM_ENDIAN_BIG 

Big endian.

WLZEFF_AM_ENDIAN_LITTLE 

Little endian.

◆ _WlzEffAmFormat

ASCII or binary data. Typedef: WlzEffAmFormat.

Enumerator
WLZEFF_AM_FMT_NONE 

Unknown data format.

WLZEFF_AM_FMT_BINARY 

Header ascii, Binary data.

WLZEFF_AM_FMT_ASCII 

Ascii header and data.

◆ _WlzEffAmDatType

Type of data: byte, ... Typedef: WlzEffAmDatType.

Enumerator
WLZEFF_AM_DATTYPE_NONE 

Unknown data type.

WLZEFF_AM_DATTYPE_BYTE 

Byte (8 bit) data.

WLZEFF_AM_DATTYPE_SHORT 

Short (16 bit) data.

◆ _WlzEffAmCoordType

Type of coordinate system. Typedef: WlzEffAmCoordType.

Enumerator
WLZEFF_AM_COORDTYPE_NONE 

Unknown coordinate type.

WLZEFF_AM_COORDTYPE_UNITFORM 

Uniform coordinates.

◆ _WlzEffAmLatComp

Type of compression used. Typedef: WlzEffAmLatComp.

Enumerator
WLZEFF_AM_LATCOMP_NONE 

No compression.

WLZEFF_AM_LATCOMP_HXBYTERLE 

Run length encoded bytes.

◆ _WlzEffAmLatType

Type of lattice: uniform, ... Typedef: WlzEffAmLatType.

Enumerator
WLZEFF_AM_LATTYPE_NONE 

Unknown lattice type.

WLZEFF_AM_LATTYPE_DATA 

Voxel lattice data.

WLZEFF_AM_LATTYPE_LABELS 

Domain lattice data.

◆ _WlzEffAnlDataType

Valid Analyze data type values. Typedef: WlzEffAnlDataType.

Valid Analyze data type values. Typedef: WlzEffAnlOrient.

Enumerator
WLZEFF_ANL_DT_NONE 
WLZEFF_ANL_DT_UNKOWN 
WLZEFF_ANL_DT_BINARY 
WLZEFF_ANL_DT_UNSIGNED_CHAR 
WLZEFF_ANL_DT_SIGNED_SHORT 
WLZEFF_ANL_DT_SIGNED_INT 
WLZEFF_ANL_DT_FLOAT 
WLZEFF_ANL_DT_COMPLEX 
WLZEFF_ANL_DT_DOUBLE 
WLZEFF_ANL_DT_RGB 
WLZEFF_ANL_DT_ALL 

Function Documentation

◆ WlzEffStringExtToFormat()

◆ WlzEffStringToFormat()

◆ WlzEffStringFromFormat()

const char* WlzEffStringFromFormat ( WlzEffFormat  fileFmt,
const char **  dstExtStr 
)

◆ WlzEffStringFormatFromFileName()

WlzEffFormat WlzEffStringFormatFromFileName ( const char *  fNameStr)

Returns a the file format implied by the file extension used in the given file name. If no match is found WlzEffFormat::WLZEFF_FORMAT_NONE is returned.

Returns
File format.
Parameters
fNameStrGiven file name.

References WLZEFF_FORMAT_NONE, and WlzEffStringExtToFormat().

◆ WlzEffReadObj()

WlzObject* WlzEffReadObj ( FILE *  fP,
const char *  fName,
WlzEffFormat  fFmt,
int  split,
int  sTrans,
int  gTrans,
WlzErrorNum dstErr 
)

Reads a woolz object from the the given file names(s) or opened file, where the file format is that given as a parameter. The ANL, ICS, PNM (and a few other multi file formats) require a file name, for all other formats either the file name or a file pointer may be given.

Returns
Woolz object read from file, or NULL on error.
Parameters
fPInput file.
fNameFile name (and path).
fFmtFile format.
splitIf non zero and the file contains a index labeled image then the image is split into seperate domains.
sTransIf non zero and the file contains a spatial transform then the image is transformed otherwise a WLZ_TRANS_OBJ may be returned.
gTransIf non zero and the file contains a grey transform then the image is transformed.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZEFF_FORMAT_AM, WLZEFF_FORMAT_ANL, WLZEFF_FORMAT_BMP, WLZEFF_FORMAT_DEN, WLZEFF_FORMAT_EMT, WLZEFF_FORMAT_GIF, WLZEFF_FORMAT_ICS, WLZEFF_FORMAT_IPL, WLZEFF_FORMAT_JPEG, WLZEFF_FORMAT_JSON, WLZEFF_FORMAT_MESH, WLZEFF_FORMAT_NIFTI, WLZEFF_FORMAT_NODEELE, WLZEFF_FORMAT_NRRD, WLZEFF_FORMAT_OBJ, WLZEFF_FORMAT_PIC, WLZEFF_FORMAT_PLY2, WLZEFF_FORMAT_PNM, WLZEFF_FORMAT_PVL, WLZEFF_FORMAT_SLC, WLZEFF_FORMAT_SMESH, WLZEFF_FORMAT_STL, WLZEFF_FORMAT_TIFF, WLZEFF_FORMAT_VFF, WLZEFF_FORMAT_VMESH, WLZEFF_FORMAT_VTK, WLZEFF_FORMAT_WLZ, WlzEffReadObjAm(), WlzEffReadObjAnl(), WlzEffReadObjBmp(), WlzEffReadObjDen(), WlzEffReadObjEMT(), WlzEffReadObjGif(), WlzEffReadObjIcs(), WlzEffReadObjIPL(), WlzEffReadObjJpeg(), WlzEffReadObjJsn(), WlzEffReadObjMesh(), WlzEffReadObjNifti(), WlzEffReadObjNodeEle(), WlzEffReadObjNrrd(), WlzEffReadObjObj(), WlzEffReadObjPic(), WlzEffReadObjPly2(), WlzEffReadObjPnm(), WlzEffReadObjPvl(), WlzEffReadObjSlc(), WlzEffReadObjSMesh(), WlzEffReadObjStl(), WlzEffReadObjTiff(), WlzEffReadObjVff(), WlzEffReadObjVMesh(), WlzEffReadObjVtk(), and WlzReadObj().

◆ WlzEffWriteObj()

WlzErrorNum WlzEffWriteObj ( FILE *  fP,
const char *  fName,
WlzObject obj,
WlzEffFormat  fFmt 
)

◆ WlzEffNumberOfFormats()

int WlzEffNumberOfFormats ( void  )

Retuns the number of file formats, ie WLZEFF_FORMAT_COUNT - 1.

Returns
Number of file formats.

References WLZEFF_FORMAT_COUNT.

◆ WlzEffFormatTable()

char* WlzEffFormatTable ( unsigned  indWth,
unsigned  desWth,
unsigned  extWth,
WlzErrorNum dstErr 
)

Creates an ascii table of the valid formats supported by WlzExtFF. This may be useful for giving usage information in binaries.

Returns
Ascii table of valid file formats.
Parameters
indWthIndent width (no default).
desWthMaximum description width (if 0 a default field width is used).
extWthMaximum extension width (if 0 a default field width is used).
dstErrDestination error pointer, may be NULL.

References AlcFree(), AlcMalloc(), WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZEFF_FORMAT_COUNT, and WlzEffStringFromFormat().

◆ WlzEffReadObjAm()

WlzObject* WlzEffReadObjAm ( FILE *  fP,
int  split,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file using the Amira lattice (.am file) format.

Returns
New Woolz object read from file.
Parameters
fPInput file pointer.
splitSplit label lattice files into a compound object of domains if non zero.
dstErrDestination pointer for error number, may be NULL.

References WLZ_ERR_NONE.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjAm()

WlzErrorNum WlzEffWriteObjAm ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file using the Amira lattice (.am file) format.

Returns
Woolz error code.
Parameters
fPOutput file pointer
objObject to be written.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_UNIMPLEMENTED.

Referenced by WlzEffWriteObj().

◆ WlzEffAnlFileNames()

WlzErrorNum WlzEffAnlFileNames ( char **  fileBody,
char **  hdrFileName,
char **  imgFileName,
const char *  gvnFileName 
)

Builds the ANALYZE file names from the given file name. These strings should be free'd using AlcFree() when no longer required.

Returns
Woolz error code.
Parameters
fileBodyDest ptr for the file body.
hdrFileNameDest ptr for the '.hdr' file name.
imgFileNameDest ptr for the '.img' file name.
gvnFileNameGiven file name with '.hdr', '.img' or no extension.

References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

Referenced by WlzEffReadObjAnl(), and WlzEffWriteObjAnl().

◆ WlzEffReadObjAnl()

WlzObject* WlzEffReadObjAnl ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the ANALYZE 7.5 format. The given file name is used to generate the '.hdr' and '.img' filenames.

Returns
New Woolz object or NULL on error.
Parameters
gvnFileNameGiven file name.
dstErrDestination error code, may be NULL.

References _WlzVertex::i3, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_GREY_ERROR, and WlzEffAnlFileNames().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjAnl()

WlzErrorNum WlzEffWriteObjAnl ( const char *  gvnFileName,
WlzObject obj 
)

Writes the given Woolz object to the given file(s) using the ANALYZE 7.5 file format. The given file name is used to generate the '.hdr' and '.img' filenames.

Returns
Woolz error code.
Parameters
gvnFileNameGiven file name with .hdr, .img or no extension.
objGiven woolz object.

References _WlzEffAnlImageDim::bitPix, _WlzValues::core, _WlzDomain::core, _WlzEffAnlImageDim::dataType, _WlzGreyP::dbp, _WlzEffAnlDataHistory::descrip, _WlzEffAnlImageDim::dim, _WlzEffAnlDsr::dim, _WlzObject::domain, _WlzEffAnlHeaderKey::extents, _WlzGreyP::flp, _WlzEffAnlDataHistory::generated, _WlzEffAnlImageDim::glMax, _WlzEffAnlImageDim::glMin, _WlzEffAnlHeaderKey::hdrSz, _WlzEffAnlDsr::hist, _WlzEffAnlDsr::hk, _WlzDomain::i, _WlzVertex::i2, _WlzVertex::i3, _WlzGreyP::inp, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzEffAnlDataHistory::originator, _WlzDomain::p, _WlzEffAnlImageDim::pixdim, _WlzPlaneDomain::plane1, _WlzEffAnlHeaderKey::regular, _WlzGreyP::shp, _WlzObject::type, _WlzGreyP::ubp, _WlzGreyP::v, _WlzObject::values, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_ERR_VALUES_NULL, WLZ_ERR_WRITE_EOF, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZEFF_ANL_DT_DOUBLE, WLZEFF_ANL_DT_FLOAT, WLZEFF_ANL_DT_SIGNED_INT, WLZEFF_ANL_DT_SIGNED_SHORT, WLZEFF_ANL_DT_UNSIGNED_CHAR, WlzEffAnlFileNames(), WlzGreyStats(), WlzToArray2D(), and WlzToArray3D().

Referenced by WlzEffWriteObj().

◆ WlzEffBibRead3DView()

WlzThreeDViewStruct* WlzEffBibRead3DView ( FILE *  fP,
char **  dstMsg,
WlzErrorNum dstErr 
)

Reads a 3D view from the given file pointer.

Returns
New view.
Parameters
fPGiven file pointer.
dstMsgDestination pointer for bibfile parsing error message strings, may be NULL.
dstErrDestination error pointer, may be NULL.

References BIBFILE_ER_NONE, BibFileRecordFree(), BibFileRecordRead(), BibFileRecord::name, WLZ_3D_VIEW_STRUCT, WLZ_ERR_NONE, WLZ_ERR_READ_INCOMPLETE, WlzEffBibParse3DSectionViewParamsRecord(), and WlzMake3DViewStruct().

◆ WlzEffBibWrite3DSectionViewParamsRecord()

WlzErrorNum WlzEffBibWrite3DSectionViewParamsRecord ( FILE *  fp,
char *  recordName,
WlzThreeDViewStruct wlzViewStr 
)

◆ WlzEffBibParse3DSectionViewParamsRecord()

WlzErrorNum WlzEffBibParse3DSectionViewParamsRecord ( BibFileRecord bibfileRecord,
WlzThreeDViewStruct wlzViewStr 
)

◆ WlzEffBibWriteWarpTransformParamsRecord()

WlzErrorNum WlzEffBibWriteWarpTransformParamsRecord ( FILE *  fp,
char *  recordName,
WlzFnType  basisFnType,
WlzTransformType  affineType,
WlzMeshGenMethod  meshMthd,
int  meshMinDst,
int  meshMaxDst 
)

Write the details of a warp transformation parameters. Note this does not write the warp transformation itself.

Returns
woolz error number
Parameters
fpFILE pointer opened for writing
recordNamerecord name
basisFnTypeinterpolation or basis function type
affineTypeAffine transform type (rigid-body, full affine etc.)
meshMthdmethod used to define the mesh
meshMinDstmesh minimum distance
meshMaxDstmesh maximum distance
Source:
WlzExtFFBibUtils.c

References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), WLZ_ERR_NONE, WLZ_ERR_WRITE_INCOMPLETE, WLZ_FN_BASIS_2DCONF_POLY, WLZ_FN_BASIS_2DGAUSS, WLZ_FN_BASIS_2DMQ, WLZ_FN_BASIS_2DPOLY, WLZ_FN_BASIS_2DTPS, WLZ_MESH_GENMETHOD_BLOCK, WLZ_MESH_GENMETHOD_GRADIENT, WLZ_TRANSFORM_2D_AFFINE, WLZ_TRANSFORM_2D_NOSHEAR, and WLZ_TRANSFORM_2D_REG.

◆ WlzEffBibParseWarpTransformParamsRecord()

WlzErrorNum WlzEffBibParseWarpTransformParamsRecord ( BibFileRecord bibfileRecord,
WlzFnType basisFnType,
WlzTransformType affineType,
WlzMeshGenMethod meshMthd,
int *  meshMinDst,
int *  meshMaxDst 
)

Parse the bibfile record for the warp transformation parameter settings.

Returns
Woolz error number
Parameters
bibfileRecordbibfile record as read by libbibFile
basisFnTypereturn for basis function type
affineTypeAffine transform type (rigid-body, full affine etc.)
meshMthdreturn for mesh method type
meshMinDstreturn for mesh minimum distance
meshMaxDstreturn for mesh maximum distance
Source:
WlzExtFFBibUtils.c

References BibFileFieldParseFmt(), BibFileRecord::field, _BibFileField::name, _BibFileField::next, _BibFileField::value, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_FN_BASIS_2DCONF_POLY, WLZ_FN_BASIS_2DGAUSS, WLZ_FN_BASIS_2DMQ, WLZ_FN_BASIS_2DPOLY, WLZ_FN_BASIS_2DTPS, WLZ_MESH_GENMETHOD_BLOCK, WLZ_MESH_GENMETHOD_GRADIENT, WLZ_TRANSFORM_2D_AFFINE, WLZ_TRANSFORM_2D_NOSHEAR, and WLZ_TRANSFORM_2D_REG.

◆ WlzEffBibWriteTiePointVtxsRecord()

WlzErrorNum WlzEffBibWriteTiePointVtxsRecord ( FILE *  fp,
char *  recordName,
int  index,
WlzDVertex3  dstVtx,
WlzDVertex3  srcVtx,
int  relativeFlg 
)

Write a tie-point record in bibtex style.

Returns
Woolz error number
Parameters
fpFILE pointer opened for writing
recordNamerecord name
indexindex of the given tie points
dstVtxdestination vertex
srcVtxsource vertex
relativeFlgNon-zero for relative bib coordinates.
Source:
WlzExtFFBibUtils.c

References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, and WLZ_ERR_WRITE_INCOMPLETE.

◆ WlzEffBibParseTiePointVtxsRecord()

WlzErrorNum WlzEffBibParseTiePointVtxsRecord ( BibFileRecord bibfileRecord,
int *  index,
WlzDVertex3 dstVtx,
WlzDVertex3 srcVtx,
int *  relativeFlg 
)

Parse the bibfile record for a tie-point pair of vertices. The record should also include an index so that tie-point ordering is preserved.

Returns
Woolz error number
Parameters
bibfileRecordbibfile record as read in by libbibFile
indexreturn for tie-point pair index within list
dstVtxreturn for destination vertex
srcVtxreturn for source vertex
relativeFlgreturn for relative coordinates, non-zero if relative
Source:
WlzExtFFBibUtils.c

References BibFileFieldParseFmt(), BibFileRecord::field, _BibFileField::name, _BibFileField::next, _BibFileField::value, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_READ_INCOMPLETE.

◆ WlzEffBibWriteFileRecord()

WlzErrorNum WlzEffBibWriteFileRecord ( FILE *  fp,
char *  recordName,
char *  fileName,
WlzEffFormat  fileType 
)

Write a bibfile record to record the file name and file type.

Returns
woolz error number
Parameters
fpFILE pointer
recordNamerecord name
fileNamefile name to be recorded
fileTypefile type e.g. image format
Source:
WlzExtFFBibUtils.c

References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_WRITE_INCOMPLETE, and WlzEffStringFromFormat().

◆ WlzEffBibParseFileRecord()

WlzErrorNum WlzEffBibParseFileRecord ( BibFileRecord bibfileRecord,
int *  dstIndex,
char **  dstFileName,
WlzEffFormat dstFileType 
)

Parse a bibfile record for a filename and type.

Returns
woolz error
Parameters
bibfileRecordbibfile record as read in by libbibFile
dstIndexDestination pointer for integer parsed from the record ID, may be NULL.
dstFileNameDestination pointer for file name, may be NULL.
dstFileTypeDestination pointer for the file type, may be NULL.
Source:
WlzExtFFBibUtils.c

References AlcStrDup(), BibFileFieldParseFmt(), BibFileRecord::field, BibFileRecord::id, _BibFileField::name, _BibFileField::next, _BibFileField::value, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, and WlzEffStringToFormat().

◆ WlzEffBibWriteWarpInputSegmentationParamsRecord()

WlzErrorNum WlzEffBibWriteWarpInputSegmentationParamsRecord ( FILE *  fp,
char *  recordName,
int  normFlg,
int  histoFlg,
int  shadeFlg,
int  gaussFlg,
double  width 
)

Write a warp segmentation parameter record i.e. the image processing operations and paramters for extracting the gene-expression domain.

Returns
woolz error
Parameters
fpFILE pointer opened for writing
recordNamebibfile record name
normFlgnormalisation flag
histoFlghistogram equalise flag
shadeFlgshade correct flag
gaussFlggauss smoothing flag
widthgauss smoothing width parameter
Source:
WlzExtFFBibUtils.c

References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), WLZ_ERR_NONE, and WLZ_ERR_WRITE_INCOMPLETE.

◆ WlzEffBibParseWarpInputSegmentationParamsRecord()

WlzErrorNum WlzEffBibParseWarpInputSegmentationParamsRecord ( BibFileRecord bibfileRecord,
int *  normFlg,
int *  histoFlg,
int *  shadeFlg,
int *  gaussFlg,
double *  width,
int *  threshLow,
int *  threshHigh 
)

Parse the bibfile record for a MAPaint WarpInputSegmentationParams record.

Returns
woolz error
Parameters
bibfileRecordbibfile record as read by libbibFile
normFlgnormalisation flag
histoFlghistogram equalise flag
shadeFlgshade correct flag
gaussFlggauss smoothing flag
widthgauss smoothing width
threshLowlow threshold value
threshHighhigh threshold value
Source:
WlzExtFFBibUtils.c

References BibFileFieldParseFmt(), BibFileRecord::field, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_READ_INCOMPLETE.

◆ WlzEffReadObjBmp()

WlzObject* WlzEffReadObjBmp ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file(s) using the '.pnm' file format.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
dstErrDst error pointer, may be NULL.

References WLZ_ERR_NONE, WLZEFF_FORMAT_BMP, and WlzEffReadObjStack().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjBmp()

WlzErrorNum WlzEffWriteObjBmp ( const char *  gvnFileName,
WlzObject obj 
)

Writes the given Woolz object to the given file(s) using the '.pnm' file format.

Returns
Woolz error number.
Parameters
gvnFileNameGiven file name.
objGiven woolz object.

References WLZ_ERR_NONE, WLZEFF_FORMAT_BMP, and WlzEffWriteObjStack().

Referenced by WlzEffWriteObj().

◆ WlzEffWriteObjBmp2D()

WlzErrorNum WlzEffWriteObjBmp2D ( const char *  fNameStr,
WlzObject obj,
WlzIVertex2  imgSz,
WlzIVertex2  imgOrg,
unsigned char *  data,
unsigned char  bgd 
)

Writes the given 2D Woolz object to the given file using the '.pnm' file format.

Returns
Woolz error number.
Parameters
fNameStrGiven file name.
objGiven woolz object.
imgSzRequired image size.
imgOrgRequired image origin.
dataBuffer of imgSz bytes.
bgdBackground value.

References AlcFree(), _WlzValues::core, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzValues::r, _WlzObject::type, _WlzObject::values, _WlzRectValues::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_READ_EOF, WLZ_ERR_WRITE_EOF, WLZ_GREY_UBYTE, WlzCutObjToValBox2D(), WlzFreeObj(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.

◆ WlzEffReadObjBmpData2D()

WlzErrorNum WlzEffReadObjBmpData2D ( FILE *  fP,
WlzIVertex2 gvnImgSz,
unsigned char ***  data 
)

Reads the data from a pgm file into the data array given.

Returns
Woolz error number.
Parameters
fPGiven file stream.
gvnImgSzDst ptr for image size which is assumed valid if height and width are non zero.
dataPtr to 2D array for data.

References _WlzEffBmpFileHead::bfOffBits, _WlzEffBmpFileHead::bfReserved1, _WlzEffBmpFileHead::bfReserved2, _WlzEffBmpFileHead::bfSize, _WlzEffBmpFileHead::bfType, WLZ_ERR_NONE, WLZ_ERR_READ_INCOMPLETE, WLZEFF_BMP_MAGIC_0, and WLZEFF_BMP_MAGIC_1.

◆ WlzEffReadObjDen()

◆ WlzEffWriteObjDen()

◆ WlzEffReadObjEMT()

WlzObject* WlzEffReadObjEMT ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjEMT()

◆ WlzEffReadObjGif()

WlzObject* WlzEffReadObjGif ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the file pointer using the '.gif' file format. This function currently has the following limitations:

Returns
Object read from file.
  • the aspect ratio of the pixels. is ignored.
  • only the first frame of an animated GIF is read.
  • transparency is ignored.
Parameters
fPFile pointer.
dstErrDestination error pointer, may be NULL.

References _WlzEffGifScreen::AspectRatio, _WlzEffGifScreen::Background, _WlzEffGifScreen::BitPixel, BitSet, _WlzEffGifScreen::ColorResolution, _WlzEffGifScreen::Height, LM_to_uint, _WlzIVertex2::vtX, _WlzIVertex2::vtY, _WlzEffGifScreen::Width, WLZ_ERR_NONE, WLZ_ERR_READ_INCOMPLETE, WLZEFF_GIF_BUFSZ, WLZEFF_GIF_LOCALCMAP, and WLZEFF_GIF_MAXCMAPSZ.

Referenced by WlzEffReadObj().

◆ WlzEffIcsFileNames()

WlzErrorNum WlzEffIcsFileNames ( char **  fileBody,
char **  icsFileName,
char **  idsFileName,
const char *  gvnFileName 
)

Builds the ics file names from the given file name. These strings should be free'd using AlcFree() when no longer required.

Returns
Woolz error number.
Parameters
fileBodyDest ptr for the file body.
icsFileNameDest ptr for the '.ics' file name.
idsFileNameDest ptr for the '.ids' file name.
gvnFileNameGiven file name with .ics, .ids or no extension.

References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

Referenced by WlzEffReadObjIcs(), and WlzEffWriteObjIcs().

◆ WlzEffReadObjIcs()

WlzObject* WlzEffReadObjIcs ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from a pair of files using the ICS format. The given file name is used to generate the '.ics' and '.ids' filenames.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
dstErrDestination error number ptr, may be NULL.

References Alc3Free(), ALC_ER_NONE, AlcFree(), AlcInt3Malloc(), AlcShort3Malloc(), AlcUnchar3Malloc(), _WlzEffIcsHeader::coords, _WlzObject::domain, _WlzEffIcsHeader::format, _WlzEffIcsHeader::order, _WlzDomain::p, _WlzEffIcsHeader::parameters, _WlzEffIcsHeader::scil, _WlzEffIcsHeader::sigBits, _WlzEffIcsHeader::sign, _WlzEffIcsHeader::sizes, _WlzEffIcsHeader::versionMajor, _WlzEffIcsHeader::versionMinor, _WlzPlaneDomain::voxel_size, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_ERR_READ_INCOMPLETE, WLZ_GREY_ERROR, WLZ_GREY_INT, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZEFF_ICS_PARAMETERS_MAX, WLZEFF_ICS_REC_LEN_MAX, WLZEFF_ICS_TKN_BITS, WLZEFF_ICS_TKN_COORDS, WLZEFF_ICS_TKN_FILENAME, WLZEFF_ICS_TKN_FLOAT, WLZEFF_ICS_TKN_FORMAT, WLZEFF_ICS_TKN_G3D, WLZEFF_ICS_TKN_INT, WLZEFF_ICS_TKN_L3D, WLZEFF_ICS_TKN_LAYOUT, WLZEFF_ICS_TKN_NONE, WLZEFF_ICS_TKN_ORDER, WLZEFF_ICS_TKN_PARAMETERS, WLZEFF_ICS_TKN_REPRESENTATION, WLZEFF_ICS_TKN_SCIL, WLZEFF_ICS_TKN_SIGBITS, WLZEFF_ICS_TKN_SIGN, WLZEFF_ICS_TKN_SIGNED, WLZEFF_ICS_TKN_SIZES, WLZEFF_ICS_TKN_UNSIGNED, WLZEFF_ICS_TKN_VERSION, WLZEFF_ICS_TKN_VIDEO, WLZEFF_ICS_TKN_X, WLZEFF_ICS_TKN_Y, WLZEFF_ICS_TKN_Z, WLZEFF_ICS_VERSION_MAJOR, WLZEFF_ICS_VERSION_MINOR, WlzEffIcsFileNames(), WlzFromArray3D(), and WlzStringMatchValue().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjIcs()

◆ WlzEffReadObjIPL()

WlzObject* WlzEffReadObjIPL ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the '.ipl' file format.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_PARAM_NULL, and WLZ_ERR_READ_INCOMPLETE.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjIPL()

◆ WlzEffHeadWriteIPL()

static WlzErrorNum WlzEffHeadWriteIPL ( WlzEffIPLHeader header,
FILE *  fP 
)

Writes an IPL header to the given file stream.

Returns
Woolz error code.
Todo:
Just a stub, still to be written.
Parameters
headerGiven header data structure to be written.
fPGiven output file stream.

References WLZ_ERR_UNIMPLEMENTED.

Referenced by WlzEffWriteObjIPL().

◆ WlzEffReadObjJpeg()

◆ WlzEffWriteObjJpeg()

◆ WlzEffReadObjJsn()

WlzObject* WlzEffReadObjJsn ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file where the Woolz object is encoded using JSON.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error pointer, may be NULL.

References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjJsn()

WlzErrorNum WlzEffWriteObjJsn ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file where the Woolz object is encoded using JSON.

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzDomain::core, _WlzObject::domain, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_NULL, and WLZ_ERR_WRITE_INCOMPLETE.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjMesh()

WlzObject* WlzEffReadObjMesh ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using Pascal Frey's tetrahedral mesh file format. The file must start with the records:

Returns
Object read from file.
MeshVersionFormatted 1
Dimension 3

Following this a number of keywords followed by a cardinality and then that number of further data fields follow:

Vertices                       np     xi yi zi ri    {i in 1-np}
Edges                          ne     e1i e2i ri     {i in 1-ne}
Triangles                      nt     vij ri         {i in 1-nt},{j in 1-3}
Quadrilaterals                 nq     vij ri         {i in 1-nq},{j in 1-4}
Tetrahedra                     ntet   vij ri         {i in 1-ntet},{j in 1-4}
Hexaedra                       nh     vij ri         {i in 1-nh},{j in 1-8}
Corners                        nc     vi             {i in 1-nc}
RequiredVertices               nrv    vi             {i in 1-nrv}
Ridges                         nr     ei             {i in 1-nr}
RequiredEdges                  nre    vi             {i in 1-nre}
Normals                        nn     xi yi zi       {i in 1-nn}
Tangents                       nnt    xi yi zi       {i in 1-nnt}
NormalAtVertices               nv     vi ni          {i in 1-nv}
NormalAtTriangleVertices       ntv    ti vj ni       {i in 1-ntv}
NormalAtQuadrilateralVertices  nqv    qi vj ni       {i in 1-nqv}
TangentAtEdges                 te     ei vj ni       {i in 1-te}

At any point outside of a data field a comment character ('#') indicates that the rest of the line is to be ignored. The file terminates with the keyword: End.

Only tetrahedral meshes can be read by this function and all fields except for the start, Vertices and Tetrahedra fields are ignored.

The resulting object will be of type WLZ_CMESH_3D.

Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjMesh()

◆ WlzEffReadObjNifti()

WlzObject* WlzEffReadObjNifti ( const char *  gvnFileName,
int  sTrans,
int  gTrans,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the NIfTI format. In some cases (for example when the NIfTI object has complex values) a compound object may be returned. A text property is created for the returned object, containing various fields of the NIfTI header, some of which may not be used in the conversion. The qform transform/quaternion, mapping the image to it's source (scanner) coordinates is copied text property but no transform is either created of applied for it. The sform transform/quaternion is always applied if the parameter flag is set, otherwise it ionly is applied if it is a pure translation. If the sform transform is not applied then it will (if not an identity transform) be used to create a trans-obj. If affine transforms are applied then WLZ_INTERPOLATION_NEAREST is used. NIfTI allows the linear transformation of grey values. This will only be applied if the parameter flag is set. The grey scaling will result in floating point image grey values.

Returns
New Woolz object or NULL on error.
Parameters
gvnFileNameGiven file name.
sTransIf non-zero the NIfTI spatial transform is used to build a WLZ_TRANS_OBJ, otherwise any shift is applied but the remaining transform components are ignored.
gTransApply the NIfTI grey scaling if non-zero.
dstErrDestination error code, may be NULL.

References WLZ_ERR_UNIMPLEMENTED.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjNifti()

WlzErrorNum WlzEffWriteObjNifti ( const char *  gvnFileName,
WlzObject obj 
)

Writes the given Woolz object to the given file(s) using the NIfTI file format.

Returns
Woolz error code.
Parameters
gvnFileNameGiven file name with .hdr, .img or no extension.
objGiven woolz object.

References WLZ_ERR_UNIMPLEMENTED.

Referenced by WlzEffWriteObj().

◆ WlzEffNodeEleFileNames()

WlzErrorNum WlzEffNodeEleFileNames ( char **  fileBody,
char **  nodeFileName,
char **  eleFileName,
const char *  gvnFileName 
)

Builds the node/ele file names from the given file name. These strings should be free'd using AlcFree() when no longer required.

Returns
Woolz error number.
Parameters
fileBodyDest ptr for the file body.
nodeFileNameDest ptr for the '.node' file name.
eleFileNameDest ptr for the '.ele' file name.
gvnFileNameGiven file name with .node or no extension.

References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

Referenced by WlzEffReadObjNodeEle(), and WlzEffWriteObjNodeEle().

◆ WlzEffReadObjNodeEle()

WlzObject* WlzEffReadObjNodeEle ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from a pair of files using the node/ele format. The given file name is used to generate the '.node' and '.ele' filenames.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
dstErrDestination error number ptr, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzVertexP::v, _WlzCMeshP::v, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, and WlzEffNodeEleFileNames().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjNodeEle()

◆ WlzEffReadObjNrrd()

WlzObject* WlzEffReadObjNrrd ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the NRRD file format. Not all NRRD files and not all encodings have been implemented. This function will currently only read pixel/voxel data, where this data is either raw or encoded using bzip2 or gzip compression. Use of these compression methods depends on their availability at compile time. If the input NRRD pixel/voxel type is either signed char or unsigned short then it is promoted to either signed short or signed int in the output Woolz object. Unused NRRD header fields are encoded as a text property of the output object.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjNrrd()

WlzErrorNum WlzEffWriteObjNrrd ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given stream using the NRRD file format. This function will currently only write 2 or 3D domain objects. If the object has no values then unsigned byte values are written with background = 0 and forground = 255. If gzip compression is available at compile time the output file uses gzip compression, otherwise raw data are output.

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjObj()

WlzObject* WlzEffReadObjObj ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the Wavefront OBJ file format. This format consists of the following possible fields (one per line): Vertex data -v vertex geometry -vt ignored -vn vertex normal -vp ignored -cstype ignored -deg ignored -bmat ignored -step ignored Elements -p ignored -l ignored -f face -curv ignored -curv2 ignored -surf ignored Freeform elements -param ignored -trim ignored -hole ignored -scrv ignored -sp ignored -end ignored Freeform surface connectivity -con ignored Grouping -g ignored -o ignored -s ignored -mg ignored Rendering attributes -bevel ignored -c_interp ignored -d_interp ignored -lod ignored -usemtl ignored -mtllib ignored -shadow_obj ignored -trace_obj ignored -ctech ignored -stech ignored Comments

  1. ignored Only triangulated surface models can be read. All groupings will be amalgamated into one.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References AlcVectorNew(), _WlzValues::core, _WlzDomain::core, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjObj()

WlzErrorNum WlzEffWriteObjObj ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file stream using the Wavefront OBJ file format, see WlzEffReadObjObj().

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjPic()

◆ WlzEffWriteObjPic()

◆ WlzEffReadObjPly2()

WlzObject* WlzEffReadObjPly2 ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the Riken PLY2 triangular mesh file format. This format simply consists of:

Returns
Object read from file.
              <n vertices (int)>
              <n triangles (int)>
              <vertex (double double double)>
              ...
              <triangle (int int int)>
              ...
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjPly2()

WlzErrorNum WlzEffWriteObjPly2 ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file stream using the Riken PLY2 triangular mesh file format, see WlzEffReadObjPly2().

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjPnm()

WlzObject* WlzEffReadObjPnm ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file(s) using the '.pnm' file format.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, WLZEFF_FORMAT_PNM, and WlzEffReadObjStack().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjPnm()

WlzErrorNum WlzEffWriteObjPnm ( const char *  gvnFileName,
WlzObject obj 
)

Writes the given Woolz object to the given file(s) using the '.pnm' file format.

Returns
Woolz error number.
Parameters
gvnFileNameGiven file name.
objDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, WLZEFF_FORMAT_PNM, and WlzEffWriteObjStack().

Referenced by WlzEffWriteObj().

◆ WlzEffWriteObjPnm2D()

WlzErrorNum WlzEffWriteObjPnm2D ( const char *  fNameStr,
WlzObject obj,
WlzIVertex2  imgSz,
WlzIVertex2  imgOrg,
unsigned char *  data,
unsigned char  bgd 
)

Writes the given 2D Woolz object to the given file using the '.pnm' file format.

Returns
Woolz error number.
Parameters
fNameStrGiven file name.
objGiven woolz object.
imgSzRequired image size.
imgOrgRequired image origin.
dataBuffer of imgSz bytes.
bgdBackground value.

References AlcFree(), _WlzValues::core, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzValues::r, _WlzObject::type, _WlzObject::values, _WlzRectValues::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_READ_EOF, WLZ_ERR_WRITE_EOF, WLZ_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WlzCutObjToValBox2D(), WLZEFF_PGM_MAGIC, WlzFreeObj(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.

◆ WlzEffReadObjPnmData2D()

WlzErrorNum WlzEffReadObjPnmData2D ( FILE *  fP,
WlzIVertex2 gvnImgSz,
unsigned char ***  data 
)

Reads the data from a pgm file into the data array given.

Returns
Woolz error number.
Parameters
fPGiven file stream.
gvnImgSzDst ptr for image size which is assumed valid if height and width are non zero.
dataPtr to 2D array for data.

References ALC_ER_NONE, AlcUnchar2Malloc(), _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_READ_INCOMPLETE, and WLZEFF_PGM_MAGIC.

◆ WlzEffReadObjPvl()

WlzObject* WlzEffReadObjPvl ( const char *  gvnFileName,
WlzErrorNum dstErr 
)

Reads a Woolz object from Drishti pvl.nc files.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_UNIMPLEMENTED.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjPvl()

WlzErrorNum WlzEffWriteObjPvl ( const char *  gvnFileName,
WlzObject obj 
)

Writes the given Woolz object to a pair of files using the Derishti .pvl.nc file format.

Returns
Woolz error number.
Parameters
gvnFileNameGiven file name with .ics, .ids or no extension.
objGiven woolz object.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_PLANEDOMAIN_DOMAIN, and WLZ_VOXELVALUETABLE_GREY.

Referenced by WlzEffWriteObj().

◆ WlzExtFFReadObjRaw()

WlzObject* WlzExtFFReadObjRaw ( FILE *  fp,
int  numKols,
int  numLines,
int  numPlanes,
int  bytesPerPixel,
int  bitsPerChannel,
int  numChannels,
int  byteOrder,
WlzErrorNum dstErr 
)

Reads a raw 'brick of bytes' object into a Woolz object.

Returns
Woolz error code.
Parameters
fpGiven file stream.
numKolsNumber of columns, x size.
numLinesNumber of lines, y size.
numPlanesNumber of planes, z size.
bytesPerPixelNumber of bytes per pixel.
bitsPerChannelNumber of bits per channel.
numChannelsNumber of channels.
byteOrderByte order.
dstErrDestination pointer for error code, may be NULL.

References AlcFree(), AlcMalloc(), WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_READ_INCOMPLETE, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, and WLZ_GREY_UBYTE.

◆ WlzEffReadObjSlc()

WlzObject* WlzEffReadObjSlc ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the '.slc' file format.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzEffSlcHeader::icon, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_PARAM_NULL, and WLZ_ERR_READ_INCOMPLETE.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjSlc()

◆ WlzEffReadObjSMesh()

WlzObject* WlzEffReadObjSMesh ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the GRUMMP smesh file format. This format is:

Returns
Object read from file.
  # comment for rest of record
  <n nodes> <dim (always 3)> <n attrib> <n boundary markers>
  <node idx> <x> <y> <z> [<attributes>] [<boundary mark>]
  ...
  <n facets> <n boundary markers>
  <n nodes> <node idx> <node idx> <node idx> <facet idx> [<boundary mark>]
  ...
  <n holes>
  <hole idx> <x> <y> <z>
  ...
  <n region>
  <region idx> <x> <y> <z> <region n> <region attributes>
  ...
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjSMesh()

WlzErrorNum WlzEffWriteObjSMesh ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file stream using the GRUMMP smesh file format, see WlzEffReadObjSMesh().

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjStack()

WlzObject* WlzEffReadObjStack ( const char *  gvnFileName,
WlzEffFormat  fFmt,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file(s) using the given (2D) file format.

Returns
Object read from file.
Parameters
gvnFileNameGiven file name.
fFmtGiven file format (must be a 2D file format).
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObjBmp(), and WlzEffReadObjPnm().

◆ WlzEffWriteObjStack()

WlzErrorNum WlzEffWriteObjStack ( const char *  gvnFileName,
WlzEffFormat  fFmt,
WlzObject obj 
)

◆ WlzEffReadObjStl()

WlzObject* WlzEffReadObjStl ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the stereolithography stl surface file format. This format has surface definitions defined by a name and a collection of facet normals and loops. Each facet loop has the cooordinates of it's vertices. Only triangulated surface models can be read and all solids will be treated as one.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzGreyV::bytes, _WlzValues::core, _WlzDomain::core, _WlzGreyV::flv, _WlzGreyV::inv, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_GMMOD_3D, WlzGMModelConstructSimplex3D(), and WlzGMModelNew().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjStl()

WlzErrorNum WlzEffWriteObjStl ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given file stream using the stereolithography stl file format, see WlzEffReadObjStl().

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjTiff()

WlzObject* WlzEffReadObjTiff ( const char *  tiffFileName,
int  split,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given file using the TIFF format.

Returns
Object read from file.
Parameters
tiffFileNameGiven file name.
splitIf the image is tiled return individual tiles within a compound object.
dstErrDestination error number ptr, may be NULL.

References WLZ_2D_DOMAINOBJ, WLZ_COMPOUND_ARR_2, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, and WlzMakeCompoundArray().

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjTiff()

WlzErrorNum WlzEffWriteObjTiff ( const char *  tiffFileName,
WlzObject obj 
)

Writes the given Woolz object to the given file using the TIFF format.

Returns
Woolz error number.
Parameters
tiffFileNameGiven file name with .tif.
objGiven woolz object.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_FILE_OPEN, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_NULL, and WLZ_ERR_VALUES_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffReadObjVff()

WlzObject* WlzEffReadObjVff ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the Sunvision vff (rank 3) file format.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzEffVffHeader::aspect, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_GREY_ERROR, and WLZEFF_VFF_REC_LEN_MAX.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjVff()

◆ WlzEffReadObjVMesh()

WlzObject* WlzEffReadObjVMesh ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjVMesh()

◆ WlzEffReadObjVtk()

WlzObject* WlzEffReadObjVtk ( FILE *  fP,
WlzErrorNum dstErr 
)

Reads a Woolz object from the given stream using the Visualization Toolkit file format. There is no check on the major and minor version numbers since all files seem compatable.

Returns
Object read from file.
Parameters
fPInput file stream.
dstErrDestination error number ptr, may be NULL.

References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffReadObj().

◆ WlzEffWriteObjVtk()

WlzErrorNum WlzEffWriteObjVtk ( FILE *  fP,
WlzObject obj 
)

Writes the given Woolz object to the given stream using the Visualization Toolkit file format.

Returns
Woolz error number.
Parameters
fPOutput file stream.
objGiven woolz object.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.

Referenced by WlzEffWriteObj().

◆ WlzEffWritePointsVtk()

WlzErrorNum WlzEffWritePointsVtk ( FILE *  fP,
WlzObject obj,
int  onlyDom 
)

◆ WlzEffWritePointsVtkScalarValues()

◆ WlzEffWritePointsVtkFieldValues()

WlzErrorNum WlzEffWritePointsVtkFieldValues ( FILE *  fP,
WlzObject obj 
)

Writes the point field values of the given object to the given file. It is assumed that the points domain has already been written by WlzEffWritePointsVtk().

Returns
Woolz error number.
            The VTK file specification does not include an appropriate
            data type for arbitrary dimensional fields so here one is
            defined for point data:
      POINT_DATA <n>
      FIELD <field name> <data type> <rank> [<dim_0>,[...]]
with the following:
  • n - Number of points.
  • field name - Non-whitespace ASCII string naming the field.
  • rank - Rank of the field, 0 for scalar data, 1 for vector data, ....
  • dim0 - Comma seperated dimensions of the field.

Example for a rank two (3x3) tensor:

      POINT_DATA 2
      FIELD my_tensor float 2 3x3
      1.019 -0.002 0.079  0.003 1.055  0.012 0.002   0.0085 1.019
      1.012 -0.008 0.015 -0.023 1.013 -0.018 7.9e-05 0.0961 1.005
Parameters
fPOutput file stream.
objObject vith points values for output.

References AlcFree(), _WlzGreyP::dbp, _WlzPointValues::dim, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyP::inp, _WlzNameProperty::name, _WlzPoints::nPoints, _WlzObject::plist, _WlzValues::pts, _WlzDomain::pts, _WlzPointValues::rank, _WlzGreyP::shp, _WlzPoints::type, _WlzGreyP::ubp, _WlzObject::values, _WlzPointValues::values, _WlzPointValues::vType, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_VALUES_DATA, WLZ_ERR_WRITE_INCOMPLETE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WlzPropertyListContainsName(), and WlzStringCopyReplace().

Referenced by WlzEffWritePointsVtk().