[Ctk-developers] ctkDICOMBrowser - access to database from python?
Nicole Aucoin
nicole at bwh.harvard.edu
Tue Sep 30 23:17:37 UTC 2014
Hello,
I'm working with a ctkDICOMBrowser from a python script but having
problems getting at the database to add data programatically. I've seen
that the browser uses the application's QSettings to determine the
database directory, it's creating and opening a database okay (verified
by adding some checks to the C++ file), but from python the
dicomBrowser.database call is always coming back as None.
Here's a code snippet that I'm running from the Python console in 3D Slicer:
# use the default settings for the database directory
dicomBrowser = ctk.ctkDICOMBrowser()
print dicomBrowser.database
It always prints None even though I see my print out from the
setDatabaseDirectory method that shows isOpen() being true on the non
null database.
Is this a bug in the Python wrapping of the QSharedPointer of the
database variable? Or are there some more steps that I need to include
or a different way to access it?
thanks,
Nicole
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
More information about the Ctk-developers
mailing list