Package bar :: Package rec :: Module formats
[hide private]
[frames] | no frames]

Module formats

The module provides basic information about availiable export formats.

Import Graph
Import Graph

Functions [hide private]
 
getFormatInfo(formats=None)
Return descriptions of requested formats.
Variables [hide private]
  BAR_SCENE_TEMPLATE = 'scene_%s'
  BAR_VOLUME_TEMPLATE = 'volume_%s'
  BAR_MESH_TEMPLATE = 'model_%s'
  BAR_EXPORT_FORMATS = [('exportToVRML', 'VRML files', '.wrl', '...
  BAR_EXPORT_FORMAT_INFO = {'exportPipeline': {'desc': 'pipeline...
  BAR_EXPORT_VOLUME_FORMATS = {'exportToNiftii': {'desc': 'NIfTI...
  BAR_EXPORT_SCENE_FORMATS = {'exportToPOVRay': {'desc': 'POV-Ra...
frozenset([str, ...]) SCENE_EXPORT_FORMAT_MASK = frozenset(['exportScreenshot', 'exp...
the mask of formats allowing to export a scene ("allowing to" is not "dedicated to")
  IMAGE_EXPORT_FORMAT_MASK = frozenset(['exportScreenshot', 'exp...
  BAR_TEMPLATE = {'exportPipeline': 'pipeline_%s.xml', 'exportSc...
  BAR_CACHED_MODEL_MASK = 'model_*.vtk'
  __package__ = None
hash(x)
Function Details [hide private]

getFormatInfo(formats=None)

 

Return descriptions of requested formats.

Description is a dictionary containing keys:
- C{'desc'} for text describing the format,
- C{'ext'} for the format filename suffix,
- C{'template'} for default output filename template.

@param formats: requested formats; if not given - all formats are requested
@type formats: set([str, ...])

@return: format name to its description mapping
@rtype: {str: {str: str}, ...}


Variables Details [hide private]

BAR_EXPORT_FORMATS

Value:
[('exportToVRML', 'VRML files', '.wrl', 'scene_%s'),
 ('exportToX3d', 'X3D files', '.x3d', 'scene_%s'),
 ('exportToPOVRay', 'POV-Ray files', '.pov', 'scene_%s'),
 ('exportToNiftii', 'NIfTI I files', '.nii.gz', 'volume_%s'),
 ('exportToVTKPolydata', 'vtk polydata files', '.vtk', 'model_%s'),
 ('exportToSTL', 'STL (STereoLithography) files', '.stl', 'model_%s'),
 ('exportToNumpy', 'NumPy array files', '.npy', 'volume_%s'),
 ('exportToVolume', 'vtk structured grid files', '.vtk', 'volume_%s'),
...

BAR_EXPORT_FORMAT_INFO

Value:
{'exportPipeline': {'desc': 'pipeline files',
                    'ext': '.xml',
                    'template': 'pipeline_%s.xml'},
 'exportScreenshot': {'desc': 'PNG images',
                      'ext': '.png',
                      'template': 'screenshot_%s.png'},
 'exportThumbnail': {'desc': 'PNG thumbnails',
                     'ext': '.png',
...

BAR_EXPORT_VOLUME_FORMATS

Value:
{'exportToNiftii': {'desc': 'NIfTI I files',
                    'ext': '.nii.gz',
                    'template': 'volume_%s.nii.gz'},
 'exportToNumpy': {'desc': 'NumPy array files',
                   'ext': '.npy',
                   'template': 'volume_%s.npy'},
 'exportToVolume': {'desc': 'vtk structured grid files',
                    'ext': '.vtk',
...

BAR_EXPORT_SCENE_FORMATS

Value:
{'exportToPOVRay': {'desc': 'POV-Ray files',
                    'ext': '.pov',
                    'template': 'scene_%s.pov'},
 'exportToVRML': {'desc': 'VRML files',
                  'ext': '.wrl',
                  'template': 'scene_%s.wrl'},
 'exportToX3d': {'desc': 'X3D files',
                 'ext': '.x3d',
...

SCENE_EXPORT_FORMAT_MASK

the mask of formats allowing to export a scene ("allowing to" is not "dedicated to")
Type:
frozenset([str, ...])
Value:
frozenset(['exportScreenshot',
           'exportThumbnail',
           'exportToPOVRay',
           'exportToVRML',
           'exportToX3d'])

IMAGE_EXPORT_FORMAT_MASK

Value:
frozenset(['exportScreenshot', 'exportThumbnail'])

BAR_TEMPLATE

Value:
{'exportPipeline': 'pipeline_%s.xml',
 'exportScreenshot': 'screenshot_%s.png',
 'exportThumbnail': 'thumbnail_%s.png',
 'exportToNiftii': 'volume_%s.nii.gz',
 'exportToNumpy': 'volume_%s.npy',
 'exportToPOVRay': 'scene_%s.pov',
 'exportToSTL': 'model_%s.stl',
 'exportToVRML': 'scene_%s.wrl',
...