Skip to content

Commit

Permalink
Merge pull request #27 from Kitware/add-cdf-charts
Browse files Browse the repository at this point in the history
fix(CDF): Add Viewer for CDF dataset
  • Loading branch information
jourdain committed Sep 22, 2017
2 parents d052e22 + 12b1009 commit 1751628
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 210 deletions.
96 changes: 48 additions & 48 deletions dist/viewer.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions lib/types/CDF.js
@@ -0,0 +1,17 @@
import contains from 'mout/src/array/contains';
import ChartBuilder from 'paraviewweb/src/Rendering/Chart/CDFChartBuilder';

export default function build({ basepath, viewer, dataType }) {
// Can we handle the data
if (!contains(dataType, 'cdf')) {
return false;
}

viewer.ui = 'ChartViewer';
viewer.allowMagicLens = false;
viewer.chartBuilder = new ChartBuilder(viewer.queryDataModel);

viewer.queryDataModel.fetchData();

return true;
}
2 changes: 2 additions & 0 deletions lib/types/index.js
Expand Up @@ -20,6 +20,7 @@ import ViewerM from './VTKGeometry';
import ViewerN from './VTKVolume';
import ViewerO from './VTKVolumeSLIC';
import ViewerP from './VTKVolumeSLICDebug';
import ViewerQ from './CDF';

const dataViewers = [
ViewerA,
Expand All @@ -38,6 +39,7 @@ const dataViewers = [
ViewerN,
ViewerO,
ViewerP,
ViewerQ,
];

const lookupTableManager = new LookupTableManager();
Expand Down

0 comments on commit 1751628

Please sign in to comment.