<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">I build a pipeline as below,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">//read dicom series</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> this->dicomReader->SetImageIO(
itk::GDCMImageIO::New() );</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> this->dicomReader->SetFileNames(
fileNames ); <BR> this->dicomReader->Update();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"> this->itkImage3D =
dicomReader->GetOutput();<BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Bookman Old Style"> //convert itk image with short
type to vtk image<BR> this->connectorMRI =
ConnectorType::New();<BR> this->connectorMRI->SetInput(this->dicomReader->GetOutput());<BR> try<BR> {
<BR> this->connectorMRI->Update();<BR> }<BR> catch(
itk::ExceptionObject & excp )<BR> {<BR> std::cerr <<
"Error reading the series " << std::endl;<BR> std::cerr
<< excp << std::endl;<BR> }<BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Bookman Old Style"> //shift the image from short to
unsigned short for visualization using vtk<BR> vtkImageShiftScale
*shift =
vtkImageShiftScale::New();<BR> shift->SetInput(this->connectorMRI->GetOutput());<BR> shift->SetScale(1);</FONT></DIV>
<DIV><FONT
face="Bookman Old Style"> shift->SetOutputScalarTypeToUnsignedShort();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">//generate a volume actor</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> this->volume =
this->GenerateVolumeRenActor(shift->GetOutput());</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Using above pipeline I can render the dicom
series correctly. However, when I change the itkImage3D, for
example,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">short *image =
this->itkImage3D->GetBufferPointer();</FONT></DIV>
<DIV><FONT face="Bookman Old Style">ImageType_Short::RegionType region =
this->itkImage3D->GetBufferedRegion();<BR>const unsigned int numberOfPixel
= region.GetNumberOfPixels();</FONT></DIV>
<DIV><FONT face="Bookman Old Style">for(int i = 0; i < numberOfPixel ;
i++)</FONT></DIV>
<DIV><FONT face="Bookman Old Style">
image[i] = i;</FONT></DIV>
<DIV><FONT
face="Bookman Old Style">this->itkImage3D->Modified();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">The pipeline can not update and the volume
is sama as the old one.</FONT></DIV>
<DIV><FONT face="Bookman Old Style">Only when I change
the vtkImage, namely the output of the shift, the volume change. I
guess the pipelien can not update although the itk filter modified.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Regards,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"> </DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV></BODY></HTML>