[vtkusers] StructuredPointsSource and ImageReslice problem
Kevin Teich
kteich at cortechs.net
Thu Feb 28 15:12:14 EST 2002
Still working on my vtkMutableStructuredPointsSource class. It's now
working as the source of a ray cast mapper, and I can make a Volume from
it without a problem. However, I am running into a problem using it as the
source for an ImageReslice. In a simple test Tcl script, it shows garbage
on the screen. In a more complex Tcl script, it causes a segfault. With
optimization off, it crashes on the line:
... Imaging/vtkImageReslice.cxx:2624
1133 F result = (rx*(ryrz*inPtr0[i00] + ryfz*inPtr0[i01] +
Is there anything I can do to diagnose this problem better? I know this
isn't helpful, but I figure something is just not being set up properly
somewhere. Here's my vtkMutableStructuredPointsSource Execute() function:
void vtkMutableStructuredPointsSource::Execute()
{
vtkStructuredPoints *output = this->GetOutput();
output->SetWholeExtent(this->ImageData->GetWholeExtent());
output->SetExtent(this->ImageData->GetExtent());
output->SetNumberOfScalarComponents
(this->ImageData->GetNumberOfScalarComponents());
output->SetSpacing(this->ImageData->GetSpacing());
output->SetOrigin(this->ImageData->GetOrigin());
output->GetPointData()->SetScalars
( this->ImageData->GetPointData()->GetScalars() );
}
Pretty standard. Here's my reslicer setup:
vtkImageReslice reslice
reslice SetInput [volumeSource GetOutput]
reslice SetOutputOrigin 0 0 0
reslice SetOutputSpacing 1 1 1
reslice SetOutputExtent 0 255 0 255 0 255
reslice SetResliceAxesDirectionCosines 0 0 1 0 1 0 1 0 0
reslice SetOutputDimensionality 3
reslice OptimizationOff
Again, these three combinations work:
CustomVolumeReader -> Volume
CustomVolumeReader -> ImageReslice
MutableStructuredPointsSource -> Volume
This one shows garbage or causes a segfault:
MutableStructuredPointsSource -> ImageReslice
Any ideas or other things I should try out? Thanks.
--
Kevin Teich
More information about the vtkusers
mailing list