[vtkusers] help:a memory allocation error in vtkMarchingCubes!

jiang-gx jxjx at sjtu.edu.cn
Thu Oct 28 01:32:09 EDT 2004


hi! 
	i used the vktMarchingCubes for surface visualiation of a medcial image data which have  544 slices, and the data size is 512*512*544. my coputer's memeory size is 2G and is big enough.
   but a error saying--- "Cannot allocate memory\n"--- occured in the file vtkIdTypeArray.cxx  at line 181,(my vtk version is 4.2)   .

    The following codes is where the error thrown out in the file vtkIdTypeArray.cxx:
		if ( (newArray = new vtkIdType[newSize]) == NULL )
   		 {
   			 vtkErrorMacro(<< "Cannot allocate memory\n");
   			 return 0;
   		 }

   what can i do ? please help me or give me some advice !  thanks ! 

 when i only read 300 slice of the data or read some other smaller data ,the program will run successfully.  so it seemed that the 512*512*544 data the too big for  vktMarchingCubes. but i don't think it should be the course.

        jiang-gx
        jxjx at sjtu.edu.cn
          2004-10-28


More information about the vtkusers mailing list