Skip to content

Add bdv method to return info about project #96

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
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions