[vtkusers] Crash when I use the Padder

James Carroll mrmaple at gmail.com
Mon Oct 3 14:04:52 EDT 2005


Hello, I have a pipeline where I am doing a Reslice on a small volume
of interest from a large stack.    VTK50 (CVS as of today)  on Windows
XP.

I want to be able to do the reslice on stacks that are smaller than my
(fixed size) region of interest, and also in cases where the region of
interest is near the edges of my stack.

vtkStack -> vtkImageConstantPad -> vtkExtractVOI -> vtkImageReslice

When I'm doing this on a relatively small stack (512 x 512 x 27)  I
pad to add 32 pixels in all six directions, then reslice out a
64x64x64 cube...  it works great!

When I try the same thing with a larger stack  (512 x 480 x 301) I get
a crash unless I comment out the padder.

I'm about to link with the debug version of VTK to start tracing it
through... but if anyone has any ideas how I could avoid this crash, I
would appreciate it very much.

The crash happens when I do a Reslice->Update()

I can avoid the crash if I do a padder->Update() (but this creates a
huge delay since it makes a padded copy of the stack.)

Below is my error, vtkImageConstantPad code.  & my stack trace.

Thanks,
-Jim

------------------
Unhandled exception at 0x0123e041 in Neurolucida.exe: 0xC0000005:
Access violation reading location 0xffbff084.

--------------------


	int extents[6];
	pStack->GetWholeExtent(extents);
	vtkImageConstantPad *padder = vtkImageConstantPad::New();
	padder->SetInput(pipe);
	padder->SetConstant(20);
	padder->SetOutputNumberOfScalarComponents(1);
	padder->SetOutputWholeExtent( extents[0] - halfOutputSize, extents[1]
+ halfOutputSize,
									extents[2] - halfOutputSize, extents[3] + halfOutputSize,
									extents[4] - halfOutputSize, extents[5] + halfOutputSize);
	// possible bugfix?
	//padder->Update();

	pipe = padder->GetOutput();

-----------------------
 	vtkFiltering.dll!0123e041() 	
 	vtkFiltering.dll!01240dad() 	
 	vtkFiltering.dll!0124fc9f() 	
 	vtkFiltering.dll!0124346b() 	
 	vtkFiltering.dll!0124373f() 	
 	vtkImaging.dll!01963ec3() 	
 	vtkFiltering.dll!01277f9e() 	
 	vtkFiltering.dll!0124b52e() 	
 	vtkFiltering.dll!012f6704() 	
 	vtkFiltering.dll!01247739() 	
 	vtkFiltering.dll!01249512() 	
 	vtkFiltering.dll!012f5991() 	
 	vtkFiltering.dll!0124e7a1() 	
 	vtkFiltering.dll!012494d9() 	
 	vtkFiltering.dll!012f5991() 	
 	vtkFiltering.dll!0124e7a1() 	
 	vtkFiltering.dll!012494d9() 	
 	vtkFiltering.dll!012f5991() 	
 	vtkFiltering.dll!01247430() 	
 	vtkFiltering.dll!01247340() 	
 	vtkFiltering.dll!012f7d37() 	
 	vtkFiltering.dll!0124a098() 	
 ->  my code where I call reslice->Update()



More information about the vtkusers mailing list