Bug in vtkPiecewiseFunction

Vamsidhar Juvvigunta vamsidha at merl.com
Mon Jun 14 14:05:16 EDT 1999

Hi vtkdevelopers,

    The vtkPiecesiseFunction class has a range member that returns the
range of the independent variable in the function. This range gets updated
when the AddPoint/AddSegment method is invoked but does not get updated
when a point is removed.

  1) Also it would be nice if a threshold member could be added so that
RemovePoint would not have to compare the float values in the table, but
would actually do an interval scan and remove everything in the interval. 
Moreover to get to the float value one would have to access the internal
data pointer as one cannot access the table by index. The addition of a
removeByIndex method inaddition to the current removeByValue method could
also make this calss more useful.

  2) The InsertPoint protected member function returns the index of
insertion. The public AddPoint calls this function but drops the insertion
index return value ? Would be nice if this were actually propagated down.

 3) The class also does not allow function/x queries based on their index
in it's table. Hence the use of the internal table pointer becomes
neccesary in lots of cases. However the vtkColorTransfer function does not
allow access to the RGB members and also does not include the
GetDataPointer interface of these objects. SO I am forced to use three
PiecewiseFunction objects to do the job of the colorTF. Can this be

 Hope I can see the corrections soon :-)

 I am writing a MFC/OGL based transfer function editor and use the
piecewiseFunction object a lot for the standard inserts, deletes and
moves. Some of these features make the code look very ugly and accesing
the internal data pointers is something I'd rather not do. 

 thank you,


J. Vamsidhar			| URL    : http://www.erc.msstate.edu/~vamsi
383 Columbia Street,Apt 2   	| mailto : vamsi at erc.msstate.edu
Cambridge 			| 
MA-02139			| 
ph: 1-617-491-1389 (res)        | phone  : 1-617-621-7500x5514 (off)

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