| Product | Version |
| Signals One / Spotfire for Signals / Signals Data Factory | All Versions |
Keywords:
images, view images, load images, Base64, Base64Decode, render as image, Image renderer, CSV, SDF, ADT, Signals Data Factory, IMAGE data type, publish images, Allowed URIs, whitelist, file:///, Revvity-hosted, Spotfire for Signals, Signals Notebook
Introduction: This article explains how to view images in Spotfire for Signals when you can't use file paths (file:///) to load images. It shows how to load images as Base64-encoded text in CSV or SDF files or through ADT, show them as images in Spotfire, and save them in Signals Data Factory with the IMAGE data type so you can use them again later.
Confirmed Behavior:
Ways to show images in Spotfire for Signals
- Spotfire can show images from local or shared drives through file paths (file:///). To do this, file:/// must be added to the Allowed URIs whitelist in the Administration Manager. See How to Render Images in Spotfire from Local or Shared Drives.
- If you can't change the whitelist, you can load the images as Base64-encoded text instead. This doesn't use file paths.
- Base64 images can be loaded into Spotfire from CSV files, SDF files, or other supported data sources. They can also be stored in Signals Notebook or Signals Data Factory and used in Spotfire later.
- In Spotfire, the Base64Decode() function turns the text back into an image, and the column is set to show as an image.
- After the images show in Spotfire, you can publish the data to Signals Data Factory with the IMAGE data type. Then you can get the images straight from Data Factory in later analyses.
Example:
Chemists are working in Spotfire for Signals with CSV and SDF files because most of their data isn't in Signals yet. They want to see an image for each compound. The image files are converted to Base64 text and added as a column in the CSV file. In Spotfire, a calculated column with Base64Decode() shows the images in a table. Later, the data is published to Signals Data Factory with the image column mapped to the IMAGE data type, so other dashboards can load the images from Data Factory.
Before you start
- Each image must be a valid PNG or JPEG file saved as a Base64 string. Convert the images outside Spotfire before you load them.
- Add the Base64 strings as a column in your CSV or SDF file, or in your ADT table. Each row should hold one image.
- To publish to Signals Data Factory, you need a Data Factory project and a measurement type with an attribute that uses the IMAGE data type.
Process Steps:
-
Pick How You'll Load the Images
- If you can add file:/// to the Allowed URIs whitelist, you can use file paths. See How to Render Images in Spotfire from Local or Shared Drives.
- If you can't change the whitelist, use the Base64 steps below.
-
Load the Base64 Images into Spotfire
- Open the CSV or SDF file with the Base64 image column in Spotfire for Signals.
- You can also load the data through ADT.
-
Turn the Base64 Text into Images
- Add a calculated column with this expression: Base64Decode([Base64]). Replace [Base64] with the name of your column.
- Add the new column to a Table or Cross Table visualization.
- Right-click the column header and select Properties. On the Formatting tab, under Render as, select Image.
- Note: For more details, see How to convert Base64 String in Spotfire to PNG.
-
(Optional) Publish the Images to Signals Data Factory
- Publish the data to your Data Factory project. Map the image column to an attribute that uses the IMAGE data type.
- After you publish, you can load the images straight from Data Factory in later analyses.
-
Check the Result
- Check that the images show in the visualization. If you published to Data Factory, load the data again from Data Factory and check that the images still show.
-
Contact Revvity Signals Support
- If the problem continues, contact Support. Include your Signals tenant URL, your Spotfire version and hotfix (Help > Support Diagnostics and Logging > Product File Information > Copy Info), the image format (PNG or JPEG), where the data comes from (CSV, SDF, ADT, or Data Factory), a small sample file, and screenshots of any errors.
Key Findings:
-
File Paths Need the Whitelist:
- Loading images from local or shared drives with file:/// only works if file:/// is in the Allowed URIs whitelist.
-
Base64 Doesn't Need File Paths:
- Base64 images can be loaded from CSV files, SDF files, or ADT, and shown with Base64Decode().
-
Images Can Be Stored in Signals:
- Base64 images can be stored in Signals Notebook or Signals Data Factory and used in Spotfire later.
-
Use the IMAGE Data Type in Data Factory:
- Publishing with the IMAGE data type lets you load the images straight from Data Factory.
- Publishing with the IMAGE data type lets you load the images straight from Data Factory.
Critical Note: If you can't add file:/// to the Allowed URIs whitelist, convert your images to Base64 text and load them in a CSV file, an SDF file, or ADT. In Spotfire, use Base64Decode() in a calculated column and set the column to show as an Image. To use the images again later, publish them to Signals Data Factory with the IMAGE data type.
Comments
0 comments
Please sign in to leave a comment.