<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.4373" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all!!!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I use vtkImageReslice to change the view on a set
of 348 slices in order to get coronal or sagital views...</FONT></DIV>
<DIV><FONT face=Arial size=2>My code is :</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkRenderer *renderer;<BR>vtkTIFFReader
*noduleReader;<BR>vtkImageMapper *noduleMapper;<BR>vtkImageActor
*noduleActor;<BR>noduleReader = vtkTIFFReader::New();<BR>noduleMapper =
vtkImageMapper::New();<BR>renderer = vtkRenderer::New();<BR>noduleActor =
vtkImageActor::New();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR>noduleMapper->SetColorWindow(255.0); //
Width -- We are working in 8 bits...<BR>noduleMapper->SetColorLevel(255.0/2);
// Center</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>noduleReader->SetFilePrefix("..........");<BR> <BR>noduleReader->SetFilePattern("%s%.4d.tif");<BR>noduleReader->SetFileNameSliceOffset(1);<BR>noduleReader->SetDataExtent(0,511,0,511,0,347);<BR>noduleReader->SetDataSpacing(1,1,0.0);<BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> // reslice</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkImageReslice *reslice =
vtkImageReslice::New();<BR>reslice->SetInput(noduleReader->GetOutput());</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>reslice->SetResliceAxesDirectionCosines(1,0,0,
0,0,1, 0,1,0); // exchange y and z<BR><A
href="file://reslice-"></A>reslice->SetOutputSpacing(1, 1,
1);<BR>reslice->SetOutputExtent(0,511,0,511,0,347);<BR></FONT></DIV>
<DIV><FONT face=Arial
size=2>noduleActor->SetInput(reslice->GetOutput());<BR>noduleActor->SetDisplayExtent(0,511,0,511,0,347);<BR>noduleActor->SetZSlice(300);<BR> <BR>renderer->AddActor(noduleActor);</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>It works well (I get the 300th slice when I don't
use reslice) but I have a black screen using <FONT face=Arial
size=2>reslice->SetResliceAxesDirectionCosines(1,0,0, 0,0,1, 0,1,0); for
exchanging y and z axes. I would want to see all my slices but
</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>It is possible that it is due to the camera which
has no more a view on the new object...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Can anyone help me please?????</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Matei</FONT></DIV></BODY></HTML>