Well, to deal with the unwanted regions when building the histogram for the Otsu threshold, I just modified the Otsu calculator to use a histogram min and max. I don't know why it doesn't have that functionality built in already...But the mask adaptor looks interesting.<div>
<br></div><div>The Otsu calculator does have a SetRegion() method. I'm just struggling to break the image into regions first. I need relatively small hypercubes. </div><div><br></div><div>I'm currently trying the Adaptive Thresholding paper:</div>
<div><br></div><div><a href="http://www.midasjournal.org/browse/publication/702">http://www.midasjournal.org/browse/publication/702</a></div><div><br></div><div>Thanks for your help</div><div><br><div class="gmail_quote">
On Tue, Jun 7, 2011 at 7:37 PM, Richard Beare <span dir="ltr"><<a href="mailto:richard.beare@gmail.com">richard.beare@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If your region can be defined by a mask there is a MaskAdaptor you can use.<br>
<br>
<a href="http://hdl.handle.net/1926/575" target="_blank">http://hdl.handle.net/1926/575</a><br>
<br>
More flexible than hypercubes, but possibly not what you're after.<br>
<br>
I thought that the OtsuThresholdImageCalculator has a SetRegion<br>
method, which should do something along the lines of what you want.<br>
However you'll need to apply the threshold separately.<br>
<div><div></div><div class="h5"><br>
On Wed, Jun 8, 2011 at 9:02 AM, Neil Panjwani <<a href="mailto:paniwani@gmail.com">paniwani@gmail.com</a>> wrote:<br>
> Hi,<br>
> I need to split my image region into several subregions (hyper cubes) to<br>
> compute a local otsu threshold. I tried using<br>
> the ImageRegionMultidimensionalSplitter, but it is buggy and produces<br>
> invalid subregions. My test image is 512x512x5 but the filter returned an<br>
> index of 0,0,6.<br>
> I'm using ITK 3.20.0. I noticed in ITKv4 that this filter was changed. When<br>
> trying it in ITKv4, however, I ran into another error in that I was unable<br>
> to read my dicom series (GDCMImageIO...: Cannot read requested file).<br>
> How do I get around these pesky problems? I do not want to move all my code<br>
> to ITKv4 in the fear that even more will break and require hours and hours<br>
> of debugging...<br>
> Does someone have code to compute a local otsu threshold?<br>
> Thanks,<br>
> Neil<br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</blockquote></div><br></div>