Pb with vtkImageData

Wilfrid Lefer lefer at lil.univ-littoral.fr
Tue Dec 14 10:09:59 EST 1999


Hi,
I would like to make a copy of a vtkImageData coming from a TIFFReader
but actually it does not work (the image I get in the file is blank).
What is wrong/missing in my piece of code?
Thanks in advance for your help.

Wilfrid.


vtkTIFFReader r
  r SetFileName file1.tif
  r Update
  set scals1 [[[r GetOutput] GetPointData] GetScalars]
vtkScalars scals2
  scals2 SetDataType [$scals1 GetDataType]
  scals2 SetNumberOfComponents [$scals1 GetNumberOfComponents]
  scals2 SetNumberOfScalars [$scals1 GetNumberOfScalars]
  scals2 SetData [$scals1 GetData]
vtkImageData i
  i CopyStructure [r GetOutput]
  [i GetPointData] SetScalars scals2
vtkTIFFWriter w
  w SetFileName file2.tif
  w SetInput i
  w Write


--
 ____________________________________________________________________
|                          |                                         |
| Wilfrid LEFER            |  phone: (+33) 3.21.97.00.46             |
| LIL, B.P. 719            |  fax: (+33) 3.21.19.06.61               |
| 62 228 CALAIS Cedex      |  e-mail: lefer at lil.univ-littoral.fr     |
| FRANCE                   |  http://www-lil.univ-littoral.fr/~lefer |
|__________________________|_________________________________________|





-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list