<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi<br> 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. <br><br>Here's the code I'm using :<br><br><div style="margin-left: 40px; font-style: italic;">var reader = pv.OpenDataFile({filename : "test.vtk"}); <br> var view1 = pv.CreateIfNeededRenderView();<br> pv.Render();<br> <br> var sliceFilter = pv.Slice({Input : reader});<br> sliceFilter.SetSliceNormal = [0,0,1]; // sliec along Z<br>
sliceFilter.SetSliceOrigin = [0,0,0];<br> sliceFilter.SetSliceType = 'Plane';<br>// sliceFilter.SetInputBounds = pv.GetDataInformation.Bounds;<br><br> var sr = pv.CreateBindedWidget({proxy : sliceFilter.getSliceType(), view : view1});<br> sr.setPlaceWidget(reader.Bounds);<br> sr.setEnabled(1);<br> sr.setVisibility(1);<br><br> var dataRep1 = pv.Show({proxy : sliceFilter});<br> <br><br> pv.SetDisplayProperties( {<br> proxy : sliceFilter,<br> view : view1,<br> Representation : 'Surface',<br> } );<br><br></div>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.<br><br>Thanks in advance<br>Raj<br><div style="font-style:
italic;"><br></div></td></tr></table>