View Issue Details

IDProjectCategoryView StatusLast Update
0002591Slicer4Core: Scripting (Wrapping, Python)public2017-06-07 23:27
Reporterhalazar Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.4.0 
Summary0002591: bug in slicer.util.moduleNames()
Description

From nightly r21038:

slicer.util.moduleNames()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/Slicer.app/Contents/bin/Python/slicer/util.py", line 248, in moduleNames
return app.moduleManager().factoryManager().moduleNames()
AttributeError: qSlicerModuleFactoryManager has no attribute named 'moduleNames'

TagsNo tags attached.

Activities

jcfr

jcfr

2012-10-01 13:49

administrator   ~0006306

Last edited: 2012-10-01 13:49

Hi Chris,
When you have a chance, could you confirm that this is still an issue ?
Thanks
Jc

crmullin

crmullin

2012-10-12 07:19

developer   ~0006509

Confirmed, this issue persists.

crmullin

crmullin

2012-10-12 08:07

developer   ~0006511

However, slicer.moduleNames appears to work correctly.

jcfr

jcfr

2012-10-12 08:20

administrator   ~0006512

Looking at the code:
moduleManager is available in python [1]
factoryManager is available in python [2]

moduleNames does NOT exist anymore. See https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerModuleFactoryManager.h#L60

It has been renamed into "loadedModuleNames". Can you confirm this later one is available. It yes, resolve the issue. Thanks

[1] https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerCoreApplication.h#L193
[2] https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerModuleManager.h#L50

crmullin

crmullin

2012-10-12 08:45

developer   ~0006513

If I change it to call loadedModuleNames() in util.py, the output looks like this:

slicer.util.moduleNames()
(u'ACPCTransform', u'AddScalarVolumes', u'AffineRegistration', u'Annotations', u'AtlasTests', u'BRAINSDemonWarp', u'BRAINSFit', u'BRAINSFitEZ', u'BRAINSLandmarkInitializer', u'BRAINSROIAuto', u'BRAINSResample', u'BRAINSResize', u'BRAINSTransformConvert', u'BSplineDeformableRegistration', u'BSplineToDeformationField', u'BlobDetection', u'CLI4Test', u'Cameras', u'CastScalarVolume', u'ChangeTracker', u'Charting', u'CheckerBoardFilter', u'Colors', u'ConnectedComponent', u'CreateDICOMSeries', u'Volumes', u'ResampleScalarVectorDWIVolume', u'CropVolume', u'CurvatureAnisotropicDiffusion', u'DICOM', u'DICOM2FullBrainTractography', u'DICOMDiffusionVolumePlugin', u'DICOMScalarVolumePlugin', u'Reporting', u'DICOMSegmentationPlugin', u'DICOMSlicerDataBundlePlugin', u'DTIexport', u'DTIimport', u'DWIJointRicianLMMSEFilter', u'DWIRicianLMMSEFilter', u'DWIToDTIEstimation', u'DWIUnbiasedNonLocalMeansFilter', u'Data', u'DataProbe', u'DicomToNrrdConverter', u'DiffusionTensorScalarMeasurements', u'DiffusionTensorTest', u'DiffusionWeightedVolumeMasking', u'DoubleArrays', u'EMSegment', u'EMSegmentCommandLine', u'EMSegmentQuick', u'EMSegmentTransformToNewFormat', u'Editor', u'Endoscopy', u'EventBroker', u'ExecutionModelTour', u'ExpertAutomatedRegistration', u'ExtractSkeleton', u'FiducialRegistration', u'GaussianBlurImageFilter', u'GradientAnisotropicDiffusion', u'GrayscaleFillHoleImageFilter', u'GrayscaleGrindPeakImageFilter', u'GrayscaleModelMaker', u'HistogramMatching', u'ImageLabelCombine', u'IntensityDifferenceMetric', u'LabelMapSmoothing', u'LabelStatistics', u'LinearRegistration', u'MaskScalarVolume', u'MedianImageFilter', u'MergeModels', u'ModelMaker', u'ModelToLabelMap', u'Models', u'MultiResolutionAffineRegistration', u'MultiVolumeExplorer', u'MultiVolumeImporter', u'MultiVolumeImporterPlugin', u'MultiplyScalarVolumes', u'N4ITKBiasFieldCorrection', u'OpenIGTLinkIF', u'OrientScalarVolume', u'OtsuThresholdImageFilter', u'OtsuThresholdSegmentation', u'PerformanceTests', u'ProbeVolumeWithModel', u'RSNA2012Quant', u'RSNA2012Vis', u'Reformat', u'RegisterImages', u'RegisterImagesMultiRes', u'ResampleDTIVolume', u'ResampleScalarVolume', u'RigidRegistration', u'RobustStatisticsSegmenter', u'SampleData', u'SceneViews', u'SelfTests', u'SimpleRegionGrowingSegmentation', u'SliceLinkLogic', u'Slicer4Minute', u'SlicerMRBTest', u'SubtractScalarVolumes', u'TestGridTransformRegistration', u'ThresholdScalarVolume', u'ThresholdThreadingTest', u'TractographyDisplay', u'TractographyFiducialSeeding', u'TractographyLabelMapSeeding', u'TransformFromFiducials', u'Transforms', u'VBRAINSDemonWarp', u'VectorToScalarVolume', u'ViewControllers', u'VolumeRendering', u'VotingBinaryHoleFillingImageFilter', u'WebGLExport', u'Welcome', u'fiber_visibility_crash2438', u'labelToggleBug2049', u'sceneImport2428', u'slicerCloseCrashBug2590'

jcfr

jcfr

2012-10-12 09:35

administrator   ~0006515

It means the API and it works as expected. Please resolve the issue.
Thanks

crmullin

crmullin

2012-10-12 09:38

developer   ~0006516

https://github.com/chrismullins/Slicer/commit/1126fa94790c4ca70750ce3a45d627cd3f6ef5fa

imphead

imphead

2013-06-11 09:14

reporter   ~0008743

Please reopen this issue.

Why? crmullins's fix was not merged into main repo: as of today 6/11/2013 https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/util.py#L283 shows the old line!!

jcfr

jcfr

2013-06-11 11:38

administrator   ~0008747

Thanks for checking.

Fixed in r22097
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=22097

jcfr

jcfr

2014-03-06 05:15

administrator   ~0011087

Closing resolved issues that have not been updated in more than 3 months

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014642

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file a8a5917f

2013-06-11 15:38:06

jcfr

Details Diff
BUG: Fixes calls to slicer.util.moduleNames()

In commit r19334 [1], the moduleNames() function has been renamed
to "loadedModuleNames" but the corresponding function in slicer.util
hasn't been renamed.

This commit fixes slicer.util.moduleNames() so that it calls
"loadedModuleNames" function.

Fixes 0002591

[1]http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=19334

From: Christopher Mullins <christopher.mullins@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22097 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Python/slicer/util.py Diff File

Issue History

Date Modified Username Field Change
2012-10-01 11:14 jcfr New Issue
2012-10-01 11:14 jcfr Status new => assigned
2012-10-01 11:14 jcfr Assigned To => jcfr
2012-10-01 11:14 jcfr Reporter jcfr => halazar
2012-10-01 11:15 jcfr Target Version => Slicer 4.2.0 - coming release
2012-10-01 13:48 jcfr Assigned To jcfr => crmullin
2012-10-01 13:49 jcfr Note Added: 0006306
2012-10-01 13:49 jcfr Note Edited: 0006306
2012-10-12 07:19 crmullin Note Added: 0006509
2012-10-12 08:07 crmullin Note Added: 0006511
2012-10-12 08:20 jcfr Note Added: 0006512
2012-10-12 08:45 crmullin Note Added: 0006513
2012-10-12 09:35 jcfr Note Added: 0006515
2012-10-12 09:38 crmullin Note Added: 0006516
2012-10-12 09:38 crmullin Status assigned => resolved
2013-06-11 09:14 imphead Note Added: 0008743
2013-06-11 11:38 jcfr Note Added: 0008747
2014-03-06 05:15 jcfr Note Added: 0011087
2014-03-06 05:16 jcfr Status resolved => closed
2014-03-06 05:55 jcfr Fixed in Version => Slicer 4.4.0
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file a8a5917f
2017-06-07 23:27 jcfr Note Added: 0014642
2017-06-07 23:27 jcfr Assigned To crmullin => jcfr
2017-06-07 23:27 jcfr Resolution open => fixed