ENH: pure-python implementation of editor module

ENH: add stub of draw effect

More work in progress for conversion of core
editor functionality from tcl to python

ENH: further migration of editor effects to new design

Make a functioning paint effect as an editor builtin

BUG: disconnect pipeline when making label volume

This allows modified events on the label map to trigger
render without pulling original pipeline.

EHN: more porting of Paint Effect

Fix LabelEffect options gui and parameter node
settings for threshold paint, etc.

Hook up undo/redo for paint effect.

ENH: remove 'embedded' mode and clean up code

Per discussion with Danielle at 2012 Winter
Project Week, embedded mode is no longer needed and
we can accomplish our goals with editor extensions
and other methods.

Also remove some other dead code and comments.

EHN: work in progress for new editor

ENH: further editor porting and helper methods

ENH: code refactor and porting for DrawEffect in Editor

Porting to python and better distinction between tool and
logic classes with better abstraction of LabelEffect superclass
to handle rasterization tasks.

BUG: minor porting syntax differences

Tcl to python issues and naming convention change from
EditOptions to Options/Tool/Logic effect convention.

BUG: fixes to Label and Draw effects

better allocation of work between superclass and subclass
and new it actually works.

BUG: fix draw effect

- button release detected
- visibility fixed on enter/leave
- delete with 'x' key fixed

BUG: avoid crash in threaded routine

Make sure the thread is terminated before allowing
destructor to complete

BUG: fix smudge mode in new paint tool

ENH: remove workaround for updating other slice views

After paint, a call to labelNode.Modified() is enough
to trigger a scheduleRender in all other slice views

BUG: Fix typos in util methods

also clean up style of arg list

ENH: port editor's threshold effect to python

BUG: fixes for undo/redo buttons and gui creation

BUG: fix logic of undo/redo to store only specified number of steps

BUG: fix setting threshold paint from thresholdeffect

ENH: port rectangle effect to python

ENH: add level tracing python port

(still some debugging to do)

BUG: fix level tracing preview and apply

Add scheduleRender and transform correct points

BUG: fix crash in level tracing

Avoid case where one pixel difference in xy space
mapped to same ijk pixel leading to abmiguity in
the definition of extraction plane.

Use an offset value that is the max size of screen space,
but catch the case where we map back to the same
pixel.

ENH: fix pan/zoom while level trace is active

BUG: observe middle mouse button for pan in level tracing

ENH: add a scope option for all effects

If the effect defines a custom list of scopeOptions from
the Effect's list of availableScopeOptions then
a combobox will be displayed to give the user the option
of scope contexts.  This controls the input and output volume
behavior for the effect (still being ported)

EHN: Port of Erode effect and related fixes to class hierarchy

ENH: add dilate effect and fix up morphology

Now erode and dilate working as expected with mrml,
undoRedo, etc.

ENH: add ChangeLabelEffect

ENH: add MakeModelEffect

BUG: restrict morphology operations to scope of 'All'

Really no convenient way to have the operation apply only
to the visible region since it does not get applied
with respect to a slice.

Real solution for these would be to give a scope option of
'Window' in which case the EffectOptions would present a
combo box of the current views and the user could select
the one to apply the operation in - add this to the TODO list.

BUG: use the class name in the parameter node

ENH: add new effects

Add to the __init__.py, the CMakeLists.txt and to the
EditBox.

ENH: adopt explicit declaration of connections for guis

By adding the connections list to each class instance it is
possible for users of the class to explicitly turn off the connection
before updating the widget values.  This avoids having
updateMRMLFromGUI calls interfering with the updating
of the gui itself.

Label and Paint have been updated with this behavior, other
effects to follow.

ENH: switch more effects to use the connections list

Includes other minor debugging fixes too

STYLE: better method names: now (dis)connectWidgets

was (dis)connectConnections

ENH: add RemoveIslands and IdentifyIslands effects

STYLE: better comment

ENH: add converted save island effect

ENH: remove unused widgets and fix undo/redo for save island

ENH: add ChangeIslandEffect

Finishes out porting of core effects

ENH: detect missing model maker module and provide error dialog

ENH: port GrowCut to new effect architecture

GrowCut no longer inherits from PaintEffect - instead
users will use ordinary tools to draw gestures and
then invoke the grow cut.  If they want to edit the
gestures they can use Undo.

Note: Still needs some debugging in the apply logic
of growCut

STYLE: remove some dead code (pauseEffect)

BUG: fix status message call

ENH: improve label name and set default step for range

Per feedback from Sonia, the step size now adapts to the
scalar range of the background data

BUG: turn off effect when leaving the module

BUG: avoid crash in GrowCut by ensuring segmentated data is valid

BUG: fix grow cut effect

Now all effects have been ported and the editor invokes
only the pure-python versions of the code.

ENH: reorganize icons for better flow

Now growcut is near erode and dilate, which it is somehow
similar to.  Make Model is at the end, since it is often
the final step.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19575 3bd1e089-480b-0410-8dfb-8563597acbee