Parent class for all image filters.
ImageFilter subclasses are supposed to define methods:
- Process(self,data)
returning the modified data
- ProcessHeader(self,header)
returning the modified header
and one instance variable:
displaydefaultstate -- set to 1 if this filter should be enabled
by default when ndisp displays the image.
The documentation string of the class is used in the ndisp menu
structure, so it should be a single concise line.
All filters classes are listed in imagefilter.Filters for ndisp
to be able to build up its menu.
|
Methods
|
|
Frame GetState HeaderInfo Process ProcessHeader SetState xinit
|
|
|
Frame
|
Frame ( self, data )
Frame handler, will call self.Process if the filter is switched on |
|
|
GetState
|
GetState ( self )
Return 1 if currently enabled, 0 otherwise. |
|
|
HeaderInfo
|
HeaderInfo ( self, data )
Header handler, will call self.ProcessHeader if the filter is switched on |
|
|
Process
|
Process ( self, data )
Default processing operation: Nop |
|
|
ProcessHeader
|
ProcessHeader ( self, header )
Default processing operation: Nop |
|
|
SetState
|
SetState ( self, newstate )
Switch filter on/off |
|
|
xinit
|
xinit (
self,
*arg,
*kw,
)
Xtra initialization. |
|