<div dir="ltr">David,<div><br></div><div>Yes I did read it (several times).  </div><div><br></div><div>"<span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px">Reduces the image extent of the input.</span></div>
<p style="font-size:14px;line-height:22px;font-family:Roboto,sans-serif;color:rgb(0,0,0)"><a class="" href="http://www.vtk.org/doc/nightly/html/classvtkImageClip.html" title="Reduces the image extent of the input. " style="color:rgb(70,101,162);font-weight:bold">vtkImageClip</a> will make an image smaller. The output must have an image extent which is the subset of the input. The filter has two modes of operation: 1: By default, the data is not copied in this filter. Only the whole extent is modified. 2: If ClipDataOn is set, then you will get no more that the clipped extent."</p>
<p style="font-size:14px;line-height:22px;font-family:Roboto,sans-serif;color:rgb(0,0,0)">I can't say I completely understand.  If ClipDataOn is not set, then what does this filter do (nothing?)?</p><div>My understanding was that this extent metadata flowed down the pipeline; if it doesn't work that way then I'm still confused.</div>

<div>Imagine I have a series of filters, I now have to pass this information into each of them (since they should each only be filtering valid data), keeping track of what's connected to what in a dynamic system, when I was just hoping to join one filter into the next.  Exactly the sort of thing that the information flow was supposed to achieve, I thought.  I don't really see why the volume viewer can't get the whole extent from its info object and set <span style="font-family:arial,sans-serif;font-size:13px">SetCroppingRegionPlanes on itself.  You're sayiing this is normal behaviour and not a bug, it's a deficiency of the clipper, but in this case I don't see what use the clipper is.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Please can you explain, when you say that the clipper "..</span><span style="font-family:arial,sans-serif;font-size:13px"> simply modifies the WholeExtent in the </span><span style="font-family:arial,sans-serif;font-size:13px">image information instead of actually clipping the data.", what is it that it could do to clip the data?  What information carries the valid volume, if not the whole extent?  I'm going to be writing my own 3D filters soon and I need to understand this stuff.  (And yes, I am working my way through the two books, but I can't sit at work and read them!).</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Many thanks,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Richard</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 April 2014 16:38, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Richard,<div><br></div><div>Did you read the doxygen web page for vtkImageClip before posting your question?</div>
<div><br></div><div>If your intent is simply to crop the volume rendering, then you can apply the cropping in the mapper (using vtkVolumeMapper::SetCroppingRegionPlanes()) instead of using a filter to crop the data beforehand.</div>


<div><br></div><div>In general, my advice is to just try different ways of doing the cropping until you find out which way gives the best performance.</div><div><br></div><div>  David</div><div><br></div></div><div class="gmail_extra">


<br><br><div class="gmail_quote">On Fri, Apr 11, 2014 at 9:21 AM, Richard Whitehead <span dir="ltr"><<a href="mailto:richard.whitehead@vivosight.com" target="_blank">richard.whitehead@vivosight.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">David,<div><br></div><div>Thanks very much for replying.  The filter is actually doing exactly what I want - I don't want the data to be altered or reallocated, I just want to mark its extent as reduced.  It sounds like it should be doing a bit more ("<span style="font-family:arial,sans-serif;font-size:13px">physically clipping the Extent"?) </span>and then the upstream filters would understand, is that correct?</div>



<div><br></div><div>Can you advise whether I should instead use another filter (such as vtkImageReslice or vtkExtractVOI), or would it be better to continue with what I have done which is to remember the clipping in my app?  Performance is an issue here, the extent may be updated several times a second, and the memory volume is reasonably large.</div>



<div><br></div><div>Many thanks,</div><div><br></div><div>Richard</div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On 11 April 2014 13:49, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Richard,<br>
<br>
The vtkImageClip filter performs what I consider to be an undesirable<br>
optimization, by default it simply modifies the WholeExtent in the<br>
image information instead of actually clipping the data.  See the<br>
doxygen page on this filter for more info.<br>
<br>
The volume mappers generally ignore the WholeExtent, instead what<br>
they do is ask the pipeline to update the whole image, and then they<br>
render whatever data is present.  Since vtkImageClip only modifies the<br>
WholeExtent info, without physically clipping the Extent, the effects<br>
of vtkImageClip are ignored.<br>
<br>
I do not consider this to be a bug in the volume mappers.  I consider<br>
it to be an unwise optimization in vtkImageClip that does something<br>
that is unexpected not only to users, but also to downstream filters<br>
and mappers.<br>
<br>
  David<br>
<br>
On Fri, Apr 11, 2014 at 4:28 AM, Richard Whitehead<br>
<<a href="mailto:richard.whitehead@vivosight.com" target="_blank">richard.whitehead@vivosight.com</a>> wrote:<br>
><br>
> This looks like a bug in VTK?<br>
><br>
> I'm visualising a memory volume (vtkImageData) which is then connected to a<br>
> vtkImageClip so that only the valid parts of the volume are rendered.<br>
><br>
> Connecting that clipper into a vtkImageViewer2 to view slices works fine;<br>
> the invalid part of a slice is clipped off.<br>
><br>
> But connecting that same clipper into a vtkSmartVolumeMapper, which is set<br>
> as the mapper of a vtkVolume, the display always shows the whole extent of<br>
> my memory volume, ignoring the clipping.<br>
> I have set CroppingOn on the mapper, no effect.<br>
><br>
> If I set the mapper's clipping region with SetCroppingRegionPlanes then it<br>
> clips as expected, but I would have expected the mapper to take notice of<br>
> the "whole region" given by the clipper without me having to pass the clip<br>
> information around my program myself.<br>
><br>
> Please can someone tell me if this is wrong, or if not for now perhaps a<br>
> cheat so I can get the clipping region from the clipper and set it on the<br>
> mapper.<br>
><br>
> Many thanks,<br>
><br>
> Richard<br>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div dir="ltr"><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif">Richard Whitehead </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">–</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> Senior Imaging Engineer</span></p>



<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">Michelson Diagnostics Ltd</span></b></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">



<b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">M:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> <a href="tel:%2B44%20%280%297905%20955276" value="+447905955276" target="_blank">+44 (0)7905 955276</a>   </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">T:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> <a href="tel:%2B44%20%280%2920%208308%201695" value="+442083081695" target="_blank">+44 (0)20 8308 1695</a></span></p>



<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">E: </span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240)"><a href="mailto:richard.whitehead@vivosight.com" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(0,176,240)">richard.whitehead@vivosight.com</span></a></span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif">   </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">W:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> </span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240)"><a href="http://www.vivosight.com/" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(0,176,240)">www.vivosight.com</span></a></span></p>



<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><a href="http://www.vivosight.com/" target="_blank"><span style="color:windowtext;text-decoration:none"><img src="https://sites.google.com/a/vivosight.com/logo/_/rsrc/1361922206747/home/VivoSight.png" border="0"></span></a></p>



<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">



<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray">Michelson Diagnostics Ltd, 1 Grays Farm Production Village, Grays Farm Road, Orpington, Kent  BR5 3BD, UK</span></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">



<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray">Registered Office: 3 Shearwater, Maidstone, ME16 0DW.     Registered in England No. 5732681</span></p></div>
</div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif">Richard Whitehead </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">–</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> Senior Imaging Engineer</span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">Michelson Diagnostics Ltd</span></b></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">
<b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">M:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> +44 (0)7905 955276   </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">T:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> +44 (0)20 8308 1695</span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">E: </span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240)"><a href="mailto:richard.whitehead@vivosight.com" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(0,176,240)">richard.whitehead@vivosight.com</span></a></span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif">   </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143)">W:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif"> </span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240)"><a href="http://www.vivosight.com/" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(0,176,240)">www.vivosight.com</span></a></span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><a href="http://www.vivosight.com/" target="_blank"><span style="color:windowtext;text-decoration:none"><img src="https://sites.google.com/a/vivosight.com/logo/_/rsrc/1361922206747/home/VivoSight.png" border="0"></span></a></p>
<p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt"></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">
<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray">Michelson Diagnostics Ltd, 1 Grays Farm Production Village, Grays Farm Road, Orpington, Kent  BR5 3BD, UK</span></p><p style="color:rgb(80,0,80);font-family:Calibri;margin:0cm 0cm 0.0001pt">
<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray">Registered Office: 3 Shearwater, Maidstone, ME16 0DW.     Registered in England No. 5732681</span></p></div>
</div>