You are here: Start » Technical Issues » Loading FabImage Studio Files (FIDATA)

Loading FabImage Studio Files (FIDATA)

FabImage Studio has its own format for storing arbitrary objects - the FIDATA format. It is used for storing elements of the program (paths, regions etc.) automatically, or manually when using "Export to FIDATA file" option or the SaveObject and LoadObject generic filters.

FabImage Library can load and save several types of objects in FIDATA format. This is done using dedicated functions, two corresponding for each supported type. The functions start with Load and Save and accept two parameters - a filename and an object reference - for loading or saving.


	void LoadRegion
	(
		const File& inFilename,		//:Name of the source file
		Region& outRegion		//:Deserialized output Region
	);


	void SaveRegion
	(
		const Region& inRegion,		//:Region to be serialized
		const File& inFilename		//:Name of the target file
	);

The supported types include:

  • Region
  • Profile
  • Histogram
  • SpatialMap
  • EdgeModel
  • GrayModel
  • OcrMlpModel
  • OcrSvmModel
  • Image*

Because the LoadImage function is a more general mechanism for saving and loading images into common file formats (like BMP, JPG or PNG), the functions for loading and saving fil::Image as FIDATA are different:


	void LoadImageObject
	(
		const File& inFilename,		//:Name of the source file
		Image& outImage		//:Deserialized output Image
	);


	void SaveImageObject
	(
		const Image& inImage,		//:Image to be serialized
		const File& inFilename		//:Name of the target file
	)

Simple types like Integer, Real or String can be stored in files in textual form - by setting inStreamMode to Text when using SaveObject - this can be read by formatted input output in C/C++ (for example using functions from the scanf family).

Previous: Interfacing with Other Libraries Next: Working with GigE Vision® Devices