Skip to content

Commit

Permalink
Added simple sample
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Sep 12, 2024
1 parent cfa0b49 commit bc5c707
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/aaa-generics-surface.R
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ plot.ieegio_surface <- function(
# To trigger display


helper_rgl_call("highlevel", integer())
# helper_rgl_call("highlevel", integer())

# open3d()
# mat <- matrix(1:4, 2, 2)
Expand Down
17 changes: 17 additions & 0 deletions inst/sample_data/gifti/icosahedron3d/geometry.gii
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<GIFTI Version="1.0" NumberOfDataArrays="2">
<MetaData>
<MD>
<Name>Generator</Name>
<Value>fsbrain</Value>
</MD>
</MetaData>
<DataArray Dimensionality="2" Dim0="12" Dim1="3" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_POINTSET" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData/>
<Data>eJxjYGBgWGf23ZGBwcOJAcE+BGUfRBIHsQ+RopYBDLCqdcSmFsQGAHIaJck=</Data>
</DataArray>
<DataArray Dimensionality="2" Dim0="20" Dim1="3" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_INT32" Intent="NIFTI_INTENT_TRIANGLE" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData/>
<Data>eJwtjQENADEIA5EwCZOAg2fOkDIpk4KUX8eRkLahLWZv4u5qKsxoKjxw4cDz8Oq46/J/zYVzNRduPMKCFxmjQ7fkvzIHra6BdrzSxc25Tf4nXZPuQhv5evkf0n4hMA==</Data>
</DataArray>
</GIFTI>
Binary file added inst/sample_data/gifti/icosahedron3d/rand.curv
Binary file not shown.
13 changes: 13 additions & 0 deletions inst/sample_data/gifti/icosahedron3d/rand.gii
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<GIFTI Version="1.0" NumberOfDataArrays="1">
<MetaData>
<MD>
<Name>Generator</Name>
<Value>ieegio</Value>
</MD>
</MetaData>
<DataArray Dimensionality="2" Dim0="12" Dim1="1" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_SHAPE" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData/>
<Data>eJwBMADP/6uzCcBD8xa/AJwBPsgwAj+ExyFA/1oWwL0bpL51G5a+zH4oP8d8tz5fsKO//RfBPhAaFq0=</Data>
</DataArray>
</GIFTI>
45 changes: 45 additions & 0 deletions inst/sample_data/gifti/icosahedron3d/ts.gii
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<GIFTI Version="1.0" NumberOfDataArrays="4">
<MetaData>
<MD>
<Name>Generator</Name>
<Value>ieegio</Value>
</MD>
</MetaData>
<DataArray Dimensionality="2" Dim0="12" Dim1="1" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_TIME_SERIES" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData>
<MD>
<Name><![CDATA[TimeStep]]></Name>
<Value><![CDATA[1]]></Value>
</MD>
</MetaData>
<Data>eJwBMADP/4ytCr62dC2/eKHePkwnSr6ubsw+haRXvxrp1T8VnMk/BdEbPq+Cub4zree+vuusP00iGO0=</Data>
</DataArray>
<DataArray Dimensionality="2" Dim0="12" Dim1="1" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_TIME_SERIES" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData>
<MD>
<Name><![CDATA[TimeStep]]></Name>
<Value><![CDATA[1]]></Value>
</MD>
</MetaData>
<Data>eJwBMADP/0r18T4EbIK+Q3o5vtS7HsDM+ao+lSSuP8pewr5Qwnc/tG8wP5YKBj/EJ7M/kjW5v1uYF5Y=</Data>
</DataArray>
<DataArray Dimensionality="2" Dim0="12" Dim1="1" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_TIME_SERIES" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData>
<MD>
<Name><![CDATA[TimeStep]]></Name>
<Value><![CDATA[1]]></Value>
</MD>
</MetaData>
<Data>eJwBMADP/0uyIr+ZyG2/i73Cv1LMIMBF+Mq/UD4NP7PCqD69i4u+YeiMv9xGwr6hfBk/OtriPpKpGp4=</Data>
</DataArray>
<DataArray Dimensionality="2" Dim0="12" Dim1="1" Encoding="GZipBase64Binary" DataType="NIFTI_TYPE_FLOAT32" Intent="NIFTI_INTENT_TIME_SERIES" Endian="LittleEndian" ExternalFileName="" ExternalFileOffset="" ArrayIndexingOrder="RowMajorOrder">
<MetaData>
<MD>
<Name><![CDATA[TimeStep]]></Name>
<Value><![CDATA[1]]></Value>
</MD>
</MetaData>
<Data>eJwBMADP/2RYED8Xlbo+HI1vP0sRgj2u6DC+dmeyP5cXR7++BYm9BT9SvwcCJj9/m+C+QFECv8KHEv4=</Data>
</DataArray>
</GIFTI>
18 changes: 9 additions & 9 deletions vignettes/read-imaging-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ library(ieegio)
nifti_file <- ieegio_sample_data("brain.demosubject.nii.gz")
# geometry
geom_file <- ieegio_sample_data("gifti/GzipBase64/sujet01_Lwhite.surf.gii")
geom_file <- ieegio_sample_data(
"gifti/icosahedron3d/geometry.gii")
# measurements
shape_file <- ieegio_sample_data("gifti/GzipBase64/sujet01_Lwhite.shape.gii")
shape_file <- ieegio_sample_data(
"gifti/icosahedron3d/rand.gii"
)
# time series
ts_file <- ieegio_sample_data(
"gifti/GzipBase64/fmri_sujet01_Lwhite_projection.time.gii")
"gifti/icosahedron3d/ts.gii")
```

Expand Down Expand Up @@ -102,16 +105,13 @@ Reading surface file using `read_surface` supports multiple data types
```{r read_surface}
library(ieegio)
# geometry
geom_file <- "gifti/GzipBase64/sujet01_Lwhite.surf.gii"
geometry <- read_surface(ieegio_sample_data(geom_file))
geometry <- read_surface(geom_file)
# measurements
shape_file <- "gifti/GzipBase64/sujet01_Lwhite.shape.gii"
measurement <- read_surface(ieegio_sample_data(shape_file))
measurement <- read_surface(shape_file)
# time series
ts_file <- "gifti/GzipBase64/fmri_sujet01_Lwhite_projection.time.gii"
time_series <- read_surface(ieegio_sample_data(ts_file))
time_series <- read_surface(ts_file)
```

You can merge them to a single object, making an object with multiple embedding data-sets:
Expand Down

0 comments on commit bc5c707

Please sign in to comment.