Header to include: imodel.h
Imod *imodFileRead(const char *filename)
int imodFileWrite(Imod *imod, const char *filename)
int imodOpenFile(const char *filename, const char *mode, Imod *imod)
int imodCloseFile(Imod *imod)
int imodReadFile(Imod *imod)
Imod *imodRead(const char *filename)
int imodTestIfModelFile(const char *filename)
int imodWriteFile(Imod *imod)
int imodWrite(Imod *imod, FILE *fout)
int imodWriteSkipMesh(Imod *imod, FILE *fout, int whichSkip)
int imodReadAscii(Imod *imod)
int imodWriteAscii(Imod *imod)
Reads a model from file given by filename and returns created model structure or NULL for error. (Unused, calls imodRead).
Writes the model imod to the file given by filename. Returns -1 for error, 0 for success. (Unused 4/23/05).
Opens the file given by filename with the given mode, sets the file pointer into imod->file and the filename into imod->filename. Returns -1 for error or 0 for success.
Closes the file for model imod, using file pointer in imod->file. Returns -1 for error.
Reads model from file pointer in imod->file and places model in imod. The model should be set to default settings before calling, either by allocating with imodNew or by calling imodDefault. Returns -2 if file is not a binary or ASCII IMOD model, or -1 for other errors.
Reads a model from file given by filename and returns created model structure or NULL for error.
Reads just enough of the file filename to determine if it is model file; returns 0 for a binary mode, -1 for an acsii model, 1 for error opening the file, or 2 for not a model file.
Writes the model imod to the file pointer in imod->file. Returns -1 for error, 0 for success.
Writes the model imod to the file pointer in fout. Returns -1 for error, 0 for success.
Writes the model imod to the file pointer in fout, leaving out meshes in regular contour-based objects if bit 0 of whichSkip is set and meshes in isosurface objects if bit 1 is set. Returns -1 for error, 0 for success.
Reads an ascii model from file point in imod->file. This is called automatically by general model reading routines when the file is not recognized as IMOD binary format. Returns -2 for file not an IMOD model or -1 for other errors.
Writes the model imod in ascii format to the file pointer in imod->file. Returns 0.