[vtkusers] More filters question

Arun Nagarajan arun at cis.jhu.edu
Fri Mar 14 11:54:14 EST 2003


Thanks Amy. So this is what I am trying now:

package require vtk

vtkStructuredPointsReader reader
reader SetFileName ThalamusS1002.defAtlas.vtk

vtkImageCast imagecast
imagecast SetInput [reader GetOutput]
imagecast SetOutputScalarTypeToUnsignedChar

vtkImageToPolyDataFilter filter
filter SetInput [imagecast GetOutput]

vtkPolyDataWriter writer
writer SetFileName out.poly.vtk
writer SetInput [filter GetOutput]
writer Write


But I am still getting an error saying: Wrong input scalar type  from the
ImageToPolyDataFilter class. Does SetOutputScalarTypeToUnsignedChar not set
it to the 3 component unsigned char that I need? If not, what could I do to
make this work.

Thanks.

Arun



----- Original Message -----
From: "Amy Henderson" <amy.henderson at kitware.com>
To: "Arun Nagarajan" <arun at cis.jhu.edu>; <vtkusers at public.kitware.com>
Sent: Friday, March 14, 2003 11:39 AM
Subject: Re: [vtkusers] Using filters


> At 11:24 AM 3/14/2003 -0500, Arun Nagarajan wrote:
> >Ah, ok. That makes more sense. Another question. In the man page for
> >ImageToPolyDataFilter class, there is a note saying:
> >
> >The input linear lookup table must be of the form of 3-component unsigned
> >char
> >
> >What exactly is a 3-component unsigned char?
>
> Each entry in the lookup table is made up of 3 unsigned chars -- to
specify
> RGB colors.
>
> >Thanks.
> >
> >Arun
> >
> >----- Original Message -----
> >From: "Amy Henderson" <amy.henderson at kitware.com>
> >To: "Arun Nagarajan" <arun at cis.jhu.edu>; <vtkusers at public.kitware.com>
> >Sent: Friday, March 14, 2003 11:18 AM
> >Subject: Re: [vtkusers] Using filters
> >
> >
> > > Hi Arun,
> > >
> > > vtkStructuredPointsToPolyDataFilter is an abstract superclass for
various
> > > filters that take a vtkStructuredPoints as input and produce a
vtkPolyData
> > > as output.  You're probably looking for something like
> > > vtkImageToPolyDataFilter (a concrete subclass of
> > > vtkStructuredPointsToPolyDataFilter).
> > >
> > > - Amy
> > >
> > > At 11:07 AM 3/14/2003 -0500, Arun Nagarajan wrote:
> > > >Hi,
> > > >
> > > >I am new to filters and I am trying to read in a structured points
file
> >and
> > > >write it out as a polygonal data file. I am basically trying to use
the
> > > >StructuredPointsToPolyDataFilter class located at
> > >
> >
>http://www.vtk.org/doc/nightly/html/classvtkStructuredPointsToPolyDataFilte
> >r
> > > >.html. There are no examples there and I was wondering if anyone can
show
> >me
> > > >a basic skeleton of how a filter works.
> > > >
> > > >Thanks.
> > > >
> > > >Arun
> > > >
> > > >_______________________________________________
> > > >This is the private VTK discussion list.
> > > >Please keep messages on-topic. Check the FAQ at:
> > > ><http://public.kitware.com/cgi-bin/vtkfaq>
> > > >Follow this link to subscribe/unsubscribe:
> > > >http://public.kitware.com/mailman/listinfo/vtkusers
> > >
> > >
> > >
> > >
> >
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> ><http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
>




More information about the vtkusers mailing list