Hi I am trying to add a simple slice filter to a ParaviewWeb client that users could use interact with a volume. The bundled PWApp application does this already and so I tried to go through the code and looked at some Python examples. I was able to get an interactive widget to render but it shows a blank slice. Also the bounds are not correct since the volume is 'flat' and what I see is a cube.
Here's the code I'm using :
var reader = pv.OpenDataFile({filename : "test.vtk"});
var view1 = pv.CreateIfNeededRenderView();
pv.Render();
var sliceFilter = pv.Slice({Input : reader});
sliceFilter.SetSliceNormal = [0,0,1]; // sliec along Z
sliceFilter.SetSliceOrigin = [0,0,0];
sliceFilter.SetSliceType = 'Plane';
// sliceFilter.SetInputBounds = pv.GetDataInformation.Bounds;
var sr = pv.CreateBindedWidget({proxy : sliceFilter.getSliceType(), view :
view1});
sr.setPlaceWidget(reader.Bounds);
sr.setEnabled(1);
sr.setVisibility(1);
var dataRep1 = pv.Show({proxy : sliceFilter});
pv.SetDisplayProperties( {
proxy : sliceFilter,
view : view1,
Representation : 'Surface',
} );
I'm attaching a screenshot of what's rendered in my browser. I'm obviously not
setting some property correctly .. I just can't tell which one.
Thanks in advance
Raj
<<attachment: Screenshot.png>>
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
