<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body 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></body></html>