Skip to content

Add bdv method to return info about project #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lguerard opened this issue Apr 22, 2025 · 0 comments
Closed

Add bdv method to return info about project #96

lguerard opened this issue Apr 22, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release
Milestone

Comments

@lguerard
Copy link
Contributor

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
)
@lguerard lguerard added enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release labels Apr 22, 2025
@lguerard lguerard added this to the 1.6.0 milestone Apr 22, 2025
@lguerard lguerard self-assigned this May 6, 2025
@github-project-automation github-project-automation bot moved this to Done in imcflibs May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release
Projects
Status: Done
Development

No branches or pull requests

2 participants