<!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.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hello every one,</FONT></DIV>
<DIV><FONT size=2>I used the vtkMetaImageWriter class several times.I found that
the image header file was wrong.But when I added the Update() function
before this pipeline the writed file was right.You may not understand what
I want to say. Please refer to the following program.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>vtkMetaImageReader *reader =
vtkMetaImageReader::New();<BR> reader->SetFileName(inputFilename);<BR> <BR> vtkImageGaussianSmooth
*smooth =
vtkImageGaussianSmooth::New();<BR> smooth->SetDimensionality(3);<BR> smooth->SetStandardDeviations(0.4,0.4,0.4);<BR> smooth->SetInput(reader->GetOutput());<BR> <BR> vtkImageGradientMagnitude
*magnitude =
vtkImageGradientMagnitude::New();<BR> magnitude->SetDimensionality(3);<BR> magnitude->SetInput(smooth->GetOutput());<BR> magnitude->Update();//this function
is necessary to get the right file header
information<BR> <BR> vtkMetaImageWriter *writer =
vtkMetaImageWriter::New();<BR> writer->SetFileDimensionality(3);<BR> writer->SetInput(magnitude->GetOutput());<BR> writer->SetFileName(outputFilename);<BR> writer->Write();
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I doubt there is some bug in the class
vtkMetaImageWriter.</FONT></DIV></BODY></HTML>