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

  1. added this to the 1.6.0 milestone on Apr 22, 2025
  2. added theissue type on Apr 22, 2025
  3. self-assigned this
    on May 6, 2025
  4. ehrenfeu commented on Jan 19, 2026

    @ehrenfeu
    Member

    Actually...

    Is this really a method for the bdv module? Shouldn't it rather be in bioformats...?

  5. lguerard commented on Jan 19, 2026

    @lguerard
    ContributorAuthor

    This is to read the XML file created by the H5/XML library using BigStitcher, so it wouldn't make sense to put it in bioformats IMO.

  6. ehrenfeu commented on Jan 19, 2026

    @ehrenfeu
    Member

    Okay, then we'll leave it here.

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