[vtkusers] vtkResliceImage and appending slices

zarko.milosevic zarko at kg.ac.rs
Wed Sep 3 09:38:40 EDT 2014

Hi David,

Some basic intro:

I first create one 3D vtkParametricSpline that goes through volume (DICOM
image stack). You can consider that spline as central line of some blood
In one loop I got through all points and create Directional vectors by
subtracting (i+1)th point from ith point ofthe spline.
Next I create 4x4 matrix (re-slice axes) based on that directional vector
and two vectors perpendicular to directional one. Actually I create
coordinate frame based on that three vectors.
Every iteration of the loop ends with new re-slice axes and new oblique

What I want is to merge those slices in one new 3D image which a will on the
end slice it with vtkImageReslice.

Here is some code:
// vtkResliceImage initialization
	_imageReslice = vtkSmartPointer<vtkImageReslice>::New();

	vtkSmartPointer<vtkLookupTable> lut =
	lut->SetRange(0, 255);
	lut->SetValueRange(0.0, 1.0);
	lut->SetSaturationRange(0.0, 0.0);

	vtkSmartPointer<vtkImageMapToColors> colorMapper =    


	_actorImage = vtkSmartPointer<vtkImageActor>::New();
	_renderer = vtkSmartPointer<vtkRenderer>::New();

// Iteration through spline - this is part of from some other method
	vtkSmartPointer<vtkMatrix4x4> axes = null;
	axes = GetViewAxes();
		axes = GetViewAxes(); // in this method I calculate re-slice axes

// Here after every iteration I get new oblique slice. What I want is to
join all slices together in
// one new 3d image which will be input for new vtkImageReslice object.

View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5728555.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list