Image Sequence Pattern | Object2VR

Object2VR – Help

The image sequence pattern is simply a way for you to describe your file naming convention to Object2VR in order for it to recognize your images as a sequence pattern. This description is written in one line of JavaScript which uses predefined variables based on column and row numbers:

  • column – current column
  • row – current row
  • state – current view state
  • columns – selected number of columns
  • rows – selected number of rows
  • states – number of view states

Studio V3.0 You can also use the User Data fields:

  • title
  • description
  • author
  • datetime
  • copyright
  • source
  • information
  • comment

There is also a helper function:

fill(<string>,<length>,<fill character>) – expands a string to a certain length

You can find a list of the other predefined objects in Qt’s ECMAScript Reference.

Examples

Some useful examples of image name patterns. The round brackets around the variables are used to force a mathematical evaluation.

Single Row

The following examples are explained assuming 10 columns.

'image' + (column) + '.tif'

produces “image0.tif” to “image9.tif”

'image' + (column+1) + '.tif'

produces “image1.tif” to “image10.tif”

'image' + fill(column+1,4,'0') + '.tif'

produces “image0001.tif” to “image0010.tif”

Multi Row

The following example are explained asuming 10 columns and 5 rows.

'out_'+ (row) + '_' + (column) + '.tif'

produces “out_0_0.tif”,”out_0_1.tif”,.. to “out_4_9.tif”

'out_'+ ((rows-1)-row) + '_' + (column) + '.tif'

produces “out_4_0.tif”,”out_4_1.tif”,.. to “out_0_9.tif”

'DSC_' + fill(column+row*columns+234,4,'0') + '.JPG'

produces “DSC_0234.JPG”, “DSC_0235.JPG”,… to “DSC_0283.JPG”. This is useful if you shot a multi row object movie in one go with your digital camera and the first image is “DSC_0234.JPG”.

Advanced Examples

You can also define functions or arrays within the pattern line. Only the evaluation of the last statement defines the result. If you have, for example, several rows with different names you could use something like this:

rowname=Array('red','blue','green','yellow','pink'); rowname[row] + '_' + column + '.jpg'

This produces the file names “red_0.jpg”, “red_1.jpg”, …. “red_9.jpg”,”blue_0.jpg”,…. “pink_9.jpg”

See also

Importing with Select Input (Object2VR)
Input (Object2VR)
Image Capture (Object2VR)
User Data (Object2VR)