<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>It looks like this should work.</div><div><br></div><div>What OS, compiler, architecture are you using? How much memory is on the system you are using?</div><div><br></div><div>We need to narrow down where the problem is occurring. Here are some suggestions to track down and to figure out where the problem is:</div><div><br></div><div>Your though of switching to a ImageFileWirter is reasonable. My goto format it mha, as I have written the most tests for that IO, and have the highest confidence there.</div><div><br></div><div>Does this pipeline work with smaller data? Perhaps just run your data through the BInShrinkFilter in stead of Median?</div><div><br></div><div>I have used most of these filters with large data, and expect them to work very well. But I have not used the ScalarImageKmeans so much. Try replacing it with the MultiOtsu.</div><div><br></div><div>Also write out some intermediate image to see where the image processing is going awry.</div><div><br></div><div>Hope that helps,</div><div>Brad</div><div><br><div><div>On Jan 26, 2015, at 3:44 AM, gmail <<a href="mailto:elena.bresciani87@gmail.com">elena.bresciani87@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi everybody,<div class=""><br class=""></div><div class="">I’m having issues with a project that requires using 3D datasets up to 4-5 GB without subsampling. </div><div class="">The pipeline is something like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-family: Menlo;" class="">ImageFileReader -> IntensityWindowingImageFilterType -> MedianImageFilter -> ScalarImageKmeansImageFilter -> RelabelComponentImageFilter -> RescaleIntensityImageFilter -> ImageSeriesWriter</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px;" class="">I was getting std::bad_alloc error but I solved this problem with  <span style="font-family: Menlo;" class="">-> ReleaseDataFlagOn() </span>for each filter of the pipeline. </div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">My code runs well till the end and all the images of the output stack are written but after only 170 images (of a total of 1990) are written correctly whilst the others have only black pixels.</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Any guess on what could be the problem? Maybe I should use ImageFileWriter instead of ImageSeriesWriter?</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Best regards</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Elena</div></div>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>