vtkMarchingCube error...

I’ve attached the code I wrote below.

I want to know the reason. No problem with 64bit, but with 32bit the same problem.
SkinExtractor-> SetValue (0, value); Set the value value to 250.0.

vtkSmartPointer<vtkNamedColors> colors = vtkSmartPointer<vtkNamedColors>::New();

	std::array<unsigned char, 4> skinColor{ { 255, 125, 65 } };
	colors->SetColor("SkinColor", skinColor.data());

	// An isosurface, or contour value of 500 is known to correspond to
	// the skin of the patient.
	// The triangle stripper is used to create triangle
	// strips from the isosurface; these render much faster on may
	// systems.
	vtkSmartPointer<vtkMarchingCubes> skinExtractor = vtkSmartPointer<vtkMarchingCubes>::New();
#ifdef FLIP
	skinExtractor->SetValue(0, value);	// 0 ~ 500

	vtkSmartPointer<vtkStripper> skinStripper = vtkSmartPointer<vtkStripper>::New();

You have run out of memory. You can crop and/or resample or filter your input image to reduce number of voxels or switch to a 64-bit build.

In general, it is very hard to develop 32-bit applications for processing 3D medical images that are acquired nowadays. The limit of 2GB memory space in 32-bit applications leaves about 500-1000MB for data in a GUI application, which is not enough to keep all basic things in memory, so you would need to carefully unload anything that you don’t immediately need and maybe even implement streaming processing.

Does VTK support streaming?
What should I do to do that?


You can start with google vtk streaming, check out the VTK textbook and examples, and if you have specific questions then you may ask on this forum.

Good news. I’ll try to search.
Thank you!