Updating threshold presets limits when opening a dicom, analyze or inv3 file
Not closing InVesalius when closing the project
Making possible to use Ctrl+q to close InVesalius
InVesalius was not exiting when closed via menu/close
Not using thread anymore to write session file
Only checking for update if invesalius/config.cfg has a id_random
It's not necessary to sys.exit in onclose
Updated the INVESALIUS_VERSION to beta4
Updated to beta4 in about dialog
FIX: Fixed ReadBlue stereo on Windows
Removed that annoying print "OnSize gradient"
Created InteractorStyles to handle the interactivity in the viewer_slice

The idea is each interactivity and functionality being implemented as
InteractorStyles. In this branch I created InteractorStyles to handle:
zoom, WW & WL, edition, pan, spin, linear measure and angular measure.

I created a pattern, each InteractorStyle receives as parameter only a
viewer_slice. And a InteractorStyle may create a SetUp and a CleanUp
methods. The SetUp method runs after the creation of the InteractorStyle
and can be used to prepare the ground before the InteractorStyle be
used. The CleanUp method can be used to cleans and unset anything used
during the InteractorStyle use.

This idea can be used in the future to give InVesalius the feature to
run pluggins.

Squashed commit of the following:

commit c48e9290dc91009cf00dc3def692e51c6cebe3e0
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Thu Mar 28 09:18:11 2013 -0300

    Starting with the ww and wl text hidden

commit 5c9a305f4c9821327fb47594a4833f0def899be8
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 17:02:37 2013 -0300

    Created a protocol to setup and cleanup when a style is setted

commit b557c29890e70ba1337cd59bf54b29c7f1d2f11e
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 15:49:04 2013 -0300

    Cleaning unneeded code from data/styles.py

commit 46f4452a1b5c39e826de86c383345df72eeeb9b1
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 15:41:41 2013 -0300

    Cleaning code related to vtk events from viewer_slice

commit 4a7add3a2360df5320a9c7c78d49e533c61997c4
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 15:23:19 2013 -0300

    The context menu is working again in the viewer_slice.py

commit 6c0a5b4c281b1d79d5d0fc21728c08868cc71bb2
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 15:08:39 2013 -0300

    OnBrushRelease was not binded to 'LeftButtonReleaseEvent'

commit 7c998231f939f0552a99ff41c98d1ac3605ce57d
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Wed Mar 27 15:00:48 2013 -0300

    Added get_coordinate_cursor to CrossInteractorStyle

commit 9cbf791e35f212fdf2b10ddf976636fb6581c7e9
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 16:56:37 2013 -0300

    Created a new interactor style to handle the editor

commit 91ea38bc564f284c3994463530e94847ff2d2bd1
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 14:50:16 2013 -0300

    Added a comment to DefaultInteractorStyle

commit b4a359d6ebbd778f9cf4dcb23edeff9f79884344
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 14:47:56 2013 -0300

    Using DefaultInteractorStyle to const.STATE_DEFAULT

commit ea58ed7c4ac5d7e5c640a49ccce5368e82dea611
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 14:43:20 2013 -0300

    Renamed RightZoomInteractorStyle to DefaultInteractorStyle

commit b7ec9d2e436da10570ecbcf7f25ca32213200872
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 14:19:29 2013 -0300

    Added MouseWheelForwardEvent and MouseWheelBackwardEvent to the RightZoomInteractorStyle

commit 13b7b7ff758a45cf9e89b9ddbcdd190b2de8a8b9
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 14:07:01 2013 -0300

    Passing the viewer to all interactor styles

commit 89d8c6172efeec81359417a1943175968701204a
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 10:25:18 2013 -0300

    Created a new interactor style to change slices with the mouse movement

commit 88fe930f156968916c77b789a5acfded93bd4988
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 09:32:37 2013 -0300

    Cleaning unneeded code related to the zoom

commit 58ec7c3a2b56db90ad6ca5fc06da8df731481634
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 09:26:31 2013 -0300

    Created a new interactor style to handle the Zoom camera by selecting a region

commit 4df1d0612d7041ac2ecc27173483a79dc32b9bec
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Tue Mar 26 09:12:00 2013 -0300

    Created a new interactor style to handle the Zoom camera

commit 2ae6b47162dc63a104edcbd6bb398702642c6d08
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Mon Mar 25 16:32:13 2013 -0300

    Renamed ZoomInteractorStyle to RighZoomInteractorStyle

commit 96dd7511bbbd28c9161dea9c3e2bc466be2646fe
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Mon Mar 25 16:25:55 2013 -0300

    Created a method to reset camera after a span camera

commit 1a85e2a409c9278c6fabae045fbf33a6bc25900f
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Mon Mar 25 16:01:14 2013 -0300

    Created a new interactor style to handle the Spin camera

commit 354f97e80f0f917cc825554b4cf077bbd410a15b
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Mon Mar 25 14:55:46 2013 -0300

    STYLE: Renamed the class LinearMeasure and AngularMeasure

commit 87eacea8d9d7b2a460a8156b45c372fa8d6a32f4
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 16:53:16 2013 -0300

    Created a new interactor style to the pan

commit fd6166669bb91315308844a461bd7b8d579f4e79
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 16:42:25 2013 -0300

    Removed code which handle angular measurements from viewer_slice

commit 3eeb17e13d68e4b08a88cbff283a3c6e9995d92b
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 16:40:16 2013 -0300

    Fix in a comment

commit 3ecbb5f87d2bdd3e343e3db26cc4298285e258fc
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 16:38:50 2013 -0300

    Created a new interactor style to handle angular measurements

commit aefd974a410622be9d300330702a99e5b76a51f4
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 14:43:05 2013 -0300

    Created a new interactor style to handle Linear measure

commit 13f819f768cfbf96681f14da0f5f253878c12f16
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Fri Mar 22 10:52:45 2013 -0300

    Created a new interactor style to handle Window level & width

commit f7b5fc4d6a0a17b0359510217568644ca344dc5a
Author: Thiago Franco de Moraes <totonixsame@gmail.com>
Date:   Thu Mar 21 15:40:43 2013 -0300

    Created a new interactor style to handle the cross tool
Makes the measure mark proportional to image spacing

* Added the parameter radius "Add measurement point" pubsub message. This
  parameter is proportional the image spacing.
* Added PROP_MEASURE to constants.py. This constant is used to set the
  proportion the image spacing.

The measure mark is proportional to the image spacing

Loading measures with circlerepresentation proportional to the image spacing

Adding measures in polydata with circlerepresentation proportional to the image spacing

Added PROP_MEASURE to constants.py
Merge pull request #17 from tfmoraes/measure_spacing

Measure spacing
Added more colorschemes and a new GUI to create more colorschemes.

- Added support to colorschemes from OsiriX.
- Created a new GUI to create colorschemes
  - This GUI generates the event EVT_CLUT_NODE_CHANGED when the user
    changes the position and colours of the nodes.
  - This GUI has style setted to FRAME_FLOAT_ON_PARENT, to make this GUI
    stay always on top of invesalius GUI.
- Added pubsub event "Update window level text" to change WW&WL text

Added (but not integrated) the clut_imagedata widget

Remove unused imports from clut_imagedata

The ClutImagedata is changing the slice lookuptable

Showing the histogram at the clut widget

Using checkbox instead of radiobutton to color menu

Applying ww & wl changes to the color table generated by clut_imagedata

Window&level affects clut colors

Window&level affects clut colors

Removed non-color presets from color preset dir

Hidding clutimagedatadialog when user selects another color preset

Removed idiot print

Keeping nodes after closing clutimagedata

Not passing ww&wl to clutimagedata anymore

Generating EVT_CLUT_POINT_MOVE when the clutimagedata is shown

Since EVT_SHOW binded to a wx.Panel is not working with 2.8, I'm binding
the OnShow method to EVT_IDLE and unbinding after the first time this
event is generated.

Using keyboard left and right to change nodes

Enter give the user option to change node colour

(shift +) Tab selects the next (previous) node

Improvements on the drawing of clut_imagedata

ClutImagedataDialog is dealing with clut_imagedata events

Added properties in clut_imagedata to get the ww&wl

Added a pubsub method to update the ww&wl text

WW&WL interactor style affects clut_imagedata widget

Style: the position of window_level and window_width

Delete key deletes a node

Cleaning and closing clut_imagedata dialog when a project is closed

Refreshing clut_imagedata after user change node color

Clut_imagedata dialog setted style to STAY_ON_TOP

Change clut_imagedata dialog style from wx.STAY_ON_TOP to wx.FRAME_FLOAT_ON_PARENT

Cleaning code related to clut_imagedata dialog in viewer_slice

Cleaning code related to clut_imagedata dialog in viewer_slice

EVT_CLUT_POINT_MOVE renamed to EVT_CLUT_NODE_CHANGED

Generating event when user selects custom color scheme

Removed OnShow method from clut_imagedata

Remove useless prints

Reseting things when closing a project
Reverted the alteration on SAMPLE_DIR constant
Merge pull request #18 from tfmoraes/wwwlgui

Added more colorschemes and a new GUI to create more colorschemes.

    - Added support to colorschemes from OsiriX.
    - Created a new GUI to create colorschemes
      - This GUI generates the event EVT_CLUT_NODE_CHANGED when the user
        changes the position and colours of the nodes.
      - This GUI has style setted to FRAME_FLOAT_ON_PARENT, to make this GUI
        stay always on top of invesalius GUI.
    - Added pubsub event "Update window level text" to change WW&WL text
Setting proj.threshold_range when opening a new dicom case
Replacing , to . in some dicom fields
Adding mips.pyx to invesalius project