Woolz Image Processing
Version 1.8.3
|
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... | |
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... | |
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. 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... | |
WlzObject * | WlzEffReadObjAm (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... | |
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. 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... | |
WlzThreeDViewStruct * | WlzEffBibRead3DView (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... | |
WlzObject * | WlzEffReadObjBmp (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... | |
WlzObject * | WlzEffReadObjDen (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... | |
WlzObject * | WlzEffReadObjEMT (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... | |
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: 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... | |
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. 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... | |
WlzObject * | WlzEffReadObjIPL (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... | |
WlzObject * | WlzEffReadObjJpeg (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... | |
WlzObject * | WlzEffReadObjJsn (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... | |
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: 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... | |
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. 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... | |
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. 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... | |
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. 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... | |
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
| |
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... | |
WlzObject * | WlzEffReadObjPic (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... | |
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: 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... | |
WlzObject * | WlzEffReadObjPnm (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... | |
WlzObject * | WlzEffReadObjPvl (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... | |
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. More... | |
WlzObject * | WlzEffReadObjSlc (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... | |
WlzObject * | WlzEffReadObjSMesh (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... | |
WlzObject * | WlzEffReadObjStack (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... | |
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. 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... | |
WlzObject * | WlzEffReadObjTiff (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... | |
WlzObject * | WlzEffReadObjVff (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... | |
WlzObject * | WlzEffReadObjVMesh (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... | |
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. 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... | |
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.
enum _WlzEffFormat |
enumeration of the file formats supported. Typedef: WlzEffFormat
enum _WlzEffAmToken |
Tokens for parsing the headers of Amira lattice files. Typedef: WlzEffAmToken.
enum _WlzEffAmDim |
Dimension of the data. Typedef: WlzEffAmDim.
Enumerator | |
---|---|
WLZEFF_AM_DIM_NONE | Dimension unknown. |
WLZEFF_AM_DIM_2 | 2D. |
WLZEFF_AM_DIM_3 | 3D. |
enum _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. |
enum _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. |
enum _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. |
enum _WlzEffAmCoordType |
Type of coordinate system. Typedef: WlzEffAmCoordType.
Enumerator | |
---|---|
WLZEFF_AM_COORDTYPE_NONE | Unknown coordinate type. |
WLZEFF_AM_COORDTYPE_UNITFORM | Uniform coordinates. |
enum _WlzEffAmLatComp |
Type of compression used. Typedef: WlzEffAmLatComp.
Enumerator | |
---|---|
WLZEFF_AM_LATCOMP_NONE | No compression. |
WLZEFF_AM_LATCOMP_HXBYTERLE | Run length encoded bytes. |
enum _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. |
enum _WlzEffAnlDataType |
Valid Analyze data type values. Typedef: WlzEffAnlDataType.
Valid Analyze data type values. Typedef: WlzEffAnlOrient.
WlzEffFormat WlzEffStringExtToFormat | ( | const char * | extStr | ) |
Returns a file format for the given file extension string.
extStr | Given file extension string. |
References 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_NONE, WLZEFF_FORMAT_NRRD, WLZEFF_FORMAT_OBJ, WLZEFF_FORMAT_PIC, WLZEFF_FORMAT_PLY2, WLZEFF_FORMAT_PNM, WLZEFF_FORMAT_PVL, WLZEFF_FORMAT_RAW, WLZEFF_FORMAT_SLC, WLZEFF_FORMAT_SMESH, WLZEFF_FORMAT_STL, WLZEFF_FORMAT_TIFF, WLZEFF_FORMAT_TXT, WLZEFF_FORMAT_VFF, WLZEFF_FORMAT_VMESH, WLZEFF_FORMAT_VTK, WLZEFF_FORMAT_WLZ, and WlzStringMatchValue().
Referenced by WlzEffStringFormatFromFileName().
WlzEffFormat WlzEffStringToFormat | ( | const char * | fmtStr | ) |
Returns a file format for the given file format string.
fmtStr | Given file format string. |
References 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_NONE, WLZEFF_FORMAT_NRRD, WLZEFF_FORMAT_OBJ, WLZEFF_FORMAT_PIC, WLZEFF_FORMAT_PLY2, WLZEFF_FORMAT_PNM, WLZEFF_FORMAT_PVL, WLZEFF_FORMAT_RAW, WLZEFF_FORMAT_SLC, WLZEFF_FORMAT_SMESH, WLZEFF_FORMAT_STL, WLZEFF_FORMAT_TIFF, WLZEFF_FORMAT_TXT, WLZEFF_FORMAT_VFF, WLZEFF_FORMAT_VMESH, WLZEFF_FORMAT_VTK, WLZEFF_FORMAT_WLZ, and WlzStringMatchValue().
Referenced by WlzEffBibParseFileRecord().
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.
fileFmt | Given file format. |
dstExtStr | Destination ptr for extension string. |
References 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_RAW, WLZEFF_FORMAT_SLC, WLZEFF_FORMAT_SMESH, WLZEFF_FORMAT_STL, WLZEFF_FORMAT_TIFF, WLZEFF_FORMAT_TXT, WLZEFF_FORMAT_VFF, WLZEFF_FORMAT_VMESH, WLZEFF_FORMAT_VTK, and WLZEFF_FORMAT_WLZ.
Referenced by WlzEffBibWriteFileRecord(), and WlzEffFormatTable().
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.
fNameStr | Given file name. |
References WLZEFF_FORMAT_NONE, and WlzEffStringExtToFormat().
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.
fP | Input file. |
fName | File name (and path). |
fFmt | File format. |
split | If non zero and the file contains a index labeled image then the image is split into seperate domains. |
sTrans | If non zero and the file contains a spatial transform then the image is transformed otherwise a WLZ_TRANS_OBJ may be returned. |
gTrans | If non zero and the file contains a grey transform then the image is transformed. |
dstErr | Destination 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().
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.
fP | Output file stream. |
fName | File name (and path). |
obj | Given Woolz object. |
fFmt | File format. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_ERR_UNIMPLEMENTED, WLZ_ERR_WRITE_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_TXT, WLZEFF_FORMAT_VFF, WLZEFF_FORMAT_VMESH, WLZEFF_FORMAT_VTK, WLZEFF_FORMAT_WLZ, WlzEffWriteObjAm(), WlzEffWriteObjAnl(), WlzEffWriteObjBmp(), WlzEffWriteObjDen(), WlzEffWriteObjEMT(), WlzEffWriteObjIcs(), WlzEffWriteObjIPL(), WlzEffWriteObjJpeg(), WlzEffWriteObjJsn(), WlzEffWriteObjMesh(), WlzEffWriteObjNifti(), WlzEffWriteObjNodeEle(), WlzEffWriteObjNrrd(), WlzEffWriteObjObj(), WlzEffWriteObjPic(), WlzEffWriteObjPly2(), WlzEffWriteObjPnm(), WlzEffWriteObjPvl(), WlzEffWriteObjSlc(), WlzEffWriteObjSMesh(), WlzEffWriteObjStl(), WlzEffWriteObjTiff(), WlzEffWriteObjTxt(), WlzEffWriteObjVff(), WlzEffWriteObjVMesh(), WlzEffWriteObjVtk(), and WlzWriteObj().
int WlzEffNumberOfFormats | ( | void | ) |
Retuns the number of file formats, ie WLZEFF_FORMAT_COUNT - 1.
References WLZEFF_FORMAT_COUNT.
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.
indWth | Indent width (no default). |
desWth | Maximum description width (if 0 a default field width is used). |
extWth | Maximum extension width (if 0 a default field width is used). |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcMalloc(), WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZEFF_FORMAT_COUNT, and WlzEffStringFromFormat().
WlzObject* WlzEffReadObjAm | ( | FILE * | fP, |
int | split, | ||
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file using the Amira lattice (.am file) format.
fP | Input file pointer. |
split | Split label lattice files into a compound object of domains if non zero. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_ERR_NONE.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjAm | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file using the Amira lattice (.am file) format.
fP | Output file pointer |
obj | Object 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().
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.
fileBody | Dest ptr for the file body. |
hdrFileName | Dest ptr for the '.hdr' file name. |
imgFileName | Dest ptr for the '.img' file name. |
gvnFileName | Given file name with '.hdr', '.img' or no extension. |
References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzEffReadObjAnl(), and WlzEffWriteObjAnl().
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.
gvnFileName | Given file name. |
dstErr | Destination 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().
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.
gvnFileName | Given file name with .hdr, .img or no extension. |
obj | Given 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().
WlzThreeDViewStruct* WlzEffBibRead3DView | ( | FILE * | fP, |
char ** | dstMsg, | ||
WlzErrorNum * | dstErr | ||
) |
Reads a 3D view from the given file pointer.
fP | Given file pointer. |
dstMsg | Destination pointer for bibfile parsing error message strings, may be NULL. |
dstErr | Destination 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().
WlzErrorNum WlzEffBibWrite3DSectionViewParamsRecord | ( | FILE * | fp, |
char * | recordName, | ||
WlzThreeDViewStruct * | wlzViewStr | ||
) |
Write the section view parameters in the bibtex style record using the bibFile library.
fp | FILE pointer opened for writing |
recordName | record name |
wlzViewStr | woolz 3D view structure |
References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), _WlzThreeDViewStruct::dist, _WlzThreeDViewStruct::fixed, _WlzThreeDViewStruct::phi, _WlzThreeDViewStruct::scale, _WlzThreeDViewStruct::theta, _WlzThreeDViewStruct::up, _WlzThreeDViewStruct::view_mode, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_WRITE_INCOMPLETE, WLZ_M_PI, WLZ_STATUE_MODE, WLZ_UP_IS_UP_MODE, WLZ_ZETA_MODE, and _WlzThreeDViewStruct::zeta.
WlzErrorNum WlzEffBibParse3DSectionViewParamsRecord | ( | BibFileRecord * | bibfileRecord, |
WlzThreeDViewStruct * | wlzViewStr | ||
) |
Parse the bibfile record for a woolz 3D view structure setting paramters in the given view structure.
bibfileRecord | bibfile record as read using libbibFile |
wlzViewStr | woolz 3D view structure already allocated |
References BibFileFieldParseFmt(), _WlzThreeDViewStruct::dist, BibFileRecord::field, _WlzThreeDViewStruct::fixed, _BibFileField::name, _BibFileField::next, _WlzThreeDViewStruct::phi, _WlzThreeDViewStruct::scale, _WlzThreeDViewStruct::theta, _WlzThreeDViewStruct::up, _BibFileField::value, _WlzThreeDViewStruct::view_mode, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_M_PI, WLZ_STATUE_MODE, WLZ_UP_IS_UP_MODE, WLZ_ZETA_MODE, and _WlzThreeDViewStruct::zeta.
Referenced by WlzEffBibRead3DView().
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.
fp | FILE pointer opened for writing |
recordName | record name |
basisFnType | interpolation or basis function type |
affineType | Affine transform type (rigid-body, full affine etc.) |
meshMthd | method used to define the mesh |
meshMinDst | mesh minimum distance |
meshMaxDst | mesh maximum distance |
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.
WlzErrorNum WlzEffBibParseWarpTransformParamsRecord | ( | BibFileRecord * | bibfileRecord, |
WlzFnType * | basisFnType, | ||
WlzTransformType * | affineType, | ||
WlzMeshGenMethod * | meshMthd, | ||
int * | meshMinDst, | ||
int * | meshMaxDst | ||
) |
Parse the bibfile record for the warp transformation parameter settings.
bibfileRecord | bibfile record as read by libbibFile |
basisFnType | return for basis function type |
affineType | Affine transform type (rigid-body, full affine etc.) |
meshMthd | return for mesh method type |
meshMinDst | return for mesh minimum distance |
meshMaxDst | return for mesh maximum distance |
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.
WlzErrorNum WlzEffBibWriteTiePointVtxsRecord | ( | FILE * | fp, |
char * | recordName, | ||
int | index, | ||
WlzDVertex3 | dstVtx, | ||
WlzDVertex3 | srcVtx, | ||
int | relativeFlg | ||
) |
Write a tie-point record in bibtex style.
fp | FILE pointer opened for writing |
recordName | record name |
index | index of the given tie points |
dstVtx | destination vertex |
srcVtx | source vertex |
relativeFlg | Non-zero for relative bib coordinates. |
References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, and WLZ_ERR_WRITE_INCOMPLETE.
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.
bibfileRecord | bibfile record as read in by libbibFile |
index | return for tie-point pair index within list |
dstVtx | return for destination vertex |
srcVtx | return for source vertex |
relativeFlg | return for relative coordinates, non-zero if relative |
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.
WlzErrorNum WlzEffBibWriteFileRecord | ( | FILE * | fp, |
char * | recordName, | ||
char * | fileName, | ||
WlzEffFormat | fileType | ||
) |
Write a bibfile record to record the file name and file type.
fp | FILE pointer |
recordName | record name |
fileName | file name to be recorded |
fileType | file type e.g. image format |
References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_WRITE_INCOMPLETE, and WlzEffStringFromFormat().
WlzErrorNum WlzEffBibParseFileRecord | ( | BibFileRecord * | bibfileRecord, |
int * | dstIndex, | ||
char ** | dstFileName, | ||
WlzEffFormat * | dstFileType | ||
) |
Parse a bibfile record for a filename and type.
bibfileRecord | bibfile record as read in by libbibFile |
dstIndex | Destination pointer for integer parsed from the record ID, may be NULL. |
dstFileName | Destination pointer for file name, may be NULL. |
dstFileType | Destination pointer for the file type, may be NULL. |
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().
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.
fp | FILE pointer opened for writing |
recordName | bibfile record name |
normFlg | normalisation flag |
histoFlg | histogram equalise flag |
shadeFlg | shade correct flag |
gaussFlg | gauss smoothing flag |
width | gauss smoothing width parameter |
References BIBFILE_ER_NONE, BibFileFieldMakeVa(), BibFileRecordFree(), BibFileRecordMake(), BibFileRecordWrite(), WLZ_ERR_NONE, and WLZ_ERR_WRITE_INCOMPLETE.
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.
bibfileRecord | bibfile record as read by libbibFile |
normFlg | normalisation flag |
histoFlg | histogram equalise flag |
shadeFlg | shade correct flag |
gaussFlg | gauss smoothing flag |
width | gauss smoothing width |
threshLow | low threshold value |
threshHigh | high threshold value |
References BibFileFieldParseFmt(), BibFileRecord::field, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_READ_INCOMPLETE.
WlzObject* WlzEffReadObjBmp | ( | const char * | gvnFileName, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file(s) using the '.pnm' file format.
gvnFileName | Given file name. |
dstErr | Dst error pointer, may be NULL. |
References WLZ_ERR_NONE, WLZEFF_FORMAT_BMP, and WlzEffReadObjStack().
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjBmp | ( | const char * | gvnFileName, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file(s) using the '.pnm' file format.
gvnFileName | Given file name. |
obj | Given woolz object. |
References WLZ_ERR_NONE, WLZEFF_FORMAT_BMP, and WlzEffWriteObjStack().
Referenced by WlzEffWriteObj().
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.
fNameStr | Given file name. |
obj | Given woolz object. |
imgSz | Required image size. |
imgOrg | Required image origin. |
data | Buffer of imgSz bytes. |
bgd | Background 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.
WlzErrorNum WlzEffReadObjBmpData2D | ( | FILE * | fP, |
WlzIVertex2 * | gvnImgSz, | ||
unsigned char *** | data | ||
) |
Reads the data from a pgm file into the data array given.
fP | Given file stream. |
gvnImgSz | Dst ptr for image size which is assumed valid if height and width are non zero. |
data | Ptr 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.
WlzObject* WlzEffReadObjDen | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the Stanford density file format.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References ALC_ER_NONE, AlcUnchar3Free(), AlcUnchar3Malloc(), _WlzObject::domain, _WlzEffDenHeader::extrLen, _WlzEffDenHeader::extrMax, _WlzEffDenHeader::extrMin, _WlzEffDenHeader::mapLen, _WlzEffDenHeader::mapLength, _WlzEffDenHeader::mapMax, _WlzEffDenHeader::mapMin, _WlzEffDenHeader::mapWarps, _WlzEffDenHeader::orgLen, _WlzEffDenHeader::orgMax, _WlzEffDenHeader::orgMin, _WlzDomain::p, _WlzEffDenHeader::version, _WlzPlaneDomain::voxel_size, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_GREY_UBYTE, WLZEFF_DEN_VERSION, and WlzFromArray3D().
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjDen | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the Stanford density file format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcUnchar3Free(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzEffDenHeader::extrLen, _WlzEffDenHeader::extrMax, _WlzEffDenHeader::extrMin, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzEffDenHeader::mapLen, _WlzEffDenHeader::mapLength, _WlzEffDenHeader::mapMax, _WlzEffDenHeader::mapMin, _WlzEffDenHeader::mapWarps, _WlzEffDenHeader::orgLen, _WlzEffDenHeader::orgMax, _WlzEffDenHeader::orgMin, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzEffDenHeader::version, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, 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_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WLZEFF_DEN_VERSION, and WlzToArray3D().
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjEMT | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjEMT | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the Netgen neutral mesh file format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcFree(), AlcMalloc(), AlcVectorItemGet(), _WlzDomain::cm3, _WlzDomain::core, _WlzObject::domain, _WlzCMeshFace::edu, _WlzCMeshRes::elm, _WlzCMeshElm3D::face, _WlzCMeshNod3D::idx, _WlzCMeshElm3D::idx, _WlzCMeshEntRes::maxEnt, _WlzCMeshEdgU3D::next, _WlzCMeshEdgU3D::nod, _WlzCMeshRes::nod, _WlzCMeshEntRes::numEnt, _WlzCMeshFace::opp, _WlzCMeshNod3D::pos, _WlzCMesh3D::res, _WlzObject::type, _WlzCMesh3D::type, _WlzCMeshEntRes::vec, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_WRITE_INCOMPLETE, and WlzCMeshElmGetNodes3D().
Referenced by WlzEffWriteObj().
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:
fP | File pointer. |
dstErr | Destination 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().
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.
fileBody | Dest ptr for the file body. |
icsFileName | Dest ptr for the '.ics' file name. |
idsFileName | Dest ptr for the '.ids' file name. |
gvnFileName | Given file name with .ics, .ids or no extension. |
References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzEffReadObjIcs(), and WlzEffWriteObjIcs().
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.
gvnFileName | Given file name. |
dstErr | Destination 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().
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.
gvnFileName | Given file name with .ics, .ids or no extension. |
obj | Given woolz object. |
References AlcFree(), AlcUnchar3Free(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, 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_READ_EOF, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_ERR_WRITE_EOF, WLZ_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WLZEFF_ICS_VERSION_MAJOR, WLZEFF_ICS_VERSION_MINOR, WlzEffIcsFileNames(), and WlzToArray3D().
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjIPL | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the '.ipl' file format.
fP | Input file stream. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjIPL | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the '.ipl' file format.
fP | Output file stream. |
obj | Given woolz object. |
References Alc3Free(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, 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_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzEffHeadWriteIPL(), and WlzToArray3D().
Referenced by WlzEffWriteObj().
static WlzErrorNum WlzEffHeadWriteIPL | ( | WlzEffIPLHeader * | header, |
FILE * | fP | ||
) |
Writes an IPL header to the given file stream.
header | Given header data structure to be written. |
fP | Given output file stream. |
References WLZ_ERR_UNIMPLEMENTED.
Referenced by WlzEffWriteObjIPL().
WlzObject* WlzEffReadObjJpeg | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a jpeg image frm the given file stream and returns a Woolz object.
fP | Given file stream. |
dstErr | Destination error pointer, may be NULL. |
References ALC_ER_NONE, AlcCalloc(), AlcFree(), AlcFreeStackPush(), _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzGreyV::inv, my_error_exit(), my_error_mgr::pub, _WlzValues::r, _WlzGreyP::rgbp, my_error_mgr::setjmp_buffer, _WlzGreyP::shp, _WlzGreyV::shv, _WlzPixelV::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, WLZ_ERR_FILE_FORMAT, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_INCOMPLETE, WLZ_ERR_UNIMPLEMENTED, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RGBA_RGBA_SET, WlzFreeObj(), and WlzMakeRect().
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjJpeg | ( | FILE * | fP, |
WlzObject * | obj, | ||
char * | params | ||
) |
Writes the given object to a jpeg image.
fP | Given file stream. |
obj | Given object to be written. |
params | Jpeg parameters string, currently this is a single ascii integer, which should have the range 1 - 100 and rpresents the image quality with 100 being lossless. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, my_error_exit(), _WlzValues::obj, my_error_mgr::pub, _WlzGreyP::rgbp, my_error_mgr::setjmp_buffer, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_UNIMPLEMENTED, WLZ_ERR_VALUES_NULL, WLZ_ERR_WRITE_INCOMPLETE, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RGBA_BLUE_GET, WLZ_RGBA_GREEN_GET, WLZ_RGBA_RED_GET, WLZ_TRANS_OBJ, WlzCutObjToBox2D(), WlzFreeObj(), WlzGreyTypeFromObj(), WlzInitGreyScan(), WlzNextGreyInterval(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjJsn | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file where the Woolz object is encoded using JSON.
fP | Input file stream. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjJsn | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file where the Woolz object is encoded using JSON.
fP | Output file stream. |
obj | Given 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().
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:
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.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
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.
fP | Output file stream. |
obj | Given woolz object. |
References AlcFree(), AlcMalloc(), AlcVectorItemGet(), _WlzDomain::cm3, _WlzDomain::core, _WlzObject::domain, _WlzCMeshRes::elm, _WlzCMeshNod3D::idx, _WlzCMeshElm3D::idx, _WlzCMeshEntRes::maxEnt, _WlzCMeshRes::nod, _WlzCMeshEntRes::numEnt, _WlzCMeshNod3D::pos, _WlzCMesh3D::res, _WlzObject::type, _WlzCMesh3D::type, _WlzCMeshEntRes::vec, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_CMESH_3D, WLZ_CMESH_ELM3D_GET_NODE_0, WLZ_CMESH_ELM3D_GET_NODE_1, WLZ_CMESH_ELM3D_GET_NODE_2, WLZ_CMESH_ELM3D_GET_NODE_3, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_WRITE_INCOMPLETE.
Referenced by WlzEffWriteObj().
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.
gvnFileName | Given file name. |
sTrans | If 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. |
gTrans | Apply the NIfTI grey scaling if non-zero. |
dstErr | Destination error code, may be NULL. |
References WLZ_ERR_UNIMPLEMENTED.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjNifti | ( | const char * | gvnFileName, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file(s) using the NIfTI file format.
gvnFileName | Given file name with .hdr, .img or no extension. |
obj | Given woolz object. |
References WLZ_ERR_UNIMPLEMENTED.
Referenced by WlzEffWriteObj().
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.
fileBody | Dest ptr for the file body. |
nodeFileName | Dest ptr for the '.node' file name. |
eleFileName | Dest ptr for the '.ele' file name. |
gvnFileName | Given file name with .node or no extension. |
References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzEffReadObjNodeEle(), and WlzEffWriteObjNodeEle().
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.
gvnFileName | Given file name. |
dstErr | Destination 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().
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.
gvnFileName | Given file name with '.node' or no extension. |
obj | Given woolz object. |
References AlcFree(), AlcMalloc(), AlcVectorItemGet(), _WlzDomain::cm2, _WlzDomain::cm3, _WlzDomain::core, _WlzObject::domain, _WlzCMeshRes::elm, _WlzCMeshElm2D::idx, _WlzCMeshElm3D::idx, _WlzCMeshP::m2, _WlzCMeshP::m3, _WlzCMeshEntRes::maxEnt, _WlzCMeshRes::nod, _WlzCMeshEntRes::numEnt, _WlzCMeshNod2D::pos, _WlzCMeshNod3D::pos, _WlzCMesh2D::res, _WlzCMesh3D::res, _WlzObject::type, _WlzCMesh2D::type, _WlzCMesh3D::type, _WlzCMeshP::v, _WlzCMeshEntRes::vec, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_CMESH_2D, WLZ_CMESH_3D, WLZ_CMESH_ELM2D_GET_NODE_0, WLZ_CMESH_ELM2D_GET_NODE_1, WLZ_CMESH_ELM2D_GET_NODE_2, WLZ_CMESH_ELM3D_GET_NODE_0, WLZ_CMESH_ELM3D_GET_NODE_1, WLZ_CMESH_ELM3D_GET_NODE_2, WLZ_CMESH_ELM3D_GET_NODE_3, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_ERR_WRITE_INCOMPLETE, and WlzEffNodeEleFileNames().
Referenced by WlzEffWriteObj().
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.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
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.
fP | Output file stream. |
obj | Given 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().
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
fP | Input file stream. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjObj | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file stream using the Wavefront OBJ file format, see WlzEffReadObjObj().
fP | Output file stream. |
obj | Given woolz object. |
References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjPic | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the BioRad Confocal '.pic' format.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References Alc3Free(), ALC_ER_NONE, AlcShort3Malloc(), AlcUnchar3Malloc(), _WlzObject::domain, _WlzDomain::p, _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_SHORT, WLZ_GREY_UBYTE, WLZEFF_PIC_HEAD_WORD_GET, WLZEFF_PIC_HEADBYTES, WLZEFF_PIC_MAGIC, WLZEFF_PIC_OFF_BYTEPIX, WLZEFF_PIC_OFF_MAGIC, WLZEFF_PIC_OFF_NPIC, WLZEFF_PIC_OFF_NX, WLZEFF_PIC_OFF_NY, and WlzFromArray3D().
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjPic | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the BioRad Confocal '.pic' format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcUnchar3Free(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, 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_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WLZEFF_PIC_HEAD_WORD_SET, WLZEFF_PIC_HEADBYTES, WLZEFF_PIC_MAGIC, WLZEFF_PIC_OFF_BLACKVAL, WLZEFF_PIC_OFF_BYTEPIX, WLZEFF_PIC_OFF_MAGIC, WLZEFF_PIC_OFF_MERGED, WLZEFF_PIC_OFF_NPIC, WLZEFF_PIC_OFF_NX, WLZEFF_PIC_OFF_NY, WLZEFF_PIC_OFF_RGB, WLZEFF_PIC_OFF_WHITEVAL, and WlzToArray3D().
Referenced by WlzEffWriteObj().
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:
<n vertices (int)> <n triangles (int)> <vertex (double double double)> ... <triangle (int int int)> ...
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
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().
fP | Output file stream. |
obj | Given woolz object. |
References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjPnm | ( | const char * | gvnFileName, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file(s) using the '.pnm' file format.
gvnFileName | Given file name. |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, WLZEFF_FORMAT_PNM, and WlzEffReadObjStack().
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjPnm | ( | const char * | gvnFileName, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file(s) using the '.pnm' file format.
gvnFileName | Given file name. |
obj | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, WLZEFF_FORMAT_PNM, and WlzEffWriteObjStack().
Referenced by WlzEffWriteObj().
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.
fNameStr | Given file name. |
obj | Given woolz object. |
imgSz | Required image size. |
imgOrg | Required image origin. |
data | Buffer of imgSz bytes. |
bgd | Background 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.
WlzErrorNum WlzEffReadObjPnmData2D | ( | FILE * | fP, |
WlzIVertex2 * | gvnImgSz, | ||
unsigned char *** | data | ||
) |
Reads the data from a pgm file into the data array given.
fP | Given file stream. |
gvnImgSz | Dst ptr for image size which is assumed valid if height and width are non zero. |
data | Ptr 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.
WlzObject* WlzEffReadObjPvl | ( | const char * | gvnFileName, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from Drishti pvl.nc files.
gvnFileName | Given file name. |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_UNIMPLEMENTED.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjPvl | ( | const char * | gvnFileName, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to a pair of files using the Derishti .pvl.nc file format.
gvnFileName | Given file name with .ics, .ids or no extension. |
obj | Given 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().
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.
fp | Given file stream. |
numKols | Number of columns, x size. |
numLines | Number of lines, y size. |
numPlanes | Number of planes, z size. |
bytesPerPixel | Number of bytes per pixel. |
bitsPerChannel | Number of bits per channel. |
numChannels | Number of channels. |
byteOrder | Byte order. |
dstErr | Destination 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.
WlzObject* WlzEffReadObjSlc | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the '.slc' file format.
fP | Input file stream. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjSlc | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the '.slc' file format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcMalloc(), _WlzEffSlcHeader::bits, _WlzEffSlcHeader::compression, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzEffSlcHeader::icon, _WlzEffSlcHeader::iconSize, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzEffSlcHeader::magic, _WlzEffSlcHeader::modification, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzEffSlcHeader::size, _WlzEffSlcHeader::source, _WlzEffSlcHeader::spacing, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzEffSlcHeader::units, _WlzObject::values, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzFVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzFVertex3::vtY, _WlzIVertex3::vtZ, _WlzFVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WLZEFF_SLC_DATAMOD_OTHER, WLZEFF_SLC_DATASRC_OTHER, WLZEFF_SLC_DATAUNITS_MICROMETER, WLZEFF_SLC_MAGIC, and WlzToArray3D().
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjSMesh | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the GRUMMP smesh file format. This format is:
# 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> ...
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjSMesh | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file stream using the GRUMMP smesh file format, see WlzEffReadObjSMesh().
fP | Output file stream. |
obj | Given woolz object. |
References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjStack | ( | const char * | gvnFileName, |
WlzEffFormat | fFmt, | ||
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file(s) using the given (2D) file format.
gvnFileName | Given file name. |
fFmt | Given file format (must be a 2D file format). |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObjBmp(), and WlzEffReadObjPnm().
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.
gvnFileName | Given file name. |
fFmt | Given file format (must be a 2D file format). |
obj | Given woolz object. |
References AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzObject::type, _WlzCoreDomain::type, _WlzObject::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WlzGetBackground(), and WlzValueConvertPixel().
Referenced by WlzEffWriteObjBmp(), and WlzEffWriteObjPnm().
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.
fP | Input file stream. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjStl | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file stream using the stereolithography stl file format, see WlzEffReadObjStl().
fP | Output file stream. |
obj | Given woolz object. |
References _WlzObject::type, WLZ_CMESH_2D5, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjTiff | ( | const char * | tiffFileName, |
int | split, | ||
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given file using the TIFF format.
tiffFileName | Given file name. |
split | If the image is tiled return individual tiles within a compound object. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjTiff | ( | const char * | tiffFileName, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given file using the TIFF format.
tiffFileName | Given file name with .tif. |
obj | Given 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().
WlzObject* WlzEffReadObjVff | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the Sunvision vff (rank 3) file format.
fP | Input file stream. |
dstErr | Destination 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().
WlzErrorNum WlzEffWriteObjVff | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the Sunvision vff (rank 3) file format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcUnchar3Free(), _WlzEffVffHeader::aspect, _WlzEffVffHeader::bands, _WlzEffVffHeader::bits, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzEffVffHeader::extent, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzEffVffHeader::origin, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzEffVffHeader::rank, _WlzEffVffHeader::rawsize, _WlzEffVffHeader::size, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, 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_ERR_WRITE_INCOMPLETE, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, and WlzToArray3D().
Referenced by WlzEffWriteObj().
WlzObject* WlzEffReadObjVMesh | ( | FILE * | fP, |
WlzErrorNum * | dstErr | ||
) |
Reads a Woolz object from the given stream using the GRUMMP vmesh tetrahedral mesh file format.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References _WlzValues::core, _WlzDomain::core, WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjVMesh | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the GRUMP VMESH tetrahedral mesh file format.
fP | Output file stream. |
obj | Given woolz object. |
References AlcFree(), AlcMalloc(), AlcVectorItemGet(), _WlzDomain::cm3, _WlzDomain::core, _WlzObject::domain, _WlzCMeshFace::edu, _WlzCMeshFace::elm, _WlzCMeshRes::elm, _WlzCMeshElm3D::face, _WlzCMeshNod3D::idx, _WlzCMeshElm3D::idx, _WlzCMeshEntRes::maxEnt, _WlzCMeshEdgU3D::next, _WlzCMeshEdgU3D::nod, _WlzCMeshRes::nod, _WlzCMeshEntRes::numEnt, _WlzCMeshFace::opp, _WlzCMeshNod3D::pos, _WlzCMesh3D::res, _WlzObject::type, _WlzCMesh3D::type, _WlzCMeshEntRes::vec, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, and WLZ_ERR_WRITE_INCOMPLETE.
Referenced by WlzEffWriteObj().
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.
fP | Input file stream. |
dstErr | Destination error number ptr, may be NULL. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_NULL.
Referenced by WlzEffReadObj().
WlzErrorNum WlzEffWriteObjVtk | ( | FILE * | fP, |
WlzObject * | obj | ||
) |
Writes the given Woolz object to the given stream using the Visualization Toolkit file format.
fP | Output file stream. |
obj | Given 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().
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.
fP | Output file stream. |
obj | Given points object. |
onlyDom | Only write the points domain if non-zero. |
References _WlzVertexP::d2, _WlzVertexP::d3, _WlzObject::domain, _WlzVertexP::i2, _WlzVertexP::i3, _WlzPoints::nPoints, _WlzPoints::points, _WlzValues::pts, _WlzDomain::pts, _WlzPointValues::rank, _WlzPoints::type, _WlzObject::values, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_WRITE_INCOMPLETE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WlzEffWritePointsVtkFieldValues(), and WlzEffWritePointsVtkScalarValues().
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().
fP | Output file stream. |
obj | Object vith points values for output. |
References AlcFree(), _WlzGreyP::dbp, _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_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().
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().
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:
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
fP | Output file stream. |
obj | Object 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().