Closed jacopoabramo closed 1 year ago
Yes, this is one of the quirks of calling the Java wrapped core in python. You have to deal with these StrVector objects, rather than a list of str directly. you'll have to add another line to convert it to str:
str_vector = core.get_device_property_names("Camera")
list_of_str = [str(str_vector.get(i)) for i in range(str_vector.size())]
I've been checking the documentation a bit, and noticed the existance of the
JavaClass
class, but I'm not exactly sure how to use it for my purpose - or if it's of any use at all.
I don't think you'll need this for anything you're trying to do
Yep, that did the trick. Thanks.
Closing.
Greetings,
I'm trying to access the entire list of properties of a device currently loaded in to the Micro-Manager core and categorize them to discern of what types they are using the
getPropertyType
function. Ideally I would like this process to be transparent of the device. From the snippet below:I get the following output:
As one can see, it returns a
mmcorej_StrVector
I've been checking the documentation a bit, and noticed the existance of the
JavaClass
class, but I'm not exactly sure how to use it for my purpose - or if it's of any use at all.Thanks in advance