Import 2017-06-07 23:51:09: master 002a4a7d

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-10-08 13:15:57 master ed66be9f
Affected Issues 0003549: Import scripted module as python module
Changeset

STYLE: Update python scripts to not import from main

This commit simplifies the scripts removing extra from __main__
statements and improve the integration with Python IDE ensuring python
package like "slicer" can simply be imported.

The from __main__ statement most likely became obsolete since
r24155 (ENH: Fixes 0003549. Import scripted module as python module).

Remarks:

A global replace of "from main import" into "import" as been done
except in:

  • EditOptions: "from main getNodes" changed into "from slicer.util import getNodes"
  • slicer/module[dm|logic|mrml|widget]/init.py where it makes sense to keep it.

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

mod - Applications/SlicerApp/Testing/Python/AtlasTests.py Diff File
mod - Applications/SlicerApp/Testing/Python/Charting.py Diff File
mod - Applications/SlicerApp/Testing/Python/DTINotReproducibleIssue3977.py Diff File
mod - Applications/SlicerApp/Testing/Python/FiducialLayoutSwitchBug1914.py Diff File
mod - Applications/SlicerApp/Testing/Python/JRC2013Vis.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNA2012ProstateDemo.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAQuantTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAVisTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/ScenePerformance.py Diff File
mod - Applications/SlicerApp/Testing/Python/SliceLinkLogic.py Diff File
mod - Applications/SlicerApp/Testing/Python/Slicer4Minute.py Diff File
mod - Applications/SlicerApp/Testing/Python/SubjectHierarchyCorePluginsSelfTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/SubjectHierarchyGenericSelfTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/ViewControllersSliceInterpolationBug1926.py Diff File
mod - Applications/SlicerApp/Testing/Python/fiber_visibility_crash2438.py Diff File
mod - Applications/SlicerApp/Testing/Python/sceneImport2428.py Diff File
mod - Applications/SlicerApp/Testing/Python/slicerCloseCrashBug2590.py Diff File
mod - Applications/SlicerApp/Testing/Python/test_tractography_display.py Diff File
mod - Base/Python/slicer/ScriptedLoadableModule.py Diff File
mod - Base/Python/slicer/util.py Diff File
mod - Base/Python/tpycl/tpycl.py Diff File
mod - Extensions/Testing/EditorExtensionTemplate/EditorEffectTemplate/EditorEffectTemplate.py Diff File
mod - Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate/ScriptedLoadableModuleTemplate.py Diff File
mod - Modules/Loadable/Colors/Testing/Python/ColorsScalarBarSelfTest.py Diff File
mod - Modules/Loadable/CropVolume/Testing/Python/CropVolumeSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/AddManyMarkupsFiducialTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/MarkupsInCompareViewersSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/MarkupsInViewsSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/NeurosurgicalPlanningTutorialMarkupsSelfTest.py Diff File
mod - Modules/Loadable/SceneViews/Testing/Python/AddStorableDataAfterSceneViewTest.py Diff File
mod - Modules/Loadable/VolumeRendering/Testing/Python/VolumeRenderingSceneClose.py Diff File
mod - Modules/Scripted/DICOM/DICOM.py Diff File
mod - Modules/Scripted/DICOM2FullBrainTractography/DICOM2FullBrainTractography.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMExportScalarVolume.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMExportScene.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMPlugin.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMProcesses.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMWidgets.py Diff File
mod - Modules/Scripted/DICOMPlugins/DICOMDiffusionVolumePlugin.py Diff File
mod - Modules/Scripted/DICOMPlugins/DICOMScalarVolumePlugin.py Diff File
mod - Modules/Scripted/DICOMPlugins/DICOMSlicerDataBundlePlugin.py Diff File
mod - Modules/Scripted/DataProbe/DataProbe.py Diff File
mod - Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py Diff File
mod - Modules/Scripted/Editor/Editor.py Diff File
mod - Modules/Scripted/EditorLib/ChangeIslandEffect.py Diff File
mod - Modules/Scripted/EditorLib/ChangeLabelEffect.py Diff File
mod - Modules/Scripted/EditorLib/ColorBox.py Diff File
mod - Modules/Scripted/EditorLib/DilateEffect.py Diff File
mod - Modules/Scripted/EditorLib/DrawEffect.py Diff File
mod - Modules/Scripted/EditorLib/EditBox.py Diff File
mod - Modules/Scripted/EditorLib/EditColor.py Diff File
mod - Modules/Scripted/EditorLib/EditOptions.py Diff File
mod - Modules/Scripted/EditorLib/Effect.py Diff File
mod - Modules/Scripted/EditorLib/ErodeEffect.py Diff File
mod - Modules/Scripted/EditorLib/FastMarchingEffect.py Diff File
mod - Modules/Scripted/EditorLib/GrowCutEffect.py Diff File
mod - Modules/Scripted/EditorLib/HelperBox.py Diff File
mod - Modules/Scripted/EditorLib/IdentifyIslandsEffect.py Diff File
mod - Modules/Scripted/EditorLib/IslandEffect.py Diff File
mod - Modules/Scripted/EditorLib/LabelEffect.py Diff File
mod - Modules/Scripted/EditorLib/LevelTracingEffect.py Diff File
mod - Modules/Scripted/EditorLib/MakeModelEffect.py Diff File
mod - Modules/Scripted/EditorLib/MorphologyEffect.py Diff File
mod - Modules/Scripted/EditorLib/PaintEffect.py Diff File
mod - Modules/Scripted/EditorLib/RectangleEffect.py Diff File
mod - Modules/Scripted/EditorLib/RemoveIslandsEffect.py Diff File
mod - Modules/Scripted/EditorLib/SaveIslandEffect.py Diff File
mod - Modules/Scripted/EditorLib/ThresholdEffect.py Diff File
mod - Modules/Scripted/EditorLib/WandEffect.py Diff File
mod - Modules/Scripted/EditorLib/WatershedFromMarkerEffect.py Diff File
mod - Modules/Scripted/Endoscopy/Endoscopy.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizard.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/CreateComponentDialog.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/DirectoryListWidget.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/EditExtensionMetadataDialog.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/EditableTreeWidget.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/LoadModulesDialog.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/ModuleInfo.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/SettingsPanel.py Diff File
mod - Modules/Scripted/ExtensionWizard/ExtensionWizardLib/TemplatePathUtilities.py Diff File
mod - Modules/Scripted/FiberBundleToLabelMap/FiberBundleToLabelMap.py Diff File
mod - Modules/Scripted/LabelStatistics/LabelStatistics.py Diff File
mod - Modules/Scripted/PerformanceTests/PerformanceTests.py Diff File
mod - Modules/Scripted/SampleData/SampleData.py Diff File
mod - Modules/Scripted/SelfTests/SelfTests.py Diff File
mod - Modules/Scripted/SurfaceToolbox/SurfaceToolbox.py Diff File
mod - Modules/Scripted/VectorToScalarVolume/VectorToScalarVolume.py Diff File
mod - Utilities/Scripts/qrcc.py Diff File
mod - Utilities/Templates/Modules/Scripted/TemplateKey.py Diff File