Package: neuroim 0.1.0

neuroim: Data Structures and Handling for Neuroimaging Data

A collection of data structures that represent volumetric brain imaging data. The focus is on basic data handling for 3D and 4D neuroimaging data. In addition, there are function to read and write NIFTI files and limited support for reading AFNI files.

Authors:Bradley R. Buchsbaum

neuroim_0.1.0.tar.gz
neuroim_0.1.0.zip(r-4.5)neuroim_0.1.0.zip(r-4.4)neuroim_0.1.0.zip(r-4.3)
neuroim_0.1.0.tgz(r-4.4-x86_64)neuroim_0.1.0.tgz(r-4.4-arm64)neuroim_0.1.0.tgz(r-4.3-x86_64)neuroim_0.1.0.tgz(r-4.3-arm64)
neuroim_0.1.0.tar.gz(r-4.5-noble)neuroim_0.1.0.tar.gz(r-4.4-noble)
neuroim_0.1.0.tgz(r-4.4-emscripten)neuroim_0.1.0.tgz(r-4.3-emscripten)
neuroim.pdf |neuroim.html
neuroim/json (API)

# Install 'neuroim' in R:
install.packages('neuroim', repos = c('https://bbuchsbaum.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bbuchsbaum/neuroim/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

5.64 score 6 stars 48 scripts 181 downloads 115 exports 23 dependencies

Last updated 4 years agofrom:a0c2c5db6e. Checks:OK: 1 ERROR: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 06 2024
R-4.5-win-x86_64ERRORNov 06 2024
R-4.5-linux-x86_64ERRORNov 06 2024
R-4.4-win-x86_64ERRORNov 06 2024
R-4.4-mac-x86_64ERRORNov 06 2024
R-4.4-mac-aarch64ERRORNov 06 2024
R-4.3-win-x86_64ERRORNov 06 2024
R-4.3-mac-x86_64ERRORNov 06 2024
R-4.3-mac-aarch64ERRORNov 06 2024

Exports:addDimAFNIMetaInfoas.arrayas.listas.maskas.matrixas.sparseaxesaxisToIndexBasisBrainVectorBinaryReaderBinaryWriterBootstrapSearchlightboundsBrainBucketBrainBucketSourceBrainMetaInfoBrainSliceBrainSpaceBrainVectorBrainVectorSourceBrainVolumeBrainVolumeSourcecloseClusteredBrainVolumeClusteredSearchlightColumnReaderconcatconnCompconnComp3DcoordscoordToGridcoordToIndexdataFiledataFileMatchesdataReaderDenseBrainVectorDenseBrainVolumedropDimeachSerieseachSliceeachVolumefileMatchesfillgridToCoordgridToGridgridToIndexheaderFileheaderFileMatchesimageIndexLookupVolumeindexToAxisindexToCoordindexToGridindicesinverseTransKernelloadBucketloadDataloadVectorloadVolumeloadVolumeListLogicalBrainVolumelookupmakeVectormakeVolumemapmapToColorsmatchAnatomy2DmatchAnatomy3DmatrixToVolumeListndimNIfTIMetaInfonumClustersoriginoverlaypermMatprintRandomSearchlightreadColumnsreadElementsreadHeaderreadMetaInfoRegionCubeRegionSphereRegionSquarerenderreorientROIVectorROIVolumescaleSeriesSearchlightseriesseries_roiseriesItershowslicesliceDataspacespacingSparseBrainVectorSparseBrainVectorSourceSparseBrainVolumesplitFillsplitReducesplitScalestripExtensionsubVectortakeVolumetransvaluesvoxelswriteElementswriteVectorwriteVolume

Dependencies:abindassertthatclicpp11gluehashigraphiteratorslatticelifecyclemagrittrMatrixmmappkgconfigplyrRcppRcppArmadillorflannrlangRNiftistringistringrvctrs

Regions of Interest

Rendered fromregionOfInterest.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2015-06-22
Started: 2014-05-28

The neuroim package

Rendered fromneuroim.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2015-06-22
Started: 2014-05-28

Working with Image Volumes

Rendered fromFileIO.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2015-06-20
Started: 2015-06-20

Readme and manuals

Help Manual

Help pageTopics
extract labeled volume from 'BrainBucket'[,BrainBucket,index,missing,ANY-method
subset an 'ROIVolume'[,ROIVolume,logical,missing,ANY-method [,ROIVolume,numeric,missing,ANY-method
extractor[,SparseBrainVector,missing,missing,ANY-method
extractor[,SparseBrainVector,missing,numeric,ANY-method
extractor[,SparseBrainVector,numeric,missing,ANY-method
extractor[,SparseBrainVector,numeric,numeric,ANY-method
extractor[,SparseBrainVolume,matrix,missing,ANY-method
extractor[,SparseBrainVolume,missing,missing,ANY-method
extractor[,SparseBrainVolume,missing,numeric,ANY-method
extractor[,SparseBrainVolume,numeric,missing,missing-method
extractor[,SparseBrainVolume,numeric,numeric,ANY-method
extract labeled volume from 'BrainBucket'[[,BrainBucket,index,missing-method
extractor[[,BrainVector,numeric,ANY-method [[,SparseBrainVector,numeric,ANY-method
Generic function to add a dimension to an objectaddDim addDim,BrainSpace,numeric-method
AFNIFileDescriptorAFNIFileDescriptor-class
AFNIMetaInfoAFNIMetaInfo
conversion from DenseBrainVolume to arrayas
convert 'BrainData' instance to arrayas.array,BrainData-method
as.listas.list,BrainVector-method as.list,SparseBrainVector-method
as.logicalas.logical,BrainVolume-method
Convert to a LogicalBrainVolumeas.mask as.mask,BrainVolume,missing-method as.mask,BrainVolume,numeric-method
convert 'BrainData' instance to matrixas.matrix,BrainData-method
convert a 'ROIVector' to a matrixas.matrix,DenseBrainVector-method as.matrix,ROIVector-method as.matrix,SparseBrainVector-method
Convert SparseBrainVolume to numericas.numeric,SparseBrainVolume-method
Convert to from dense to sparse representationas.sparse as.sparse,DenseBrainVector,LogicalBrainVolume-method as.sparse,DenseBrainVector,numeric-method as.sparse,DenseBrainVolume,LogicalBrainVolume-method as.sparse,DenseBrainVolume,numeric-method
convert 'BrainData' instance to vectoras.vector,BrainData-method
Generic getter function to extract image axesaxes axes,BrainData-method axes,BrainSpace-method
BaseAxisSet-class
AxisSet1DAxisSet1D-class
AxisSet2DAxisSet2D-class
AxisSet3DAxisSet3D-class
AxisSet4DAxisSet4D-class
AxisSet5DAxisSet5D-class
Convert 1-dimensional real axis coordinates along a single axis dimension to a 1D index along the same axis.axisToIndex axisToIndex,BrainSpace,numeric,numeric-method indexToAxis indexToAxis,BrainSpace,numeric,numeric-method
BaseBase-class
BaseMetaInfoBaseMetaInfo-class
BaseSourceBaseSource-class
BasisBrainVectorBasisBrainVector-class
BinaryReaderBinaryReader
BinaryReaderBinaryReader-class
BinaryWriterBinaryWriter BinaryWriter-class
Create a spherical searchlight iterator that samples regions from within a mask.BootstrapSearchlight
Generic function to extract the spatial bounds (origin + dim * spacing) of an image param x the objectbounds bounds,BrainData-method bounds,BrainSpace-method
BrainBucketBrainBucket BrainBucket-class
BrainBucketSourceBrainBucketSource BrainBucketSource-class
BrainDataBrainData-class
BrainFileDescriptorBrainFileDescriptor-class
BrainFileSource Base class for representing a data source for images. The purpose of this class is to provide a layer in between low level IO and image loading functionality.BrainFileSource-class
BrainMetaInfo This class contains meta information from an imageBrainMetaInfo BrainMetaInfo-class
BrainSlice constructorBrainSlice
BrainSliceBrainSlice-class
BrainSourceBrainSource-class
Constructor function for 'BrainSpace' classBrainSpace
BrainSpaceBrainSpace-class
BrainVectorBrainVector BrainVector-class
BrainVectorSourceBrainVectorSource
BrainVectorSourceBrainVectorSource-class
BrainVolumeBrainVolume
BrainVolume Base class for image representing 3D volumetric data.BrainVolume-class
BrainVolumeSource A class is used to produce a 'BrainVolume' instanceBrainVolumeSource BrainVolumeSource-class
closeclose,BinaryReader-method close,BinaryWriter-method
ClusteredBrainVolumeClusteredBrainVolume ClusteredBrainVolume-class
Create a clustered Searchlight iteratorClusteredSearchlight
ColumnReaderColumnReader
ColumnReaderColumnReader-class
Concatenate two objectsconcat concat,BrainVector,BrainVector-method concat,BrainVector,BrainVolume-method concat,BrainVolume,BrainVector-method concat,DenseBrainVolume,DenseBrainVolume-method concat,DenseBrainVolume,missing-method concat,SparseBrainVector,missing-method concat,SparseBrainVector,SparseBrainVector-method
Find connected componentsconnComp connComp,BrainVolume-method
Extract connected components from a 3D maskconnComp3D
Extract coordinatescoords coords,IndexLookupVolume-method coords,ROIVolume-method coords,SparseBrainVector-method
Generic function to convert N-dimensional real world coordinates to grid coordinatescoordToGrid coordToGrid,BrainSpace,matrix-method coordToGrid,BrainSpace,numeric-method coordToGrid,BrainVolume,matrix-method
Generic function to convert N-dimensional real world coordinates to 1D indicescoordToIndex coordToIndex,BrainSpace,matrix-method coordToIndex,BrainSpace,numeric-method coordToIndex,BrainVolume,matrix-method
Generic function to get the name of the data file, given a file name and a 'BrainFileDescriptor' instance.dataFile dataFile,BrainFileDescriptor,character-method
Generic function to test whether a file name conforms to the given a 'BrainFileDescriptor' instance. Will test for match to data file onlydataFileMatches dataFileMatches,BrainFileDescriptor,character-method
Generic function to create data readerdataReader dataReader,AFNIMetaInfo-method dataReader,NIfTIMetaInfo-method
DenseBrainVectorDenseBrainVector DenseBrainVector-class
DenseBrainVolumeDenseBrainVolume DenseBrainVolume-class
dim of 'BrainData' objectdim,BrainData-method
dimdim,BrainSpace-method
dim of 'FileMetaInfo'dim,FileMetaInfo-method
Generic function to drop a dimension from an objectdropDim dropDim,AxisSet2D,missing-method dropDim,AxisSet2D,numeric-method dropDim,AxisSet3D,missing-method dropDim,AxisSet3D,numeric-method dropDim,BrainSpace,missing-method dropDim,BrainSpace,numeric-method
Generic functions to apply a function to each series of a 4D image That is, if the 4th dimension is 'time' each series is a 1D time series.eachSeries eachSeries,BrainVector,function,missing-method eachSeries,DenseBrainVector,function,missing-method eachSeries,SparseBrainVector,function,logical-method
Generic functions to apply a function to each (2D) slice of an imageeachSlice eachSlice,BrainVolume,function,logical-method eachSlice,BrainVolume,function,missing-method
Generic function to apply a function to each volume of a four-dimensional imageeachVolume eachVolume,BrainBucket,function,logical,ANY-method eachVolume,BrainBucket,function,missing,missing-method eachVolume,BrainVector,function,logical,ANY-method eachVolume,BrainVector,function,missing,BrainVolume-method eachVolume,BrainVector,function,missing,missing-method eachVolume,SparseBrainVector,function,logical,missing-method eachVolume,SparseBrainVector,function,missing,LogicalBrainVolume-method eachVolume,SparseBrainVector,function,missing,missing-method
Generic function to test whether a file name conforms to the given 'BrainFileDescriptor' instance. Will test for match to either header file or data filefileMatches fileMatches,BrainFileDescriptor,character-method
FileMetaInfoAFNIMetaInfo-class FileMetaInfo-class NIfTIMetaInfo-class
Generic function to map values from one set to another using a user-supplied lookup tablefill fill,BrainVolume,list-method fill,BrainVolume,matrix-method
Generic function to convert N-dimensional grid coordinate coordinates to real world coordinatesgridToCoord gridToCoord,BrainSpace,matrix-method gridToCoord,BrainSpace,numeric-method gridToCoord,BrainVolume,matrix-method
Generic function to convert voxel coordinates in the reference space (LPI) to native array space.gridToGrid gridToGrid,BrainSpace,matrix-method gridToGrid,matrix,matrix-method
Generic function to convert N-dimensional grid coordinate to 1D indicesgridToIndex gridToIndex,BrainSlice,matrix-method gridToIndex,BrainSpace,matrix-method gridToIndex,BrainSpace,numeric-method gridToIndex,BrainVolume,matrix-method gridToIndex,BrainVolume,numeric-method
Generic function to get the name of the header file, given a file name and a 'BrainFileDescriptor' instance.headerFile headerFile,BrainFileDescriptor,character-method
Generic function to test whether a file name conforms to the given 'BrainFileDescriptor' instance. Will test for match to header file onlyheaderFileMatches headerFileMatches,BrainFileDescriptor,character-method
imageimage,BrainVolume-method
IndexLookupVolumeIndexLookupVolume IndexLookupVolume-class
Generic function to convert 1D indices to N-dimensional real world coordinatesindexToCoord indexToCoord,BrainSpace,numeric-method indexToCoord,BrainVolume,index-method
Generic function to convert 1D indices to N-dimensional grid coordinatesindexToGrid indexToGrid,BrainSlice,index-method indexToGrid,BrainSpace,numeric-method indexToGrid,BrainVector,index-method indexToGrid,BrainVector,integer-method indexToGrid,BrainVolume,index-method indexToGrid,BrainVolume,integer-method
Extract indicesindices indices,IndexLookupVolume-method indices,ROIVector-method indices,ROIVolume-method indices,SparseBrainVector-method
Generic getter to extract inverse image coordinate transformationinverseTrans inverseTrans,BrainData-method inverseTrans,BrainSpace-method
Create a Kernel object from a function of distance from kernel centerKernel
KernelKernel-class
Get length of 'BrainVector'. This is the numbe rof volumes in the volume vector (e.g. the 4th image dimension)length,BrainVector-method length,ROIVolume-method
loadBucketloadBucket
Generic function to load data from a data sourceloadData loadData,BrainBucketSource-method loadData,BrainVectorSource-method loadData,BrainVolumeSource-method loadData,SparseBrainVectorSource-method
loadVectorloadVector
Load an image volume from a fileloadVolume
loadVolumeListloadVolumeList
LogicalBrainVolumeLogicalBrainVolume LogicalBrainVolume-class
Index Lookup operationlookup lookup,IndexLookupVolume,numeric-method lookup,SparseBrainVector,numeric-method
makeVectormakeVector
makeVolumemakeVolume
Generic function to apply a function to an objectmap map,BrainVolume,Kernel-method
mapToColorsmapToColors
given two named axes return AxisSet2D singletonmatchAnatomy2D
given three named axes return AxisSet3D singletonmatchAnatomy3D
matrixToVolumeList converts a matrix to a list of BrainVolumes with values filled at grid coordinates determined by the 'vox' argument.matrixToVolumeList
MNI SPACE 1MMMNI_SPACE_1MM
NamedAxisNamedAxis-class
namesnames,BrainBucket-method names,BrainBucketSource-method
Generic function to extract the number of dimensions of an objectndim ndim,AxisSet-method ndim,BrainData-method ndim,BrainSpace-method
neuroimneuroim-package neuroim
NIfTIFileDescriptorNIfTIFileDescriptor-class
Constructor for 'NIfTIMetaInfo' classNIfTIMetaInfo
NullMetaInfoNullMetaInfo-class
numClustersnumClusters numClusters,ClusteredBrainVolume-method
Generic getter to extract image originorigin origin,BrainData-method origin,BrainSpace-method
overlay two objectsoverlay
patchSetpatchSet
Extract permutation matrixpermMat permMat,AxisSet2D-method permMat,AxisSet3D-method permMat,BrainSpace-method
Generic function to print an objectprint
print a 'AxisSet2D' instanceprint,AxisSet2D-method
print a 'AxisSet3D' instanceprint,AxisSet3D-method
print a 'NamedAxis'print,NamedAxis-method
Create an spherical random searchlight iteratorRandomSearchlight
readAFNIHeaderreadAFNIHeader
Generic function to read a set of column vector from an input source (e.g. 'ColumnReader')readColumns readColumns,ColumnReader,numeric-method
Generic function to read a sequence of elements from an input sourcereadElements readElements,BinaryReader,numeric-method
read header information of an image filereadHeader
Generic function to read image meta info given a file and a 'BrainFileDescriptor' instance.readMetaInfo readMetaInfo,AFNIFileDescriptor-method readMetaInfo,NIfTIFileDescriptor-method
Create A Cuboid Region of InterestRegionCube
Create a Spherical Region of InterestRegionSphere
Create a square region of interest where the z-dimension is fixed at one voxel coordinate.RegionSquare
Render an image to create a drawable image.render render,BrainSlice,numeric,numeric,character-method
Render a slice at z coordinaterenderSlice
Generic function to remap the grid-to-world coordinates mapping of an image.reorient reorient,BrainSpace,character-method
ROIROI-class
Create an instance of class 'ROIVector'ROIVector
ROIVectorROIVector-class
Create an instance of class 'ROIVolume'ROIVolume
ROIVolumeROIVolume-class
Generic functions to scale (center and/or normalize by standard deviation) each series of a 4D image That is, if the 4th dimension is 'time' each series is a 1D time series.scaleSeries scaleSeries,BrainVector,logical,logical-method scaleSeries,BrainVector,logical,missing-method scaleSeries,BrainVector,missing,logical-method scaleSeries,BrainVector,missing,missing-method
Create an exhaustive searchlight iteratorSearchlight
Extract one or more series from object and return as ROI objectseries series,BasisBrainVector,matrix-method series,BasisBrainVector,numeric-method series,BrainVector,LogicalBrainVolume-method series,BrainVector,matrix-method series,BrainVector,numeric-method series,BrainVector,ROIVolume-method series,SparseBrainVector,matrix-method series,SparseBrainVector,numeric-method series_roi series_roi,BrainVector,LogicalBrainVolume-method series_roi,BrainVector,matrix-method series_roi,BrainVector,numeric-method series_roi,BrainVector,ROIVolume-method
seriesIterseriesIter seriesIter,BrainVector-method seriesIter,SparseBrainVector-method
show an 'AxisSet1D'show,AxisSet1D-method
show an 'AxisSet2D'show,AxisSet2D-method
show an 'AxisSet3D'show,AxisSet3D-method
show an 'AxisSet4D'show,AxisSet4D-method
show a 'BaseMetaInfo'show,BaseMetaInfo-method
show a 'BrainSpace'show,BrainSpace-method
show a 'BrainVector'show,BrainVector-method
show a 'BrainVectorSource'show,BrainVectorSource-method
show a 'BrainVolume'show,BrainVolume-method
show a 'FileMetaInfo'show,FileMetaInfo-method
show an 'NamedAxis'show,NamedAxis-method
show a 'NullMetaInfo'show,NullMetaInfo-method
show an 'ROIVolume'show,ROIVolume-method
show a 'SparseBrainVector'show,SparseBrainVector-method
Extract a 2D slice from an image volumeslice slice,BrainVolume,numeric,BrainSpace,AxisSet3D-method slice,BrainVolume,numeric,numeric,missing-method
sliceDatasliceData
Generic function to extract geometric properties of an image.space space,BrainData-method space,BrainSpace-method space,IndexLookupVolume-method
Generic function to extract the voxel dimensions of an imagespacing spacing,BrainData-method spacing,BrainSpace-method
SparseBrainVectorSparseBrainVector SparseBrainVector-class
SparseBrainVectorSourceSparseBrainVectorSource SparseBrainVectorSource-class
SparseBrainVolumeSparseBrainVolume SparseBrainVolume-class
Generic function to fill disjoint sets of values with the output of a functionsplitFill splitFill,BrainVolume,factor,function-method
Generic function to summarize subsets of an object by first splitting by row and then "reducing" by a summary 'function'splitReduce splitReduce,BrainVector,factor,function-method splitReduce,BrainVector,factor,missing-method splitReduce,matrix,factor,function-method splitReduce,matrix,factor,missing-method splitReduce,matrix,integer,function-method splitReduce,matrix,integer,missing-method
Generic function to center/scale row-subsets of a matrix or matrix-like objectsplitScale splitScale,DenseBrainVector,factor,logical,logical-method splitScale,DenseBrainVector,factor,logical,missing-method splitScale,DenseBrainVector,factor,missing,missing-method splitScale,matrix,factor,logical,logical-method splitScale,matrix,factor,missing,missing-method
Generic function to strip extension from file name, given a 'BrainFileDescriptor' instance.stripExtension stripExtension,BrainFileDescriptor,character-method
Generic function to extract a sub-vector from a 'BrainVector' object.subVector subVector,DenseBrainVector,numeric-method subVector,SparseBrainVector,numeric-method
Generic function to extract a one or more individual volumes from a four-dimensional imagetakeVolume takeVolume,BrainVector,numeric-method takeVolume,SparseBrainVector,numeric-method
Generic getter to extract image coordinate transformationtrans trans,BrainData-method trans,BrainMetaInfo-method trans,BrainSpace-method trans,NIfTIMetaInfo-method
Generic function to extract data values of objectvalues values,ROIVector-method values,ROIVolume-method
extract voxel coordinatesvoxels voxels,Kernel-method
Generic function to write a sequence of elements from an input sourcewriteElements writeElements,BinaryWriter,numeric-method
Generic function to write a 4D image vector to diskwriteVector writeVector,BrainVector,character,character,missing-method writeVector,BrainVector,character,missing,character,ANY-method writeVector,BrainVector,character,missing,character-method writeVector,BrainVector,character,missing,missing-method
Generic function to write a 3D image volume to diskwriteVolume writeVolume,BrainVolume,character,character,missing-method writeVolume,BrainVolume,character,missing,character-method writeVolume,BrainVolume,character,missing,missing-method writeVolume,ClusteredBrainVolume,character,missing,missing-method