-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scripts and header to import to neurojson.io
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"README_":{ | ||
"JMeshVersion":"0.5", | ||
"Dimension":3, | ||
"Comment":"Created by the NeuroJSON Project (https://neurojson.org)", | ||
"AnnotationFormat":"https://neurojson.org/jmesh", | ||
"SerialFormat":"http://json.org", | ||
"Parser":{ | ||
"Python":[ | ||
"https://pypi.org/project/jdata", | ||
"https://pypi.org/project/bjdata" | ||
], | ||
"MATLAB":"https://github.com/NeuroJSON/jsonlab", | ||
"JavaScript":[ | ||
"https://github.com/NeuroJSON/jsdata", | ||
"https://github.com/NeuroJSON/js-bjdata" | ||
], | ||
"CPP":"https://github.com/nlohmann/json", | ||
"C":[ | ||
"https://github.com/DaveGamble/cJSON", | ||
"https://github.com/NeuroJSON/ubj" | ||
] | ||
}, | ||
"Descriptions":"Created using Iso2Mesh 1.9.6 (http://iso2mesh.sf.net)", | ||
"License":"Public Domain", | ||
"Reference":{ | ||
"Iso2Mesh": "Qianqian Fang and David Boas, \"Tetrahedral mesh generation from volumetric binary and gray-scale images,\" Proceedings of IEEE International Symposium on Biomedical Imaging 2009, pp. 1142-1145, 2009", | ||
"JMesh": "Yuxuan Zhang and Qianqian Fang, \"BlenderPhotonics: an integrated open-source software environment for three-dimensional meshing and photon simulations in complex tissues\", J. of Biomedical Optics, 27(8), 083014 (2022) doi: https://doi.org/10.1117/1.JBO.27.8.083014" | ||
}, | ||
"SourceURL":"https://github.com/NeuroJSON/JMeshSamples", | ||
"Creator":"Qianqian Fang, q.fang at neu.edu" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
## Author: Qianqian Fang, q.fang at neu.edu | ||
## Format: .neurojson.io <https://username:password@couchdbserver:port> <databasename> | ||
|
||
ORG="neurojson_jmesh_samples" | ||
if [ ! -z "$1" ]; then | ||
NIO=$1 | ||
fi | ||
|
||
if [ ! -z "$2" ]; then | ||
ORG=$2 | ||
fi | ||
|
||
[ -f .neurojson.header.json ] && NIO_HEADER=.neurojson.header.json | ||
|
||
ff=`find -name "*.jmsh"` | ||
for f in $ff; do | ||
outfile=`realpath --relative-to=${PWD} "$f" | sed -e 's/\//./g'` | ||
outputjson="${f%/*}/${outfile%.*}.json" | ||
(tr -d '\n' < "$f") | jq -s add $NIO_HEADER - | jq 'del(._DataInfo_)' > "$outputjson" | ||
curl -X PUT -d@"$outputjson" $NIO/$ORG/${outfile%.*} | ||
done |