# How to Highlight the specified area on the slices obtained by VTKImageReslices

Actually, I consider this matter as a problem of coordinate transformation.
What I want is to highlight the specified area like lesion on the CT.

This is easy to achieve while the CT is normal like this
http://vtk.1045678.n5.nabble.com/file/t342766/1P%401%4046%24T__%40HL}%T%UUYSL.png

``````        SetElement(0, 0, _resliceMatrix, 1);
SetElement(0, 1, _resliceMatrix, 0);
SetElement(0, 2, _resliceMatrix, 0);

SetElement(1, 0, _resliceMatrix, 0);
SetElement(1, 1, _resliceMatrix, 1);
SetElement(1, 2, _resliceMatrix, 0);

SetElement(2, 0, _resliceMatrix, 0);
SetElement(2, 1, _resliceMatrix, 0);
SetElement(2, 2, _resliceMatrix, 1);

SetElement(3, 0, _resliceMatrix, 44);
SetElement(3, 1, _resliceMatrix, 143);
SetElement(3, 2, _resliceMatrix, 81);
SetElement(3, 3, _resliceMatrix, 1);
``````

However I have to use vtkimagereslice to get some special effect like this,
so I changed the direction of three axis like below
<http://vtk.1045678.n5.nabble.com/file/t342766/Z%28%7E%5DJ%5D%5DH%24_Y69HQZ9XAY7%5B2.png>

``````        SetElement(0, 0, _resliceMatrix, 16 / Math.Sqrt(378));
SetElement(0, 1, _resliceMatrix, -11 / Math.Sqrt(378));
SetElement(0, 2, _resliceMatrix, -1 / Math.Sqrt(378));

SetElement(1, 0, _resliceMatrix, -2 / Math.Sqrt(14));
SetElement(1, 1, _resliceMatrix, -3 / Math.Sqrt(14));
SetElement(1, 2, _resliceMatrix, 1 / Math.Sqrt(14));

SetElement(2, 0, _resliceMatrix, 1 / Math.Sqrt(27));
SetElement(2, 1, _resliceMatrix, 1 / Math.Sqrt(27));
SetElement(2, 2, _resliceMatrix, 5 / Math.Sqrt(27));

SetElement(3, 0, _resliceMatrix, 44);
SetElement(3, 1, _resliceMatrix, 143);
SetElement(3, 2, _resliceMatrix, 81);
SetElement(3, 3, _resliceMatrix, 1);
``````

So the key problem is that I have known the position (x,y,z) of lesion, How
can I get the lesion position in the picture after the rotation and
translation by VTKImageReslice. I have tried to use the _resliceMatrix but
it doesn’t work, the new point(x’,y’,z’) I got is wrong .

``````        vtkImageData resliced = imageReslice.GetOutput();
_Image = ImageData2Bitmap(resliced, 1600, -400);
``````

And I’ve got another situation, after the code above, I found the position I
need acctually is the Drawing Coordinate System.
<http://vtk.1045678.n5.nabble.com/file/t342766/Z%28%7E%5DJ%5D%5DH%24_Y69HQZ9XAY7%5B2.png>

If I highlight the position (0,0), it will highlight the left corner of the
image.

This has bothered me for one week, any help will be appreciated ！！