How to use paraview-lite - 10 common examples

To help you get started, we’ve selected a few paraview-lite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / light-viz / src / stores / proxy.js View on Github external
.then((proxy) => {
            commit(Mutations.PROXY_DATA_SET, proxy);
            commit(Mutations.PROXY_SELECTED_IDS_SET, [proxy.id]);
            dispatch(Actions.PROXY_PIPELINE_FETCH);
            dispatch(Actions.MODULES_ACTIVE_CLEAR);

            // Make sure we pull the actual server values
            dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
          })
          .catch(console.error);
github Kitware / light-viz / src / stores / proxy.js View on Github external
.then((proxy) => {
            commit(Mutations.PROXY_DATA_SET, proxy);
            commit(Mutations.PROXY_SELECTED_IDS_SET, [proxy.id]);
            dispatch(Actions.PROXY_PIPELINE_FETCH);
            dispatch(Actions.MODULES_ACTIVE_CLEAR);

            // Make sure we pull the actual server values
            dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
          })
          .catch(console.error);
github Kitware / light-viz / src / stores / proxy.js View on Github external
.then((proxy) => {
            commit(Mutations.PROXY_DATA_SET, proxy);
            commit(Mutations.PROXY_SELECTED_IDS_SET, [proxy.id]);
            dispatch(Actions.PROXY_PIPELINE_FETCH);
            dispatch(Actions.MODULES_ACTIVE_CLEAR);

            // Make sure we pull the actual server values
            dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
          })
          .catch(console.error);
github Kitware / light-viz / src / stores / proxy.js View on Github external
sources.forEach((proxy) => {
              commit(Mutations.PROXY_SOURCE_TO_REPRESENTATION_SET, proxy);

              // Fetch proxy data if not available
              if (!state.proxyDataMap[proxy.id]) {
                dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
              }

              // Fetch proxy name if not available
              if (!state.proxyNames[proxy.id]) {
                dispatch(Actions.PROXY_NAME_FETCH, proxy.id);
              }

              // Fetch representation data if not available
              if (!state.proxyDataMap[proxy.rep]) {
                dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.rep });
              }

              // Fetch representation name if not available
              if (!state.proxyNames[proxy.rep]) {
                dispatch(Actions.PROXY_NAME_FETCH, proxy.rep);
              }
            });
github Kitware / light-viz / src / proxyHelper.js View on Github external
function apply() {
    if (this.create) {
      return;
    }
    if (this.isNetworkBusy && !scheduledApply) {
      scheduledApply = setTimeout(() => {
        scheduledApply = null;
        apply.apply(this);
      }, 100);
    }
    if (this.isNetworkBusy < 3 && hasChange()) {
      // console.log('apply', JSON.stringify(changeSet, null, 2));
      store.dispatch(Actions.PROXY_UPDATE, changeSet);
      store.dispatch(Actions.PROXY_DATA_FETCH, {
        proxyId: this[`active${proxyType}Id`],
        needUI: false,
      });
    }
  }
github Kitware / light-viz / src / app.js View on Github external
export function createViewer(
  container,
  config = createConfigurationFromURLArgs()
) {
  const store = createStore();
  store.commit(Mutations.NETWORK_CONFIG_SET, config);
  registerModules(store);
  setInterval(() => store.dispatch(Actions.BUSY_UPDATE_PROGRESS, 1), 50);

  // Fetch preset images
  store.commit(Mutations.COLOR_PRESET_NAMES_SET, [
    'Cool to Warm',
    'Cool to Warm (Extended)',
    'Rainbow Desaturated',
    'Cold and Hot',
    'erdc_rainbow_bright',
    '2hot',
    'erdc_iceFire_H',
    'erdc_iceFire_L',
    'Inferno (matplotlib)',
  ]);

  /* eslint-disable no-new */
github Kitware / paraview-lite / src / main.js View on Github external
/**
 * Sets the active proxy configuration to be used by createViewer.
 *
 * Once createViewer() is called, setActiveProxyConfiguration will do nothing.
 * Proxy config precedence (decreasing order):
 *   createViewer param, active proxy config, Generic config
 */
function createConfigurationFromURLArgs(
  addOn = { application: 'paraview-lite' }
) {
  return Object.assign({}, vtkURLExtract.extractURLParameters(), addOn);
}

const store = createStore();
store.commit('PVL_NETWORK_CONFIG_SET', createConfigurationFromURLArgs());
registerModules(store);
setInterval(() => store.dispatch('PVL_BUSY_UPDATE_PROGRESS', 1), 50);

// Fetch preset images
store.commit('PVL_COLOR_PRESET_NAMES_SET', [
  'Cool to Warm',
  'Cool to Warm (Extended)',
  'Rainbow Desaturated',
  'Cold and Hot',
  'erdc_rainbow_bright',
  '2hot',
  'erdc_iceFire_H',
  'erdc_iceFire_L',
  'Inferno (matplotlib)',
]);

new Vue({
github Kitware / light-viz / src / components / core / RepresentationToolbar / script.js View on Github external
name,
              vectorComponent,
            ] = this.activeProxyData.colorBy.array;
            const mode =
              location && name.length && this.activeProxyData.colorBy.mode;
            this.vectorComponent = vectorComponent;

            // console.log(JSON.stringify(this.activeProxyData.colorBy, null, 2));

            if (mode !== 'array') {
              return SOLID_COLOR_ITEM;
            }

            // Fetch LookupTable for any array available
            if (!this.lookupTables[name]) {
              this.$store.dispatch(Actions.COLOR_FETCH_LOOKUP_IMAGE, name);
            }

            return {
              text: name,
              value: `${mode}${SEPARATOR}${location}${SEPARATOR}${name}`,
            };
          }
          return SOLID_COLOR_ITEM;
        },
        representationItems() {
github Kitware / light-viz / src / stores / proxy.js View on Github external
sources.forEach((proxy) => {
              commit(Mutations.PROXY_SOURCE_TO_REPRESENTATION_SET, proxy);

              // Fetch proxy data if not available
              if (!state.proxyDataMap[proxy.id]) {
                dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
              }

              // Fetch proxy name if not available
              if (!state.proxyNames[proxy.id]) {
                dispatch(Actions.PROXY_NAME_FETCH, proxy.id);
              }

              // Fetch representation data if not available
              if (!state.proxyDataMap[proxy.rep]) {
                dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.rep });
              }

              // Fetch representation name if not available
              if (!state.proxyNames[proxy.rep]) {
                dispatch(Actions.PROXY_NAME_FETCH, proxy.rep);
              }
            });
github Kitware / light-viz / src / proxyHelper.js View on Github external
function apply() {
    if (this.create) {
      return;
    }
    if (this.isNetworkBusy && !scheduledApply) {
      scheduledApply = setTimeout(() => {
        scheduledApply = null;
        apply.apply(this);
      }, 100);
    }
    if (this.isNetworkBusy < 3 && hasChange()) {
      // console.log('apply', JSON.stringify(changeSet, null, 2));
      store.dispatch(Actions.PROXY_UPDATE, changeSet);
      store.dispatch(Actions.PROXY_DATA_FETCH, {
        proxyId: this[`active${proxyType}Id`],
        needUI: false,
      });
    }
  }