<div dir="ltr">Hi Elvis,<div><br></div><div>Yes, by using a stencil.  It requires an extra step.</div><div><br></div><div>First, you need to make a stencil with vtkImageToImageStencil.  The API of this filter is similar to vtkImageThreshold, but instead of outputting a vtkImageData, it outputs a vtkImageStencilData.  The vtkImageStencilData object is a run-length compressed binary image, i.e. it is a mask.</div><div><br></div><div>Second, you need to pass the stencil to vtkImageHistogramStatistics via the SetStencilConnection() method or via the SetStencilData() method.</div><div><br></div><div>The result: the stats are only computed for the voxels that are inside the stencil.</div><div><br></div><div> - David</div><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 2, 2016 at 8:10 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.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"><div><div>I'd like to use vtkImageHistogramStatistics to compute min, max, mean, std et.c, but exclude values in the input image that fall below a certain threshold. Is this possible somehow?<br><br></div>Thanks,<br></div>Elvis<br></div>
</blockquote></div><br></div></div></div>