Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Management in Quaestor

Quaestor has Quaestor has the ability to deal with- and present binary information, such as pictures, in the knowledge browser and Workbase using the QBinaries object. In the following, we briefly describe the current possibilities for using binary data in the knowledge base and in solutions focussing on the use of images (Click on QBinaries for a detailed description how to create and fill the QBinaries object).

Please note that by default all Quaestor constants are given the @HIDE attribute. So please select the "Show hidden data" option in the "Modeller" tab of the Options window.

To show pictures based on selections in the Knowledge Browser or Workbase, binaries can be coupled to a frame or parameter value in the following ways:

...

Any knowledge base has its own file structure under the knowledge base directory (by default, this will be under My Knowledge\Kbs\_KnowledebaseName in which KnowledebaseName is the name of the current knowledge base, without extension. 
The directory tree under this level will contain a directory Html\images in which the standard set from the Html\images directory present on the Quaestor program the Quaestor program directory will be present.

In the My Knowledge\Kbs\_KnowledebaseName\Html\images directory one can store a collection of images related to this knowledge base which can be referred to by including in the parameters' data slot or (object related) reference an attribute:
@PICTURE:FigureX.gif


FigureX.gif needs to be present in the above mentioned directory. If not, the standard background picture will be shown in the manner described above.

...

It is also possible to include an image (object) in a frame by the menu option Include Binary in Frame.

So if you include FigureXinclude FigureX.gif and gif  and you write in the data slot: @PICTURE @PICTURE:FigureX.gif Quaestor will gif  Quaestor will first save the binary and than show it as the picture.

...

Method 3, reference to a QBinaryID in the QBinaries object:

If we use the QBinaries database, we ensure the availability of a collection of images independent from the name or location of a knowledge base. In this case we have several ways in which we can make an image appear. By introducing the attribute:
@PICTURE::5

in a frame, the image Figure 5.gif will be presented as soon you reach this frame in the knowledge browser (in the knowledge base presented in fig.1). Please note the double semicolon in@PICTUREin@PICTURE::5 which 5  which is used to distinguish the value 5 from a file name. in this way, it is possible to show a single image on multiple locations without redundancy. Based on the value behind the double semicolon, the QBinary image value in the first record in Datasetin Dataset.QBinaries with QBinaries  with QBinaryID value of 5 will be presented.

...

Instead of immediately referring to a file one can refer to another parameter:
@PICTURE:Lpp


If the parameter Lpp contains a picture reference like the methods described above, this reference is inherited by the frame containing the @PICTUREthe @PICTURE:Lpp attributeLpp attribute.


This method will work in combination with all methods 1-3.

...

Instead of a Knowledge Browser-centered approach to presenting images/objects, one can connect images to parameter values.

By including only the @PICTURE attributethe @PICTURE attribute, so without file nameparameter name or value, the current value of this parameter will be used as the QBinaryID search key.


Please note that in the event of a VALUE parameter the formatted value of the parameter will be used as search key. Thus, a value of 2 will be provided as 2.00 if a Fixed Format with 2 decimals (FF2) is used. Note that a QBinaryID string of 2 will not fulfil this argument value. The used value will be the parameter value of the current solution/dataset/object/case. Parameters not having the single @PICTURE attribute single @PICTURE attribute will not be linked to images in this fashion.

...

Connecting values to images as described under Method 5 is a useful concept with two limitations, however:

  1. if you want to present the same image for multiple values, you need to introduce multiple instances of an image

    in Dataset

    in Dataset.QBinaries;


  2. Generic parameters can have object dependent references, each containing sets of option lists that are solely related to particular objects. This implies that one wishes to relate images not only to parameter values but also to the object in which the value exists.

Method 5a, reference using a Boolean expression for QBinaryID:

The first limitation implies that if you want to present the same image for multiple values you need to introduce multiple instances of an image in 

Dataset in Dataset.QBinaries, one of each value that may occur. In order to get around this limitation, it is possible to provide a Boolean expression for QBinaryID instead of a single value. The expression need to be preceded by @. Examples are:

@ParX=1 OR ParX=2 OR ParX2=6


@ParX=>1 AND ParX<6

In fig.1 the constraint @a>3 constraint @a>3 AND a<9 is a<9 is connected to Figure 6.gif. For any value >3 and <9, the image Figure 6.gif will be shown. In the constraint all intrinsic Quaestor functions intrinsic Quaestor functions can be used including brackets. However, functions using objects are not evaluated.

...

The second limitation of Method 5 is related to generic parameters. Generic parameters have object dependent references, each containing e.g. sets of option lists that of option lists  that are solely related to particular objects. This implies that one wishes to relate images not only to parameter values but also to the object in which the value exists, i.e. it may become necessary to relate ImageAto relate ImageA to value X of Par_i in object Obj_j and !ImageB to value X of Par_i in object Obj_kof Par_i  in object Obj_j  and !ImageB  to value X  of Par_i  in object Obj_k .The way to do this is to use the lists in the lists  in the object-related references as in the following example from a parameter Switch.>< 

>< 

=misc= Switch mode

0Switched in parallel

=Diesel.LTCooler=

-1Switched in series cold:12

1Switched in series warm:13

@PICTURE

=Diesel.HTCooler=

-1Switched in series cold:14

1Switched in series warm:15

@PICTURE

=InjCooler=

-1Switched in series cold

0Switched in parallel

1Switched in series warm

In this example, in any instance of the object Diesel.LTCooler the reference

-1Switched in series cold:12

1Switched in series warm:13

@PICTURE

will be available. In this object, for a Switch value Switch  value of -1 the Datasetthe Dataset.QBinaries.qBinary with qBinary  with QBinaryID value of 12 will be shown in the Illustration form. For a Switch value of 1 theDatasettheDataset.QBinaries.QBinary with QBinary  with QBinaryID value of 13 will be shown. The attribute @PICTURE is attribute @PICTURE  is included in order to tell Quaestor that tell Quaestor that it should search for an image/object inDatasetinDataset.Binaries .

In any instance of the object Diesel.HTCooler this will be picture 14 and 15 respectively. This example shows how to relate different images to the same parameter value in different object instances.

...

In the above picture, some parameters like ConfigType$ and like ConfigType$  and some values of MainLTCoolerType$ image of MainLTCoolerType$  image references are included.

For instance, the fifth case value of ConfigType$ is separated:5 in of ConfigType$  is separated:5  in which 5 is considered to be a DatasetDataset.QBinaries.QBinaryID reference   reference to an image. In this example, the Datasetthe Dataset.Optionsobject Options object is data source to an |OPTIONS| script   script for parameter OPTIONS#parameter OPTIONS# , a TeLiTab set in which all elements of a case of Datasetof Dataset.Options will Options  will be its value. The |OPTIONS| script   script is discussed in a separate article Data use and management in Quaestor in Quaestor.

The |OPTIONS| script   script results in invoking a list view including a browser component that will present the referred to image per parameter that is proposed in the list view. This allows a stepwise selection of a database record supported by images that are context sensitive, i.e. for each step in the selection process, it now possible to present relevant graphical images(, spreadsheet, pfd documents, etc).

...