1) Using individual FSI Viewer configuration files

To publish FSI Viewer instances with HotSpots you need to create a configuration file for each image. This is, because the HotSpot data cannot be provided by HTTP query due to the amount of data and each image will likely contain different HotSpots.

You might want to use the configuration file “hotspot3d.xml” as a sample.

<fsi_parameter>

	<PLUGINS>

	<PLUGIN src="hotspots" visible="true" DefaultColor="00FF00" DefaultFill="true" DefaultFillColor="FF0000" DefaultFillApha="10">
			<HotSpots>

				<rect spot="1, 1, 0.25739408, 0.53730836, 0.41410256, 0.66192504, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 1</text>
				</rect>

				<rect spot="1, 2, 0.06923078, 0.48211251, 0.24121675, 0.5971893, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 2</text>
				</rect>

				<rect spot="1, 3, 0.14102564, 0.42248729, 0.31301161, 0.53756409, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 3</text>
				</rect>

				<rect spot="1, 4, 0.11538462, 0.48551966, 0.28737058, 0.60059646, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 4</text>
				</rect>

				<!-- the object of interest is hidden in scenes 5 and 6 -->

				<rect spot="1, 7, 0.67179487, 0.72913125, 0.84378084, 0.84420804, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 7</text>
				</rect>

				<rect spot="1, 8, 0.74102564, 0.67461677, 0.91301161, 0.78969356, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 8</text>
				</rect>

				<rect spot="1, 9, 0.67179487, 0.55706991, 0.84378084, 0.6721467, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 9</text>
				</rect>

				<rect spot="1, 10, 0.55641026, 0.56047706, 0.72839622, 0.67555386, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 10</text>
				</rect>

				<rect spot="1, 11, 0.43589744, 0.59114146, 0.6078834, 0.70621825, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 11</text>
				</rect>

				<rect spot="1, 12, 0.25982978, 0.59838169, 0.42423077, 0.7048552, 0">
					<text>This is the <b>formatted</b> tool tip<br/>to display for scene 12</text>
				</rect>



			</HotSpots>

		</PLUGIN>

	</PLUGINS>



</fsi_parameter>

 

Please copy the file to your FSI Viewer configuration directory:

[…]fsi/config/hotspot3d.xml

If you edit the file using a text editor, you will notice that the configuration file contains the “hotspots” plug-in definitions including the individual hotspots nodes only. You might want to add parameters as needed. The sample contains only those parameters required for the HotSpots.

In order to use the configuration file when publishing the image, please:

  • Choose “More Options” then “Publish as FSI Viewer” page
  • At the top right find the “Additional Parameters” text box
  • Enter “cfg=hotspot3d“(note that you need to omit the path to your configuration folder and can optionally omit the extension “.xml”)
    You can use subfolders in your configuration folder as needed. In this case, please add the name of the subfolder(s) and the name of the configuration file, e.g. “cfg=hotspotconfigurations/foo.xml”

You might want to check one of your 3D images with this sample configuration file. As you will see, the sample configuration file contains one(!) HotSpot only. There are multiple nodes in the configuration though – one for each scene (step of rotation of your 3D image) you want the HotSpot to appear.
For 2D images, a single hot spot node per hot spot would be required only.

2) Authoring the HotSpots

Once you know how to use the HotSpot plug-in you need to know how to obtain the value for the “spot” attribute.
Let’s have a look at one HotSpot definition for one scene:

<rect spot="1, 4, 0.11538462, 0.48551966, 0.28737058, 0.60059646, 0">
            <text>This is the <b>formatted</b> tool tip<br/>to display for scene 10</text>
</rect>

The node name “rect” defines the shape of the HotSpot. Please refer to the “Plug-in Reference” of your FSI documentation for additional shapes. The procedure is all the same for all shapes – except for polygons.

The first attribute here is “spot”. This information tells FSI Viewer where to display the HotSpot.

SceneSet, Scene, left, top ,right, bottom [,rotation]

You do not need to focus on the actual values as you can get and copy the entire value using the “SelectFrame” plug-in. Please see “Getting the spot values” below.
The child node contains the tool tip to display for the HotSpot. Please make sure to enter valid XML tags when using formatting tags or special characters. E.g. you need to use “<br/>” for line breaks rather than “<br>“.

Please refer to the “Plug-in Reference” in your FSI documentation for optional parameters of the HotSpot nodes.

Getting the Spot Values

Especially with HotSpots for 3D views it’s important to use a quick method to get the value for the “spot” attribute. To do so, please:

  • Create or duplicate the FSI configuration file you want to use and open the file in a text editor
  • Open your image in FSI Server web interface
  • Choose “Publish as FSI Viewer” or “Publish as FSI Viewer 3D”
  • In the “Additional Parameters” text box, enter the configuration file you are currently editing, e.g. “cfg=hotspots3d”
  • In the “Plug-ins” tab, enable “SelectFrame”

  • Click “Preview”
  • Click the button with the select frame symbol in the FSI Viewer menu bar
    (the rectangular with a dot in each corner)

Now you can see a small window in the top-left corner of FSI Viewer. The first tab “Selection” displays the value of your currently marked area.
You can click and drag the semi-opaque white area to move the selection. Use the handles to resize the selection. You will notice that the values in the small window to the top-left change accordingly.
For 3D views the first two numbers of the value change if you rotate the view. You might want to use the “7” and “9” keys on your keyboards “num pad” to rotate the view. This might be more convenient than hiding the select frame (by pressing the “select frame button again”) and rotating the image using the mouse.

Now:

  • Create or copy and paste a HotSpot node in your text editor
  • Modify the tool tip (the content of the node) as necessary
  • Now go back to FSI Server web interface
  • Rotate the image and adjust position of the selection to the area of interest
  • Mark the value in the “View & Selection” window using your mouse
  • Right click the selection and choose “copy” from the context menu
  • Switch back to your text editor
  • Paste the value to the value of the “spot” attribute

The result should look like this:

<rect spot="1, 4, 0.11538462, 0.48551966, 0.28737058, 0.60059646, 0">
            <text>This is the <b>formatted</b> tool tip<br/>to display for scene 10</text>
</rect>

(the part in green is the value you copied from FSI Server web interface)

3) 3D Views with HotSpots

In case a HotSpot is supposed to be visible in multiple scenes (this is: if the user rotates the view) you need to:

  • Rotate the view in FSI Viewer (e.g. using the “7” and “9” keys of your “num pad”. Please make sure FSI Viewer owns the input focus by clicking the menu bar of FSI Viewer first)
  • Drag (and resize) the HotSpot area as needed
  • Follow the steps described above below the word “Now:”

Follow the same procedure for additional HotSpots you want to add to the image. You will notice that it’s far more convenient to author the entire rotation for one HotSpot before continuing with the next one, as you just need to drag the area in this case.