<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0dcc0>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Dear all: </FONT></DIV>
<DIV><FONT face=Arial size=2> I use
vtkImageReslice to get the 3 orthogonal views of a 3D image. For axial, sagittal
and coronal image I use 3</FONT></DIV>
<DIV><FONT face=Arial size=2>imagereslicer to get the image slice respectively.
Then I change the image slice index interactively by </FONT></DIV>
<DIV><FONT face=Arial size=2>adding or substracting the slice_index_x,
slice_index_y and slice_index_z by 1 then use the
axial->SetResliceAxesOrigin(0,0,this->slice_index_z) etc functions
to refresh the new slice images. </FONT><FONT face=Arial size=2>there
is no problem with </FONT><FONT face=Arial size=2>the image displayed, the speed
for the axial and </FONT><FONT face=Arial size=2>coronal slices are quite ok
when I add or substract the image index by 1, but the speed for the sagittal
slice is much more slower then axial and coronal slices. is there any reason for
this? Here is the code segment for this. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>void CDeformView::Addactors()</FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV><FONT face=Arial
size=2> axial=vtkImageReslice::New();<BR> axial->SetInput(imageData);<BR> axial->SetResliceAxesOrigin(0,0,0);<BR> axial->SetOutputDimensionality(2);<BR> axial->SetOutputSpacing(1,1,voxel_size_z);<BR> axial->InterpolateOn();<BR> axial->SetResliceAxesDirectionCosines(1,
0,
0,<BR>
0, 1,
0,<BR>
0, 0,
1);<BR> axial_mapper=vtkImageMapper::New();<BR> axial_mapper->SetInput(axial->GetOutput());<BR> axial_mapper->SetColorWindow(255);<BR> axial_mapper->SetColorLevel(127.5);<BR> vtkActor2D
*axial_actor=vtkActor2D::New();<BR> axial_actor->SetMapper(axial_mapper);<BR> axial_actor->SetPosition(interval,interval);<BR> this->Renderer->AddActor(axial_actor);<BR></FONT></DIV>
<DIV><FONT face=Arial
size=2> sagittal=vtkImageReslice::New();<BR> sagittal->SetInput(imageData);<BR> sagittal->SetOutputDimensionality(2);<BR> sagittal->InterpolateOn();<BR> sagittal->SetResliceAxesOrigin(0,0,0);<BR> sagittal->SetOutputSpacing(1,1,voxel_size_x);<BR> sagittal->SetResliceAxesDirectionCosines(0,0,-1,<BR>
0,1,0,<BR>
1,0,0);<BR> sagittal_mapper =
vtkImageMapper::New();<BR> sagittal_mapper->SetInput(sagittal->GetOutput());<BR> sagittal_mapper->SetColorWindow(255);<BR> sagittal_mapper->SetColorLevel(127.5);<BR> vtkActor2D
*sagittal_actor=vtkActor2D::New();<BR> sagittal_actor->SetMapper(sagittal_mapper);<BR> sagittal_actor->SetPosition(2*interval+(width-1)*voxel_size_x,interval);<BR> this->Renderer->AddActor(sagittal_actor);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </DIV>
<DIV> coronal=vtkImageReslice::New();<BR> coronal->SetInput(imageData);<BR> coronal->SetResliceAxesOrigin(0,0,0);<BR> coronal->SetOutputDimensionality(2);<BR> coronal->InterpolateOn();<BR> coronal->SetOutputSpacing(1,1,voxel_size_y);<BR> coronal->SetResliceAxesDirectionCosines(1,0,0,<BR>
0,0,1,<BR>
0,-1,0);<BR> coronal_mapper =
vtkImageMapper::New();<BR> coronal_mapper->SetInput(coronal->GetOutput());<BR> coronal_mapper->SetColorWindow(255);<BR> coronal_mapper->SetColorLevel(127.5);<BR> vtkActor2D
*coronal_actor=vtkActor2D::New();<BR> coronal_actor->SetMapper(coronal_mapper);<BR> coronal_actor->SetPosition((depth-1)*voxel_size_z+(width-1)*voxel_size_x+3*interval,<BR>
interval+((height-1)*voxel_size_y-(depth-1)*voxel_size_z)/2);<BR> this->Renderer->AddActor(coronal_actor);<BR>}</DIV>
<DIV><BR>void CDeformView::OnSliceAxialup()
<BR>{<BR> this->slice_index_z++;<BR> axial->SetResliceAxesOrigin(0,0,this->slice_index_z);<BR> this->InvalidateRect(NULL,FALSE);<BR>}</DIV>
<DIV> </DIV>
<DIV>void CDeformView::OnSliceAxialdown()
<BR>{<BR> this->slice_index_z--;<BR> axial->SetResliceAxesOrigin(0,0,this->slice_index_z);<BR> this->InvalidateRect(NULL,FALSE);</DIV>
<DIV> </DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>void CDeformView::OnSliceSagittalup()
<BR>{<BR> this->slice_index_x++;<BR> sagittal->SetResliceAxesOrigin(this->slice_index_x,0,0);<BR> this->InvalidateRect(NULL,FALSE);<BR>}</DIV>
<DIV> </DIV>
<DIV>void CDeformView::OnSliceSagittaldown()
<BR>{<BR> this->slice_index_x--;<BR> sagittal->SetResliceAxesOrigin(this->slice_index_x,0,0);<BR> this->InvalidateRect(NULL,FALSE);<BR>}</DIV>
<DIV> </DIV>
<DIV>void CDeformView::OnSliceCoronalup()
<BR>{<BR> this->slice_index_y++;<BR> coronal->SetResliceAxesOrigin(0,this->slice_index_y,0);<BR> this->InvalidateRect(NULL,FALSE);<BR>}</DIV>
<DIV> </DIV>
<DIV>void CDeformView::OnSliceCoronaldown()
<BR>{<BR> this->slice_index_y--;<BR> coronal->SetResliceAxesOrigin(0,this->slice_index_y,0);<BR> this->InvalidateRect(NULL,FALSE);<BR>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>regards,</DIV>
<DIV>zhang zhijun</DIV></FONT></BODY></HTML>