I want to get slices from a volume along a curve with points with vtkimagereslice and get a slice centered in each point and the orientation according to the orientation of these 2 points. The problem is when i define the z as a normal of the plane between x and y. The slice obtained does not make sense but if i do not define z it works excellent. Someone knows how can i define z to obain the same but with thickness. I would like to have z defined in depth z in the output coordinates (y in the original).
Thanks in advance
center_slice[0] = pts1[0] + (pts2[0] - pts1[0]) / 2;
center_slice[1] = pts1[1] + (pts2[1] - pts1[1]) / 2;
center_slice[2] = pts1[2] + (pts2[2] - pts1[2]) / 2;
reslice->SetOutputExtent(ext);
reslice->SetOutputOrigin(center_slice[0], center_slice[1],
center_slice[2]);
reslice->UpdateInformation();
//We want plane tangent to the curve
double perpendicular[3] = { (pts2[0] - pts1[0]),(pts2[1] -
pts1[1]),(pts2[2] - pts1[2]) };
perpendicular[2] = 0;
double *normalizedX = perpendicular;
vtkMath::Normalize(normalizedX);
//Height
double perpendicular2[3] = { 0,0,-1 };
double *normalizedY = perpendicular2;
perpendicular2[1] = 0;
vtkMath::Normalize(normalizedY);
//THE PROBLEM if i add the perpendicular of vector x and y i get something it does not
//make sense. Like this it works but i do not get thickness
double normalizedZ[3];
normalizedZ[0] = 0;
normalizedZ[1] = 0;
normalizedZ[2] = 0;
}