Skip to content
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

Images not found when running "papaya-builder.sh -atlas myAtlas.xml" #204

Open
juan-d opened this issue Feb 25, 2022 · 0 comments
Open

Images not found when running "papaya-builder.sh -atlas myAtlas.xml" #204

juan-d opened this issue Feb 25, 2022 · 0 comments

Comments

@juan-d
Copy link

juan-d commented Feb 25, 2022

Hello,

(I posted this under a closed issue; sorry if posting as a new issue doubles it up).

When trying to use papaya-builder.sh -atlas myAtlas.xml (in macOS Catalina), I am getting the following error:

Exception in thread "main" org.json.JSONException: JSONObject["images"] not found.
at org.json.JSONObject.get(JSONObject.java:473)
at org.json.JSONObject.getJSONObject(JSONObject.java:573)
at edu.uthscsa.ric.papaya.builder.Atlas.findImageFile(Atlas.java:76)
at edu.uthscsa.ric.papaya.builder.Atlas.createAtlas(Atlas.java:37)
at edu.uthscsa.ric.papaya.builder.Builder.main(Builder.java:257)

I have tried numerous things so that 'images' (which I assume are the 'imagefile' and the 'summaryimagefile' in the FSL Atlas Specification) can be found by the builder script.

This is my directory structure:

Papaya
├── LICENSE
├── README.md
├── atlas
 | ├── myImage.nii
 | └── mySummaryimage.nii
├── build
├── build.properties
├── docs
├── lib
├── myAtlas.xml
├── myImage.nii
├── mySummaryimage.nii
├── package-lock.json
├── package.json
├── papaya-builder.sh
├── release
├── src
└── tests

I am running papaya-builder.sh form inside this folder.

This is the header in my xml file (myAtlas.xml):

<?xml version="1.0" encoding="ISO-8859-1"?>
<atlas version="1.0">
  <header>
    <name>My Atlas</name>
    <type>Label</type>
    <imagefile>/atlas/myImage/</imagefile>
    <summaryimagefile>/atlas/mySummaryimage/</summaryimagefile>
  </header>
  <data>

I have tried placing myImage.nii (4D image with a region in each volume) and mySummaryimage.nii (3D image with all labelled regions I a single volume) in an atlas folder inside the Papaya folder (/Papaya/atlas/), with the xml header as above, and in the same directory as myAtlas.xml (within the /Papaya/ folder). In the latter case, I have amended the xml header this way:

<imagefile>/myImage/</imagefile>
<summaryimagefile>/mySummaryimage/</summaryimagefile>

As per a previous comment, I have also tried to provide the path to myAtlas.xml when running papaya-builder.sh:

papaya-builder.sh -atlas /path/Papaya/myAtlas.xml

None of this has worked.

I would greatly appreciate any help with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant