1 / 4

vtkFileCachePipeline

vtkFileCachePipeline. John Biddiscombe. Explanation : vtkFileCachePipeline. vtkFileCachePipeline Too much time spent loading CFX, extracting, contouring, masking/thresholding/glyphing/etc then visualizing Experiment with pipeline, when happy, do a computation once, then cache the results.

ull
Télécharger la présentation

vtkFileCachePipeline

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. vtkFileCachePipeline John Biddiscombe

  2. Explanation : vtkFileCachePipeline • vtkFileCachePipeline • Too much time spent loading CFX, extracting, contouring, masking/thresholding/glyphing/etc then visualizing • Experiment with pipeline, when happy, do a computation once, then cache the results. • Automate/standardize the caching process by creating a cache class, so that code isn’t littered with #ifdef DO_STUFF • Code becomes difficult to maintain and extend when full of conditional compilation flags. Pipeline cache makes life easy. Read CFX Extract one Var Do something Visualize FileCachePipeline vtkFileCachePipeline : CSCS

  3. Explanation : vtkFileCachePipeline • vtkFileCachePipeline • A filter which wraps/embeds a pipeline and cache’s the output for the next time the app is run. The first time the pipeline is updated, the cache wrapper saves the output to disk using a configurable name/pattern/timestep. • Next time the filter is run (either in a loop, or the next day when the program is restarted), the cache file(s) is(are) fetched and the (possibly) expensive pipeline update is skipped. • Multiple time steps are supported (cache filename_%04i) • Saves time spent loading data, extracting, contouring/ masking/ thresholding/ glyphing etc then visualizing (sometimes over and over again when protyping/ testing/ debugging) • Saves time for end user who may want to run the same visualization several times using different views etc. • Raw data may be GBytes, but visualized part of it may only be MBytes, once cache has been created, original can be archived. • Cache operates in two modes • Shallow Cache : data stored in vtk files and reloaded when requested • Deep Cache : vtk files loaded and kept in memory during app execution (default mode if memory available) vtkFileCachePipeline : CSCS

  4. vtkFileCachePipeline This part of the pipeline can be skipped if the cache output is saved, the cache filter will load it automatically Read Data Extract Vars Do something time consuming Visualize FileCachePipeline : A complete vtk pipeline can be placed inside a cache filter, the cache automatically updates the pipeline if the generated data does not exist, then saves the pipeline output to disk. • Typical usage • particlePipeline->SetTimeStep(CurrentTimeStep); • particlePipeline->SetDataFilePattern(“name_%04i”); • particlePipeline->SetDataDirectory(“\data\sph”); • particlePipeline->SetCacheDirectory(“\cache\sph”); • particlePipeline->SetCacheFilePattern("Particles"); • particlePipeline->SetCacheInput(ensightReader); • particlePipeline->SetDeepCache(1); • particlePipeline is then used around like any vtk Filter and files are stored/fetched transparently vtkFileCachePipeline : CSCS

More Related