[vtkusers] updating file inputs wtih vtkImageReader - additional info

dean.inglis at on.aibn.com dean.inglis at on.aibn.com
Mon Feb 24 22:50:25 EST 2003


thought I might add:
1) loading a smaller image first and then
loading a larger image presents no further 
problems
2) code snippets:

initialization:

  m_reader->SetFileDimensionality(2);
  m_reader->SetDataScalarTypeToShort();
  m_reader->SetDataByteOrderToLittleEndian();
  m_reader->FileLowerLeftOff();
  m_reader->SetDataOrigin(0,0,0);
  m_reader->SetHeaderSize(1609);
  m_reader->SetDataSpacing (0.2, 0.2, 1.0);


after file input from a dialogue box with new extents:

  m_reader->SetFileName(OpenDlg->FileName.c_str());
  m_reader->SetDataExtent(0,extent,0,extent,0,0);
  m_reader->Modified();

  m_reader->Update();

Dean




More information about the vtkusers mailing list