Skip to content

Add bdv method to return info about project #96

@lguerard

Description

@lguerard

Convert code made by @CellKai in a method

dbf = DocumentBuilderFactory.newInstance()
db = dbf.newDocumentBuilder()
dom = db.parse(xml_file)
experimentEL = dom.getDocumentElement()

nodeList = dom.getElementsByTagName("Attributes")
for i in range(nodeList.getLength()):
    node = nodeList.item(i).getAttributes().getNamedItem("name").getNodeValue()
    if node == "channel":
        nbr_chnl = int(nodeList.item(i).getElementsByTagName("Channel").getLength())
    if node == "illumination":
        nbr_ill = int(nodeList.item(i).getElementsByTagName("Illumination").getLength())

timepoints_node = dom.getElementsByTagName("Timepoints")
nbr_tp = (
    int(timepoints_node.item(0).getElementsByTagName("last").item(0).getTextContent())
    + 1
)

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions