[vtkusers] How to convert dcm data to raw data like VTKData/headsq/quarter.1--93??

iii-lin iii-lin at 163.com
Sat Dec 23 03:45:27 EST 2006


hello everyone,
 
   I want to convert dicom data to raw data like VTKData/headsq/quarter.1--93,I use codes follow,I use the Java language.
/////////////////////////////////////////////////////////////////
  vtkDICOMImageReader reader = new vtkDICOMImageReader();
  reader.SetDirectoryName(dir);
  reader.Update(); 
  
  DataFormat dataFormat = new DataFormat();
  
  
  vtkImageWriter writer = new vtkImageWriter();//vtkImageWriter::New()
  writer.SetInput(reader.GetOutput());
  writer.SetFilePrefix("test");
  writer.SetFilePattern("%s.%d");
  writer.Write();
//////////////////////////////////////////////////////////////////
Is this codes work well?I don't know how to do.the raw data genetated may be wrong,because these data can not be viewed from another application.
 
How can I do this?
thanks everyone's advice.
 
 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061223/7aa39b86/attachment.htm>


More information about the vtkusers mailing list