MEMORY ALLOCATION error

Dear all,

I try this function for vessel segmentation but it get an error of bad memory allocation. I see it is not a streaming funcion. Is there any way to use it without resizing my volume?.

Thanks

using HessianFilterType = itk::HessianRecursiveGaussianImageFilter< ImageType >;
HessianFilterType::Pointer hessianFilter = HessianFilterType::New();
hessianFilter->SetInput(reader->GetOutput());


// filter settings
hessianFilter->SetSigma(1.0);

// create hessian vesselness filter
typedef itk::Hessian3DToVesselnessMeasureImageFilter<signed short> VesselnessMeasureFilterType;
VesselnessMeasureFilterType::Pointer vesselnessFilter = VesselnessMeasureFilterType::New();

// filter settings
vesselnessFilter->SetAlpha1(0.5);
vesselnessFilter->SetAlpha2(2.0);

// connect input of vesselness filter to output of hessian filter
vesselnessFilter->SetInput(hessianFilter->GetOutput());


vesselnessFilter->Update();

Streaming is not done by default. You have to request it. Here is an example.

The HessianRecursiveGaussianImageFilter is not streamable. Please look at HessianImageFilter in the remote module SimpleITKFilters. It uses central differences to compute the Hessian and is more memory efficient.