Pb with vtkImageData (still does not work)

Wilfrid Lefer lefer at lil.univ-littoral.fr
Wed Dec 15 04:13:17 EST 1999


Dear Charles,
I tried both the SetWholeExtent() method and to copy the ImageData
information but neither gave a positive result. Here is my code now:

vtkTIFFReader r
  r SetFileName titi.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 GetImageInformation] Copy [[r GetOutput] GetImageInformation]
  set ext [[r GetOutput] GetWholeExtent]
  i SetWholeExtent [lindex $ext 0] [lindex $ext 1] [lindex $ext 2]
[lindex $ext 3] [lindex $ext 4] [lindex $ext 5]
  [i GetPointData] SetScalars scals2
vtkTIFFWriter w
  w SetFileName titi2.tif
  w SetInput i
  w Write
puts "Done"


--
 ____________________________________________________________________
|                          |                                         |
| 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