how to add a set of images?
Alexandre Guimond
guimond at bwh.harvard.edu
Fri Apr 21 12:56:40 EDT 2000
Hi. I wan't to add a set of images together and I can't figure out
the way to do this. Hopefully one of you can help :)
In the following code, all the images file prefix are in $series.
==
vtkImageMathematics add
add SetOperationToAdd
vtkImageReader reader
reader SetFilePrefix [lindex $series 0]
set last [reader GetOutput]
$last Update
foreach i [lrange $series 1 end] {
add SetInput1 $last
reader SetFilePrefix $i;
add SetInput2 [reader GetOutput]
set last [add GetOutput]
$last Update
}
vtkImageViewer viewer
viewer SetInput $last
viewer Render
==
I guess the problem has to do with the implicit execution stuff.
That's why I put a couple of Update calls in there. It doesn't help
in any way though.
thx for any info.
ps: Is there an archive to this mailing list?
--
ag
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list