# Generic View-Level Variables

These variables are used with any view, regardless of the ViDi tool.

View-level Variable | Data Type | Description
--- | --- | ---
new | Boolean | Returns all views that were added since the last training.
anomalous | Boolean | Returns samples where the image plane characteristics do not match the tool configuration.
all | Boolean | Returns all the views in the database.
processed | Boolean | Returns views with markings that were generated since the last training.
masked | Boolean | Returns all views that contain a mask.
invalid | Boolean | Returns all views containing invalid labels, such as empty Blue Locate tool features, or overlapping regions in a Red Analyze tool.
trained | Boolean | Returns all views that were included in the training set.
labeled | Boolean | Returns all views that contain a label.
sample_name | String | The name of sample, which may be different if multi-channel samples are being used.
filename | String | Returns the view with that filename.
group | String | Returns the view group that contains the view as a member.
added | String | Returns the date when the image was added to the workspace.
duration | Floating Point | Returns the last processing time for the view.
index | Floating Point | Returns an index of views in the enumeration of all views, from 0 to N-1. This is useful when you want to select a specific range of views.
view_index | Floating Point |
random | Floating Point | Returns a random value. This is useful to shuffle views (when used to sort views) or to select a random set of views. For example, 'random < 0.5' would select half of the views.
width | Floating Point | Returns views that match the specified width value.
height | Floating Point | Returns views that match the specified height value.
difficulty | Floating Point | Returns views that match a unit-less measure of the degree of difficulty to train a view.
sets | String [ ] | Returns all of the views that are included in the specified set. This variable is unique, in that a vector of strings are specified in order to return a result. The following grammar summarizes the semantics of the equality, inequality, and contains operators ('~') when applied to the sets variable: sets = '<set_name>' // This returns true and the associated views if at least one element of a sets is identical to set_name. sets != '<set_name>' // This returns true and the associated views if none of the elements of sets is identical to set_name. sets ~ '<set_name>' // Returns true and the associated views if at least one element of a sets contains the string set_name. Note: You can use the contains operator ('~') to perform partial matching. For example, this syntax can be used: sets ~ "Plant17" // This returns true for views that are members of Plant17, such as "Plant17-LineA" or "Plant17-LineB", but not "Plant18-LineA".