[vtkusers] Position of origin in resliced plane

Ekman Kar ekman.kar at gmail.com
Wed Jun 4 03:06:02 EDT 2008


Hi, everyone,

I am using vtkReslice to generate a plane image, where I use

imagereslice->SetResliceAxesOrigin(origin_center);
VectorType v1Normalized;
VectorType v2Normalized;
VectorType v3Normalized;
...
v1Normalized = v1/v1.GetNorm();
v2Normalized = v2/v2.GetNorm();
v3Normalized = v3/v3.GetNorm();
imagereslice->SetResliceAxesDirectionCosines(
v1Normalized[0], v1Normalized[1], v1Normalized[2],
v2Normalized[0], v2Normalized[1], v2Normalized[2],
v3Normalized[0], v3Normalized[1], v3Normalized[2]);

imagereslice->SetInput(vtkImporter->GetOutput());
imagereslice->SetOutputSpacing( orgspacing[0],orgspacing[1], orgspacing[2]
);
imagereslice->SetInterpolationModeToNearestNeighbor();

int ext[6];
imagedata->GetExtent(ext);
imagereslice->SetOutputExtent( ext[0], ext[1], ext[2], ext[3], 0, 0);
imagereslice->SetOutputDimensionality(2);

I want to know the new position of origin_center, is it always in the
image center or should use a formula to compute it?

Thank you very much!

Ekman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080604/d936b61a/attachment.htm>


More information about the vtkusers mailing list