BUG: 2816. Made data present in SceneViews to be stored in MRB file even if not present in the main scene.
 Restructured vtkMRMLApplicationLogic::SaveSceneToSlicerDataBundleDirectory() code, made it more modular.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22325 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fixed build error in vtkMRMLApplicationLogic

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22326 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed gcc compile error. Removed redundant 'extension' argument

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22327 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 2816. Store SceneViews data in MRB file even if not present in the main scene for the case when the Scene Views are read from the scene file, the data pointer is NULL in this case.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22328 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Editing laodable names in DICOM widget can now lead to renaming of
the loaded loadables.

Closes #3284

From: Alireza Mehrtash <mehrtash@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22329 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: #3284 don't let user edit some dicom fields

As of r22329 the name of the volume can be set via the table widget,
but editing the other fields makes no sense, so we disable it.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22330 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: show the color indices rather than row number

The Color GUI was showing a row number starting from 1
when displaying color table entries, which are 0 indexed.
This led to a mismatch between the value shown in the
data probe (and in the actual color node) versus
what the user was being shown to be the color index.

Overloaded the headerData method to, in the case of the
vertical header display role to return the row index
minus 1. The MRML color model defines a ColorEntryRole
but it's still off by 1 from the color index.

Testing of copying a color node exposed the fact that the
new color node was not showing up in the Data module nor
in the Save Data dialog, so updated CopyNode in the color
logic to turn off the hide from editors flag on the new node.

Issue #1892


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22331 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: confirm delete of markups

Add a message box to tell the user how many markups they
are about to delete and let them cancel. Option to
not show the message again.

COMP: cleaned up unused variable warnings

Fixes issue #3324



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22332 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: remove fiducial settings from the tutorial self test GUI

Remove left over code from copying the add many fiducials self test.
Replaced them with screen shot parameters to help with making the tutorial,
a check box to turn them on (off by default) and a slider to set the scale
(1 by default).
Tweaked the test: make sure that the fiducial list is named the same
as when a user would create one. Make the slices visible in 3D.

Issue #3328



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22333 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3315 allow editor extensions to define custom cursor

The mechanism for editor extensions to declare their cursor had
already existed, but it was being ignored.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22334 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix serialization of display node representation property

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22335 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Exposes RepresentationType and InterpolationType enums to python

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22336 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Consider specific file writer before generic one.

Ideally the file reader/writer should be reworked to have a more
consistent API. More specifically after the user select a file type
in the "save dialog", the corresponding "file writer id" should be
passed down the qSlicerCoreIOManager::saveScene/saveNodes methods.

This would prevent confusion for the user. Indeed, if a writer fails a
clear error message would be displated and the system wouldn't try an other
possible writer.

See issue #3322

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22337 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add qSlicerScriptedFileWriter interface

User can now register python based file writer.

For example:

# File MyCustomSceneExporter.py

import json
import os
import zipfile
import contextlib
import datetime
import vtk, slicer

class MyCustomSceneExporter:
  def __init__(self, parent):
    parent.title = "[...]"
    parent.categories = ["..."]
    parent.dependencies = []
    parent.contributors = ["..."]
    parent.helpText = """[...]"""
    parent.acknowledgementText = """[...]"""
    self.parent = parent

class MyCustomSceneExporterFileWriter:
    def __init__(self, parent):
        self.parent = parent

    def description(self):
        return 'Custom Scene File'

    def fileType(self):
        return 'SceneFile'

    def canWriteObject(self, obj):
        return isinstance(obj, slicer.vtkMRMLScene)

    def extensions(self, obj):
        return ['CustomScene File (*.customscene.zip)']

    def write(self, properties):
        self.exportModels(properties['fileName'])
        return True

    [...]

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