BUG: Consistently invoke MarkupAddedEvent specifying the markup index.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23669 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix crash when showing transformed markups

The module widget was getting the world coordinates by passing in a 3
element array, not a 4 element array. On some machines this was
triggering a crash. This fix avoids that by properly passing
a four element point array and then reassigning the values to
the three element array for display.

Issue #3756

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23670 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Change 'AddMarkup' to also return the markupIndex on success.

This commit updates the function 'AddMarkup' to behave similarly
to 'AddMarkupWithNPoints' function.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23671 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update AddMarkup/Fiducial API to optionally accept the label.

When calling the AddMarkup/AddFiducial method, a default
label is associated. That said, it is not uncommon to create markup
or fiducial with a custom label.

For example, within a python script, before this commit, the following
could be done to add a fiducial and set its label:

  fiducialIndex = markups.AddFiducial(x, y, z)
  markups.SetNthMarkupLabel(fiducialIndex, "Foo")

The first issue is that the event 'MarkupAddedEvent' was triggered before the
label was set. Since when the markup is added an hypothetical callback
could retrieve other data structure based on the label, it is more
complex to do the book-keeping if the callback can't make use of the
label.

This commit ensures that callback connected to "MarkupAddedEvent" will
be able to get the custom label value.

The second issue is that the "Markup" structure is not wrapped in python.
That means it is not possible to pre-initialize a markup structure
before adding it using "AddMarkup(Markup markup)"

Note that ideally, it should be possible to pass other properties
to initialize the markup in python or c++ before the "MarkupAddedEvent"
is invoked. This commit is a trade-off between changing the Markup
structure into a more heavy weight vtkObject (so that it is wrapped) and
not being able to set the label before "MarkupAddedEvent" is invoked.

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