├── .gitignore ├── .gitmodules ├── AnatomyExists.m ├── AppSettings.cfg ├── AtlasViewerGUI.fig ├── AtlasViewerGUI.m ├── AtlasViewerGUI_enableDisable.m ├── AtlasViewerGUI_version.m ├── Axesv ├── calcCameraUpVectors.m ├── displayAxesv.m ├── getUpVector.m ├── getZoomDistance.m ├── initAxesv.m ├── rotDown.m ├── rotHorizontalLeft.m ├── rotHorizontalRight.m ├── rotUp.m ├── rotVerticalLeft.m ├── rotVerticalRight.m ├── setLighting.m ├── setOrientation.m ├── setZoom.m ├── updateViewAngles.m ├── viewAxesXYZ.m └── viewOrigin.m ├── Data ├── Colin │ ├── anatomical │ │ ├── headsurf.mesh │ │ ├── headsurf2vol.txt │ │ ├── headvol.vox │ │ ├── headvol.vox.gz │ │ ├── headvol2ras.txt │ │ ├── headvol_dims.txt │ │ ├── headvol_tiss_type.txt │ │ ├── labelssurf.mat │ │ ├── labelssurf2vol.txt │ │ ├── pialsurf.mesh │ │ ├── pialsurf2vol.txt │ │ ├── refpts.txt │ │ ├── refpts2vol.txt │ │ └── refpts_labels.txt │ └── fw │ │ ├── fluenceProfs.tar │ │ ├── pialsurf_sensitivity.mesh │ │ ├── projVoltoMesh_brain.mat │ │ └── projVoltoMesh_scalp.mat ├── NeonatalHeadModels │ ├── 29w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 30w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 31w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 32w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 33w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 34w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 35w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 36w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 37w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 38w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 39w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 40w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 41w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 42w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ ├── 43w │ │ └── anatomical │ │ │ ├── headsurf.mesh │ │ │ ├── headsurf2vol.txt │ │ │ ├── headvol.vox.gz │ │ │ ├── headvol_dims.txt │ │ │ ├── headvol_tiss_type.txt │ │ │ ├── pialsurf.mesh │ │ │ ├── pialsurf2vol.txt │ │ │ ├── refpts.txt │ │ │ ├── refpts2vol.txt │ │ │ └── refpts_labels.txt │ └── 44w │ │ └── anatomical │ │ ├── headsurf.mesh │ │ ├── headsurf2vol.txt │ │ ├── headvol.vox.gz │ │ ├── headvol_dims.txt │ │ ├── headvol_tiss_type.txt │ │ ├── pialsurf.mesh │ │ ├── pialsurf2vol.txt │ │ ├── refpts.txt │ │ ├── refpts2vol.txt │ │ └── refpts_labels.txt └── Stats │ └── refpts_stats_Adults1.mat ├── Digpts ├── Headsize │ ├── calcDigptsFromHeadsize.m │ ├── ellipse_1020_costfun.m │ ├── extractHeadsize.m │ ├── getHeadsize.m │ ├── initHeadsize.m │ └── setHeadsize.m ├── disableDigpts.m ├── displayDigpts.m ├── existDigpts.m ├── genDigptsFromHeadsize.m ├── genDigptsFromRefpts.m ├── getDigpts.m ├── getGroupDigpts.m ├── initDigpts.m ├── isHeadsizeEmpty.m ├── printDigpts.m ├── resetDigpts.m ├── saveDigpts.m ├── setDigptsOrientation.m └── xformDigpts.m ├── Docs ├── DesignNotes.odp ├── DesignNotes.ppt └── Notes.txt ├── ForwardModel ├── buildMC.m ├── displayFluenceProf.m ├── displaySensitivity.m ├── enableDisableMCoutputGraphics.m ├── enableFwmodelDisplay.m ├── enableMCGenGuiControls.m ├── enableSensitivityMatrixVolume.m ├── existMCOutput.m ├── findMCapp.m ├── genFluenceProfFromProbe.m ├── genFluenceProfile.m ├── genMCinput.m ├── genMCoutput.m ├── genSensitivityProfile.m ├── genSensitivityProfileFromFluenceProf.m ├── getFwmodel.m ├── getFwmodel_DisplayPanelImage.m ├── getMCoutputExt.m ├── get_tiss_prop.m ├── initFluenceProf.m ├── initFwmodel.m ├── isFluenceProfEmpty.m ├── isMCRunning.m ├── isMCapp.m ├── isregisteredFwmodel.m ├── loadFluenceProf.m ├── load_tMCimg_2pt.m ├── loadmc2.m ├── mcAppList.m ├── projVoltoMesh_brain.m ├── projVoltoMesh_scalp.m ├── read_tMCimg_inp.m ├── resetFwmodel.m ├── resetMC.m ├── resetSensitivity.m ├── runMCXlab.m ├── saveFluenceProf.m ├── searchDirForMCApp.m ├── setMCFields.m ├── setMCoptions.m ├── setSensitivityColormap.m ├── showFwmodelDisplay.m └── tMCimg │ ├── AUTHORS.txt │ ├── LICENSE.txt │ ├── bin │ ├── Darwin │ │ └── tMCimg │ ├── Linux │ │ └── emptyfile.txt │ ├── Win │ │ └── tMCimg.exe │ ├── mc_sphere_seg.inp │ ├── sphere_seg.bin │ ├── tMCimgRunExample.bat │ └── tMCimgRunExample.sh │ ├── build.bat │ ├── install_linux_mac.sh │ ├── install_win.bat │ ├── makefile │ ├── makefile.linux_mac │ ├── makefile.win │ └── src │ ├── build.bat │ ├── makefile │ ├── makefile.Darwin │ ├── makefile.Linux │ ├── makefile.unix │ ├── makefile.win │ ├── tMCimg.c │ ├── tMCimg.sln │ ├── tMCimg.vcxproj │ └── tMCimg.vcxproj.filters ├── Group ├── DataTree │ ├── .gitmodules │ ├── AcquiredData │ │ ├── AcqDataClass.m │ │ ├── DataFiles │ │ │ ├── DataFilesClass.m │ │ │ ├── DeleteDataFiles.m │ │ │ ├── DeleteTsv.m │ │ │ ├── FileClass.m │ │ │ ├── FileLoadSaveClass.m │ │ │ ├── FindFiles.m │ │ │ ├── Hdf5 │ │ │ │ ├── HDF5_CreateGroup.m │ │ │ │ ├── HDF5_DatasetLoad.m │ │ │ │ ├── HDF5_GetFileDescriptor.m │ │ │ │ ├── HDF5_GroupClose.m │ │ │ │ ├── HDF5_GroupOpen.m │ │ │ │ ├── HDF5_PostProcessing.m │ │ │ │ ├── HDF5_Transpose.m │ │ │ │ ├── __init__.py │ │ │ │ ├── convertHDF5StrToMatlabStr.m │ │ │ │ ├── h5exist.m │ │ │ │ ├── h5load.m │ │ │ │ ├── h5loadgroup.m │ │ │ │ ├── h5read_safe.m │ │ │ │ ├── hdf5isvalid.m │ │ │ │ ├── hdf5lib.py │ │ │ │ ├── hdf5read_safe.m │ │ │ │ └── hdf5write_safe.m │ │ │ ├── Nirs2Snirf.m │ │ │ ├── Snirf2Nirs.m │ │ │ ├── Snirf2Tsv.m │ │ │ ├── SnirfFile2Tsv.m │ │ │ ├── TsvFile2Snirf.m │ │ │ ├── __init__.py │ │ │ └── mydir.m │ │ ├── Nirs │ │ │ └── NirsClass.m │ │ ├── README.md │ │ └── Snirf │ │ │ ├── .idea │ │ │ ├── .gitignore │ │ │ ├── Snirf.iml │ │ │ ├── inspectionProfiles │ │ │ │ └── profiles_settings.xml │ │ │ ├── misc.xml │ │ │ ├── modules.xml │ │ │ └── vcs.xml │ │ │ ├── 10-5-System_Mastoids_EGI129.csd │ │ │ ├── AuxClass.m │ │ │ ├── DataClass.m │ │ │ ├── DataTypeLabelValues.m │ │ │ ├── DataTypeValues.m │ │ │ ├── Examples │ │ │ ├── FingerTapping_run3_tdmlproc.nirs │ │ │ ├── Simple_Probe.nirs │ │ │ ├── demo_snirf.m │ │ │ ├── demo_snirf_readfile.m │ │ │ ├── findexamplesdir.m │ │ │ ├── findfile.m │ │ │ ├── neuro_run01.nirs │ │ │ └── snirf_load_save.m │ │ │ ├── MeasListClass.m │ │ │ ├── MetaDataTagsClass.m │ │ │ ├── ProbeClass.m │ │ │ ├── SnirfClass.m │ │ │ ├── SnirfClass.py │ │ │ ├── SnirfLoad.m │ │ │ ├── SnirfSave.m │ │ │ ├── StimClass.m │ │ │ └── __init__.py │ ├── AppSettings.cfg │ ├── DataTreeClass.m │ ├── DesignNotes.ppt │ ├── Examples │ │ ├── EditStimExample.m │ │ ├── Example4_twNI │ │ │ ├── s1 │ │ │ │ ├── neuro_run01.snirf │ │ │ │ ├── neuro_run02.snirf │ │ │ │ └── neuro_run03.snirf │ │ │ └── s2 │ │ │ │ ├── neuro_run06.snirf │ │ │ │ ├── neuro_run07.snirf │ │ │ │ └── neuro_run08.snirf │ │ ├── LoadRunPlotExample1.m │ │ ├── LoadRunPlotExample2.m │ │ └── SubjDataSample │ │ │ ├── test.snirf │ │ │ └── test_process.cfg │ ├── GroupClass.m │ ├── InitCurrElem.m │ ├── LoadDataTree.m │ ├── ProcStream │ │ ├── ArgClass.m │ │ ├── FuncCallClass.m │ │ ├── ParamClass.m │ │ ├── ProcInputClass.m │ │ ├── ProcResultClass.m │ │ └── ProcStreamClass.m │ ├── RunClass.m │ ├── SessClass.m │ ├── SubjClass.m │ ├── SyncBrowsing.m │ ├── TreeNodeClass.m │ ├── Version.txt │ ├── downloadDependencies.m │ └── setpaths.m ├── DataTreeGUI.fig ├── DataTreeGUI.m ├── FuncRegistry │ ├── FindUserFuncDir.m │ ├── FuncHelpClass.m │ ├── FuncRegClass.m │ ├── FuncRegEntryClass.m │ ├── LoadFuncReg.m │ ├── RegistriesClass.m │ ├── UserFunctions │ │ ├── dummy.m │ │ ├── mlAct_Initialize.m │ │ ├── mlAct_Matrix2BinaryVector.m │ │ └── mlAct_Matrix2IndexList.m │ └── Version.txt ├── LoadCurrElem.m ├── UnitTests │ └── testDataFilesClass.m ├── findSubjDirs.m ├── getCurrElemIdx.m └── loadGroupNirsDataFile.m ├── Guiobj ├── restoreObject.m └── saveObjects.m ├── HbConc ├── calcHbConc.m ├── calcHbConcCmThreshold.m ├── displayHbConc.m ├── enableHbConcDisplay.m ├── enableHbConcGen.m ├── getHbConc.m ├── initHbConc.m ├── inputParamsHbConc.m ├── interpHbConc.m ├── isHbConcSingleCond.m ├── loadDataHbConc.m ├── resetHbConc.m ├── setHbConcColormap.m └── showHbConcDisplay.m ├── Headsurf ├── displayHeadsurf.m ├── existsHeadsurf.m ├── getHeadsurf.m ├── initHeadsurf.m ├── saveHeadsurf.m └── setHeadsurfHandles.m ├── Headvol ├── displayHeadvol.m ├── getHeadvol.m ├── initHeadvol.m ├── saveHeadvol.m └── saveHeadvolOrient.m ├── ImgRecon ├── GetExtinctions.m ├── ImageRecon.fig ├── ImageRecon.m ├── displayImgRecon.m ├── enableImgReconDisplay.m ├── enableImgReconGen.m ├── genImgReconMetrics.m ├── getImgRecon.m ├── getImgRecon_DisplayPanelImage.m ├── hmrConc2OD.m ├── hmrImageHrfMeanTwin.m ├── hmrImageReconConc.m ├── initAimg_conc.m ├── initImgRecon.m ├── inputParamsImgRecon.m ├── register_atlas2subj.m ├── resetImgRecon.m ├── saveImgRecon.m ├── setImgReconColormap.m └── showImgReconDisplay.m ├── Install ├── Buildexe.m ├── Buildme.m ├── Buildme_Setup.m ├── cleanup.m ├── createInstallFile.m ├── createShortcut.bat ├── createShortcut.sh ├── createShortcut.vbs ├── finishInstallGUI.fig ├── finishInstallGUI.m ├── genMultWavelengthSimInFluenceFiles.m ├── genMultWlFluenceFiles_CurrWorkspace.m ├── generateDesktopPath.bat ├── generateDesktopPath.m ├── getAppname.m ├── getRelativePath.m ├── makefinalapp.pl ├── makesetup.pl ├── myCopyFile.m ├── removeEntryFromList.m ├── setplatformparams.m ├── setup.bat ├── setup.m └── uninstall.bat ├── LICENSE.txt ├── Labelssurf ├── DistBtw.m ├── ProjectionBI.m ├── displayLabelssurf.m ├── getLabelssurf.m ├── initLabelssurf.m ├── initLabelssurfProbeProjection.m ├── resetLabelssurf.m ├── saveLabelSurf2Vol.m └── saveLabelssurf.m ├── Pialsurf ├── displayPialsurf.m ├── getPialsurf.m ├── initPialsurf.m ├── savePialsurf.m └── setPialsurfHandles.m ├── Pialvol ├── displayPialvol.m ├── getPialvol.m ├── initPialvol.m ├── savePialvol.m └── savePialvolOrient.m ├── Probe ├── 10-5-System_Mastoids_EGI129.csd ├── E31.asc ├── GetGrommetChoices.m ├── SDgui │ ├── SDgui.fig │ ├── SDgui.m │ ├── SDgui_3DViewSelected.m │ ├── SDgui_AtlasViewerGUI.m │ ├── SDgui_EditsMade.m │ ├── SDgui_clear_all.m │ ├── SDgui_disp_msg.m │ ├── SDgui_display.m │ ├── SDgui_display_landmarks.m │ ├── SDgui_set_axes_view.m │ ├── SDgui_version.m │ ├── Version.txt │ ├── ViewChannelsGUI.fig │ ├── ViewChannelsGUI.m │ ├── getOptPosFromAxes.m │ ├── get_pt_from_buttondown.m │ ├── lambda │ │ ├── wavelength1_edit_ButtonDownFcn.m │ │ ├── wavelength1_edit_CreateFcn.m │ │ ├── wavelength1_edit_Update.m │ │ ├── wavelength2_edit_ButtonDownFcn.m │ │ ├── wavelength2_edit_CreateFcn.m │ │ ├── wavelength2_edit_Update.m │ │ ├── wavelength3_edit_ButtonDownFcn.m │ │ ├── wavelength3_edit_CreateFcn.m │ │ ├── wavelength3_edit_Update.m │ │ └── wavelength_edit_Callback.m │ ├── optode_tbls │ │ ├── error_check_optode_tbls.m │ │ ├── optode_det_tbl_CellEditCallback.m │ │ ├── optode_det_tbl_Clear.m │ │ ├── optode_det_tbl_Update.m │ │ ├── optode_det_tbl_get_tbl_data.m │ │ ├── optode_src_tbl_CellEditCallback.m │ │ ├── optode_src_tbl_Clear.m │ │ ├── optode_src_tbl_Update.m │ │ ├── optode_src_tbl_get_tbl_data.m │ │ ├── optode_src_tbl_srcmap_show_Callback.m │ │ ├── optode_src_tbl_srcmap_show_GetVal.m │ │ ├── optode_src_tbl_srcmap_show_UpdateSrcTbl.m │ │ ├── optode_tbl_CreateFcn.m │ │ ├── optode_tbl_GetCellLengths.m │ │ ├── optode_tbl_Update.m │ │ └── optode_tbls_Hide.m │ ├── optode_tbls2 │ │ ├── error_check_optode_dummy_tbl.m │ │ ├── optode_anchor_tbl_CellEditCallback.m │ │ ├── optode_anchor_tbl_CellSelectionCallback.m │ │ ├── optode_anchor_tbl_Clear.m │ │ ├── optode_anchor_tbl_CreateFcn.m │ │ ├── optode_anchor_tbl_ErrCheck.m │ │ ├── optode_anchor_tbl_Init.m │ │ ├── optode_anchor_tbl_Update.m │ │ ├── optode_anchor_tbl_get_tbl_data.m │ │ ├── optode_dummy_tbl_CellEditCallback.m │ │ ├── optode_dummy_tbl_CellSelectionCallback.m │ │ ├── optode_dummy_tbl_Clear.m │ │ ├── optode_dummy_tbl_Init.m │ │ ├── optode_dummy_tbl_Update.m │ │ ├── optode_dummy_tbl_UpdateNum.m │ │ ├── optode_spring_tbl_CellEditCallback.m │ │ ├── optode_spring_tbl_CellSelectionCallback.m │ │ ├── optode_spring_tbl_Clear.m │ │ ├── optode_spring_tbl_CreateFcn.m │ │ ├── optode_spring_tbl_Init.m │ │ ├── optode_spring_tbl_Update.m │ │ ├── optode_spring_tbl_get_tbl_data.m │ │ └── optode_tbls2_Hide.m │ ├── probe_geometry_axes │ │ ├── getMeasListFromAxes.m │ │ ├── probe_geometry_axes_ButtonDownFcn.m │ │ ├── probe_geometry_axes_Clear.m │ │ ├── probe_geometry_axes_CreateFcn.m │ │ ├── probe_geometry_axes_DeleteOpt.m │ │ ├── probe_geometry_axes_DetUpdate.m │ │ ├── probe_geometry_axes_DummyUpdate.m │ │ ├── probe_geometry_axes_GetUserData.m │ │ ├── probe_geometry_axes_Hide.m │ │ ├── probe_geometry_axes_Init.m │ │ ├── probe_geometry_axes_SetAxisEqual.m │ │ └── probe_geometry_axes_SrcUpdate.m │ ├── probe_geometry_axes2 │ │ ├── getSpringListFromAxes.m │ │ ├── probe_geometry_axes2_ButtonDownFcn.m │ │ ├── probe_geometry_axes2_Clear.m │ │ ├── probe_geometry_axes2_CreateFcn.m │ │ ├── probe_geometry_axes2_GetUserData.m │ │ ├── probe_geometry_axes2_Hide.m │ │ ├── probe_geometry_axes2_Init.m │ │ ├── probe_geometry_axes2_OptUpdate.m │ │ ├── probe_geometry_axes2_SetAxisEqual.m │ │ └── probe_geometry_axes2_edges_ButtonDownFcn.m │ ├── sample_data │ │ ├── 111tap1.nirs │ │ ├── 111tap_run1.nirs │ │ ├── Simple_Probe.nirs │ │ ├── probe1.SD │ │ ├── probe2.SD │ │ ├── probe_large.SD │ │ ├── tw1.nirs │ │ └── twocyc158.nirs │ ├── sd_data │ │ ├── sd_data_AddDummyPos.m │ │ ├── sd_data_AddEditSpring.m │ │ ├── sd_data_AnyGrommetTypeSet.m │ │ ├── sd_data_AssignTbl.m │ │ ├── sd_data_Copy.m │ │ ├── sd_data_Delete3D.m │ │ ├── sd_data_DeleteDummyPos.m │ │ ├── sd_data_DeleteRegistrationData.m │ │ ├── sd_data_DeleteSpring.m │ │ ├── sd_data_Equal.m │ │ ├── sd_data_ErrorCheck.m │ │ ├── sd_data_ErrorFix.m │ │ ├── sd_data_Get.m │ │ ├── sd_data_GetAnchorList.m │ │ ├── sd_data_GetCoordNum.m │ │ ├── sd_data_GetGrommetChoices.m │ │ ├── sd_data_GetMeasList.m │ │ ├── sd_data_GetNwl.m │ │ ├── sd_data_GetSpringList.m │ │ ├── sd_data_Init.m │ │ ├── sd_data_InitLandmarks.m │ │ ├── sd_data_IsEmpty.m │ │ ├── sd_data_Set.m │ │ ├── sd_data_SetAnchorList.m │ │ ├── sd_data_SetDetGrommetRot.m │ │ ├── sd_data_SetDetGrommetType.m │ │ ├── sd_data_SetDetPos.m │ │ ├── sd_data_SetDetPos3D.m │ │ ├── sd_data_SetDummyGrommetRot.m │ │ ├── sd_data_SetDummyGrommetType.m │ │ ├── sd_data_SetDummyPos.m │ │ ├── sd_data_SetDummyPos3D.m │ │ ├── sd_data_SetLambda.m │ │ ├── sd_data_SetMeasList.m │ │ ├── sd_data_SetSpringList.m │ │ ├── sd_data_SetSrcGrommetRot.m │ │ ├── sd_data_SetSrcGrommetType.m │ │ ├── sd_data_SetSrcMap.m │ │ ├── sd_data_SetSrcMapDefault.m │ │ ├── sd_data_SetSrcMapEntry.m │ │ ├── sd_data_SetSrcPos.m │ │ └── sd_data_SetSrcPos3D.m │ ├── sd_file │ │ ├── sd_file_load.m │ │ ├── sd_file_load_bttn_Callback.m │ │ ├── sd_file_open.m │ │ ├── sd_file_panel_Clear.m │ │ ├── sd_file_panel_CreateFcn.m │ │ ├── sd_file_panel_GetPathname.m │ │ ├── sd_file_panel_GetPos.m │ │ ├── sd_file_panel_SetPathname.m │ │ ├── sd_file_save.m │ │ ├── sd_file_save2nirs.m │ │ ├── sd_file_save_bttn_Callback.m │ │ ├── sd_filename_edit_Get.m │ │ └── sd_filename_edit_Set.m │ ├── set_threshold.m │ ├── sort_ml.m │ ├── sort_sl.m │ └── utils │ │ ├── distmatrix.m │ │ ├── getCurrPathname.m │ │ ├── optodes_tbl_copy_data.m │ │ ├── redraw_text.m │ │ ├── redraw_text_many.m │ │ └── resize_axes.m ├── checkMeasList.m ├── checkRegistrationData.m ├── clearProbeProjection.m ├── compatibleProbes.m ├── convertProbe2SD.m ├── convertProbe3D_2_SD.m ├── convertSD2probe.m ├── displayProbe.m ├── displayProbeOnUnitCircle.m ├── displaySprings.m ├── displyMeasChannels_editOptode.m ├── displySprings_editOptode.m ├── drawMeasChannels.m ├── extractProbe.m ├── extractSDFromDataTree.m ├── findMeasMidPts.m ├── findUnique.m ├── findUniqueProbeFiles.m ├── genProbeFromRefpts.m ├── getProbe.m ├── getSD.m ├── importProbe.m ├── initProbe.m ├── initProbeProjection.m ├── isComplete.m ├── isPreRegisteredProbe.m ├── isProbeChanged.m ├── isProbeFlat.m ├── loadProbeFormTextFile.m ├── loadProbeFromDigpts.m ├── loadSD.m ├── plotProbePlacementVariation.m ├── preRegister.m ├── probeHas3DLandmarkRegistration.m ├── probeHasDigptsRegistration.m ├── probeHasLandmarkRegistration.m ├── probeHasSpringRegistration.m ├── pullProbeToHeadsurf.m ├── registerDigpts │ ├── C2S.m │ ├── ar_AlignPoints.m │ └── getProbeRegMethod.m ├── registerSprings │ ├── duplicate_anchors.m │ ├── gen_positionprobe_dat.m │ ├── getRegSpringError.m │ ├── optconn_auto_gen.m │ ├── position_flat_probe.m │ ├── positionprobe.m │ ├── registerProbe2Head.m │ ├── spring2posprobe.m │ └── write_positionprobe_dat.m ├── resetProbe.m ├── resetProbeGui.m ├── saveSD.m ├── setNumberOfOptodeTypes.m ├── setOptodeNumbering.m ├── setProbeDisplay.m ├── testGenProbe.m ├── updateProbe2DcircularPts.m ├── updateProbeGuiControls.m └── viewProbe.m ├── README.md ├── Refpts ├── 10-5-System_Mastoids_EGI129.csd ├── FindRefptsGUI.fig ├── FindRefptsGUI.m ├── RefptsSystemConfigGUI.fig ├── RefptsSystemConfigGUI.m ├── SelectEEGCurvesGUI.fig ├── SelectEEGCurvesGUI.m ├── alignRefptsWithXyz.m ├── calcRefpts.m ├── calcRefpts0.m ├── calcRefpts1.m ├── calcRefptsAlongCurve.m ├── calcRefptsCircumf.m ├── calcRefptsSmallscale.m ├── clearRefptsProjection.m ├── curve_gen.m ├── curve_walk.m ├── curvelen.m ├── displayCurve.m ├── displayRefpts.m ├── extract_eeg_labels.m ├── extract_eeg_pts.m ├── findCenterRefpts.m ├── findCorrespondingRefpts.m ├── findRefptsAxes.m ├── find_curve_path.m ├── gen_sparcer_curve.m ├── getLandmarks.m ├── getOrientation.m ├── getRefpts.m ├── getRefptsEarAnatomy.m ├── initRefpts.m ├── init_eeg_curve.m ├── init_eeg_curves0.m ├── init_eeg_curves1.m ├── init_eeg_pos.m ├── makeLandmarksBackwardCompatible.m ├── plane_equation.m ├── plane_surf_intersect.m ├── printRefpts.m ├── radiobuttonShowRefpts.m ├── saveRefpts.m ├── setRefptsEarAnatomy.m ├── setRefptsFontSize.m ├── setRefptsMenuItemSelection.m ├── set_eeg_active_pts.m ├── set_eeg_curve_select.m ├── showLandmarks.m ├── updateRefpts.m ├── updateSelectBttns.m ├── viewAxes.m ├── viewAxesRAS.m └── xform_apply_Refpts.m ├── Test ├── Test-AtlasViewer │ ├── atlasViewer.mat │ └── probe.SD └── Testing_procedure.pdf ├── Utils ├── DistanceBetween.m ├── EnableGUI.m ├── MakePlot3D.m ├── Shared │ ├── ConfigFileClass.m │ ├── CopyHandles.m │ ├── DebugLevel.m │ ├── GetFileSize.m │ ├── GetLastCheckForUpdates.m │ ├── InitConfig.m │ ├── InitLogger.m │ ├── Logger.m │ ├── MenuBox.m │ ├── MessageBox.m │ ├── OpenFileGUI.fig │ ├── OpenFileGUI.m │ ├── PrintSystemInfo.m │ ├── SetLastCheckForUpdates.m │ ├── Version.txt │ ├── buildpathfrompathparts.m │ ├── cd_safe.m │ ├── ceiln.m │ ├── cell2str.m │ ├── checkForUpdates.m │ ├── checkSharedLibCompatibility.m │ ├── checkToolboxes.m │ ├── configSettingsGUI.m │ ├── convert_optodepos_to_circlular_2D_pos.m │ ├── datestr2datenum.m │ ├── delimiter.m │ ├── dependencies.m │ ├── dist3.m │ ├── distinguishable_colors.m │ ├── distmatrix.m │ ├── ffpath.m │ ├── filesepStandard.m │ ├── findDotMFiles.m │ ├── findTypeFiles.m │ ├── floorn.m │ ├── fullpath.m │ ├── getAppDir.m │ ├── getCurrTime.m │ ├── getFreeDiskSpace.m │ ├── getParentRecursive.m │ ├── getPathRelative.m │ ├── getStandardOutputFuncName.m │ ├── getVernum.m │ ├── guiOutsideScreenBorders.m │ ├── guiUnitConversion.m │ ├── help_local.m │ ├── includes.m │ ├── isToolboxAvailable.m │ ├── isalnum.m │ ├── isbasictype.m │ ├── isblankline.m │ ├── isdigit.m │ ├── isdir_private.m │ ├── isfile_private.m │ ├── ishandles.m │ ├── islinux.m │ ├── isnumber.m │ ├── isolateDigits.m │ ├── ispathvalid.m │ ├── isproperty.m │ ├── isuppercase.m │ ├── isvalidfuncname.m │ ├── iswholenum.m │ ├── jsonlab │ │ ├── AUTHORS.txt │ │ ├── ChangeLog.txt │ │ ├── Contents.m │ │ ├── LICENSE_BSD.txt │ │ ├── LICENSE_GPLv3.txt │ │ ├── README.txt │ │ ├── base64decode.m │ │ ├── base64encode.m │ │ ├── decodevarname.m │ │ ├── encodevarname.m │ │ ├── fast_match_bracket.m │ │ ├── filterjsonmmap.m │ │ ├── getfromjsonpath.m │ │ ├── gzipdecode.m │ │ ├── gzipencode.m │ │ ├── isoctavemesh.m │ │ ├── jdatadecode.m │ │ ├── jdataencode.m │ │ ├── jload.m │ │ ├── jsave.m │ │ ├── jsonget.m │ │ ├── jsonopt.m │ │ ├── jsonset.m │ │ ├── loadbj.m │ │ ├── loadjd.m │ │ ├── loadjson.m │ │ ├── loadmsgpack.m │ │ ├── loadubjson.m │ │ ├── lz4decode.m │ │ ├── lz4encode.m │ │ ├── lz4hcdecode.m │ │ ├── lz4hcencode.m │ │ ├── lzipdecode.m │ │ ├── lzipencode.m │ │ ├── lzmadecode.m │ │ ├── lzmaencode.m │ │ ├── match_bracket.m │ │ ├── mergestruct.m │ │ ├── nestbracket2dim.m │ │ ├── savebj.m │ │ ├── savejd.m │ │ ├── savejson.m │ │ ├── savemsgpack.m │ │ ├── saveubjson.m │ │ ├── varargin2struct.m │ │ ├── zlibdecode.m │ │ └── zlibencode.m │ ├── line2.m │ ├── namespace │ │ ├── deleteNamespace.m │ │ ├── getNamespace.m │ │ └── setNamespace.m │ ├── nearest_point.m │ ├── optionExists.m │ ├── parseGitSubmodulesFile.m │ ├── parseOptions.m │ ├── pathscompare.m │ ├── points_on_line.m │ ├── positionGUI.m │ ├── pretty_print_matrix.m │ ├── pretty_print_struct.m │ ├── printStack.m │ ├── project_3D_to_2D.m │ ├── propnames.m │ ├── rePositionGuiWithinScreen.m │ ├── removeExtraDots.m │ ├── replaceSpecialChars.m │ ├── repoManagement │ │ ├── exeShellCmds.m │ │ ├── gitRevert.m │ │ ├── gitStatus.m │ │ ├── hasChanges.m │ │ ├── incrementVersion.m │ │ └── updateVersions.m │ ├── resamplee.m │ ├── rmdir_safe.m │ ├── setGuiFonts.m │ ├── setpaths_proprietary.m │ ├── simData │ │ ├── generateSimDataset.m │ │ ├── simulateDataTimeSeries.m │ │ └── simulateProbeData.m │ ├── sprintf_waitbar.m │ ├── str2cell.m │ ├── str2cell_fast.m │ ├── strcellfind.m │ ├── string2hash.m │ ├── strtrim_improve.m │ ├── tsv │ │ ├── generateSnirfStim.m │ │ ├── readTsv.m │ │ └── writeTsv.m │ ├── verGreaterThanOrEqual.m │ ├── version2string.m │ ├── versionnum2str.m │ ├── versionstr2num.m │ ├── waitForGui.m │ └── waitbar_improved.m ├── angleBetweenVectors.m ├── applyCoordTranspose.m ├── banner.m ├── calcCameraPosition.m ├── calcViewAxis.m ├── cell2array.m ├── checkForAtlasViewerUpdates.m ├── closeallwaitbars.m ├── comp_struct.m ├── cropSeparator.m ├── data_diff.m ├── displayCondLegend.m ├── displayIntensityOnMesh.m ├── drmDecode.p ├── drmIsEncoded.p ├── equal.m ├── fieldvalues.m ├── findClosestAxes.m ├── find_region_centers.m ├── findcenter.m ├── findjobj.m ├── findjobj_fast.m ├── fontresizedlg │ ├── FontSizeDlg.fig │ ├── FontSizeDlg.m │ ├── initFontSizeConfigParams.m │ └── resizeFonts.m ├── fs2viewer │ ├── ImportMriAnatomy.fig │ ├── ImportMriAnatomy.m │ ├── create_hseg.m │ ├── findMriFiles.m │ ├── fs2headvol.m │ ├── fs2pialsurf.m │ ├── fs2pialvol.m │ ├── gen_mri_nifti_files.m │ ├── getFs2Viewer.m │ ├── get_mri_vol2surf.m │ ├── headvol2headsurf.m │ ├── headvol2pialsurf.m │ ├── initFs2Viewer.m │ ├── isolate_volume.m │ ├── loadMri.m │ ├── loadNiftiToViewer.m │ ├── load_bin.m │ ├── mri_convert_batch.sh │ ├── pialvol2pialsurf.m │ ├── readsurf_trans.m │ ├── saveFs2Viewer.m │ ├── save_bin.m │ ├── segment_head.m │ ├── segment_head_vols.m │ ├── surf_file2vol.m │ ├── surface2volume.m │ └── vol2constvol.m ├── genHelpFunc.m ├── genInterpSurface.m ├── gen_bbox.m ├── gen_blob.m ├── gen_xform_from_pts.m ├── getCoordTranspose.m ├── getFileDateStruct.m ├── getOrientationCompl.m ├── getOrientationFromMriHdr.m ├── getRasXformFromOrientation.m ├── getViewAngles.m ├── imageDisplayPanel │ ├── createColorbar.m │ └── setImageDisplay_EmptyImage.m ├── img2mesh.m ├── initLayer.m ├── initMesh.m ├── inputdlg_errcheck.m ├── isOrientationValid.m ├── isSubjDir.m ├── isemptyMesh.m ├── isidentity.m ├── isintegerarr.m ├── isregistered.m ├── istextfile.m ├── leftRightFlipped.m ├── load_fs_pial.m ├── load_tiss_type.m ├── load_vox.m ├── meanweighted.m ├── meshdensity.m ├── my_isalpha_num.m ├── patchnormals.m ├── patchnormals_double.m ├── prepPtsStructForViewing.m ├── probe │ └── checkProbePositionRelativeToHead.m ├── pullPtsToSurf.m ├── real2str.m ├── reduceMesh.m ├── resetState.m ├── resizeVolume.m ├── rotateMatrixXaxis.m ├── rotateMatrixYaxis.m ├── rotateMatrixZaxis.m ├── save_tiss_type.m ├── save_vox.m ├── setViewAngles.m ├── showLandmarks.m ├── showReducedMesh.m ├── sl3dnormalize_copy.m ├── submodules │ ├── copyFolderContents.m │ ├── filesEqual.m │ ├── filesepStandard_startup.m │ ├── findAllFiles.m │ ├── findDotMFolders.m │ ├── findFolder.m │ ├── fullpath_startup.m │ ├── getLastRevisionDate.m │ ├── gitAdd.m │ ├── gitBranchExists.m │ ├── gitDelete.m │ ├── gitGetBranch.m │ ├── gitGetOrigin.m │ ├── gitLastRevDate.m │ ├── gitSetBranch.m │ ├── gitSetOrigin.m │ ├── gitSubmodulesClone.m │ ├── isIncompleteSubmodule.m │ ├── isdir_private_startup.m │ ├── isemptyFolder.m │ ├── isfile_private_startup.m │ ├── ispathvalid_startup.m │ ├── optionExists_startup.m │ ├── pathscompare_startup.m │ ├── pathsubtract_startup.m │ ├── removeExtraDots_startup.m │ ├── removeFolderContents.m │ ├── searchFiles.m │ ├── setTerminal.m │ ├── str2cell_startup.m │ ├── syncSubmodules.m │ └── waitForGui_startup.m ├── suppressGuiArgWarning.m ├── viewPts.m ├── viewsurf.m ├── viewsurf2.m ├── viewsurf3.m ├── viewvol_in3d_points.m ├── vrrotvec2mat_copy.m ├── vrrotvec_copy.m ├── waitbar_msg_print.m ├── xform_apply.m └── xform_apply_vol_smooth.m ├── Version.txt ├── buttonZoomIn_Callback.m ├── buttonZoomOut_Callback.m ├── editDegRotation_Callback.m ├── freesurfer ├── MRIfspec.m ├── MRIinit.m ├── MRIread.m ├── MRIwrite.m ├── README ├── Simple_surface_labels2009.txt ├── colortable_BA.txt ├── colortable_desikan_killiany.txt ├── fast_fileexists.m ├── fast_ldbhdr.m ├── fast_ldbslice.m ├── fast_svbhdr.m ├── fast_svbslice.m ├── fmri_ldbfile.m ├── fread3.m ├── fwrite3.m ├── isdicomfile.m ├── load_analyze.m ├── load_analyze_hdr.m ├── load_dicom_fl.m ├── load_dicom_series.m ├── load_mgh.m ├── load_nifti.m ├── load_nifti_hdr.m ├── mri_datatype.m ├── read_annotation.m ├── read_curv.m ├── read_fscolorlut.m ├── read_label.m ├── read_surf.m ├── reshape1d.m ├── reshape2d.m ├── save_mgh.m ├── save_nifti.m ├── strlen.m ├── vox2rasToQform.m ├── vox2ras_0to1.m ├── vox2ras_1to0.m ├── vox2ras_dfmeas.m ├── vox2ras_ksolve.m ├── vox2ras_rsolve.m ├── vox2ras_rsolveAA.m ├── vox2ras_tkreg.m └── write_surf.m ├── genProbeFromFluenceProf.m ├── getAtlasDir.m ├── getSubjDir.m ├── isAtlasDir.m ├── iso2mesh ├── AUTHORS.txt ├── COPYING.txt ├── ChangeLog.txt ├── Content.txt ├── Download_and_License.txt ├── FAQ.txt ├── Get_Started.txt ├── README.txt ├── TODO.txt ├── advancefront.m ├── bbxflatsegment.m ├── bin │ ├── README.txt │ ├── cgalmesh.exe │ ├── cgalmesh.mexa64 │ ├── cgalmesh.mexglx │ ├── cgalmesh.mexmaci │ ├── cgalmesh.mexmaci64 │ ├── cgalpoly.exe │ ├── cgalpoly.mexa64 │ ├── cgalpoly.mexglx │ ├── cgalpoly.mexmaci │ ├── cgalpoly.mexmaci64 │ ├── cgalsimp2.exe │ ├── cgalsimp2.mexglx │ ├── cgalsimp2.mexmac │ ├── cgalsimp2.mexmaci │ ├── cgalsimp2.mexmaci64 │ ├── cgalsurf.exe │ ├── cgalsurf.mexa64 │ ├── cgalsurf.mexglx │ ├── cgalsurf.mexmaci │ ├── cgalsurf.mexmaci64 │ ├── cork.mexa64 │ ├── cork.mexmaci64 │ ├── jmeshlib.exe │ ├── jmeshlib.mexa64 │ ├── jmeshlib.mexarmhf │ ├── jmeshlib.mexglx │ ├── jmeshlib.mexmac │ ├── jmeshlib.mexmaci │ ├── jmeshlib.mexmaci64 │ ├── meshfix.exe │ ├── meshfix.mexa64 │ ├── meshfix.mexarmhf │ ├── meshfix.mexglx │ ├── meshfix.mexmaci │ ├── meshfix.mexmaci64 │ ├── meshfix_x86_64.exe │ └── mpfr-vc80-mt.dll ├── binsurface.m ├── bwislands.m ├── cgals2m.m ├── cgalv2m.m ├── deislands2d.m ├── deislands3d.m ├── delendelem.m ├── deletemeshfile.m ├── doc │ ├── Advanced_Features.txt │ ├── Download_and_License.txt │ ├── FAQ.txt │ ├── Get_Started.txt │ ├── INSTALL.txt │ └── gendoc.sh ├── edgeneighbors.m ├── elemvolume.m ├── extractloops.m ├── extrudecurve.m ├── faceneighbors.m ├── fallbackexeext.m ├── fillholes3d.m ├── fillsurf.m ├── finddisconnsurf.m ├── findiso2meshbin.m ├── flatsegment.m ├── gendoc.sh ├── gendocs.sh ├── getexeext.m ├── getexeextfinal.m ├── getintersecttri.m ├── getoptkey.m ├── getplanefrom3pt.m ├── getvarfrom.m ├── highordertet.m ├── imedge3d.m ├── innersurf.m ├── insurface.m ├── internalpoint.m ├── iso2mesh_workflow.jpg ├── iso2meshver.m ├── isoctavemesh.m ├── jsonopt.m ├── latticegrid.m ├── loadjson.m ├── loadubjson.m ├── m2v.m ├── maxsurf.m ├── mcpath.m ├── mergemesh.m ├── mergestruct.m ├── mergesurf.m ├── mesh2mask.m ├── mesh2vol.m ├── meshabox.m ├── meshacylinder.m ├── meshanellip.m ├── meshasphere.m ├── meshcentroid.m ├── meshcheckrepair.m ├── meshconn.m ├── meshcylinders.m ├── meshedge.m ├── mesheuler.m ├── meshgrid5.m ├── meshgrid6.m ├── meshquality.m ├── meshrefine.m ├── meshreorient.m ├── meshresample.m ├── meshunitsphere.m ├── mwpath.m ├── neighborelem.m ├── nodevolume.m ├── orderloopedge.m ├── orthdisk.m ├── outersurf.m ├── plotedges.m ├── plotmesh.m ├── plotsurf.m ├── plottetra.m ├── qmeshcut.m ├── rat_head.mat ├── raysurf.m ├── raytrace.m ├── readasc.m ├── readgts.m ├── readinr.m ├── readmedit.m ├── readoff.m ├── readsmf.m ├── readtetgen.m ├── remeshsurf.m ├── removedupelem.m ├── removedupnodes.m ├── removeisolatednode.m ├── removeisolatedsurf.m ├── rotatevec3d.m ├── rotmat2vec.m ├── s2m.m ├── s2v.m ├── saveabaqus.m ├── saveasc.m ├── savebinstl.m ├── savedxf.m ├── savegts.m ├── saveinr.m ├── savejmesh.m ├── savejson.m ├── savemedit.m ├── savemphtxt.m ├── savemsh.m ├── saveoff.m ├── savesmf.m ├── savestl.m ├── savesurfpoly.m ├── savetetgenele.m ├── savetetgennode.m ├── saveubjson.m ├── savevrml.m ├── smoothbinvol.m ├── smoothsurf.m ├── sms.m ├── sortmesh.m ├── struct2jdata.m ├── surf2mesh.m ├── surf2vol.m ├── surf2volz.m ├── surfaceclean.m ├── surfacenorm.m ├── surfboolean.m ├── surfdiffuse.m ├── surfedge.m ├── surfinterior.m ├── surfpart.m ├── surfplane.m ├── surfreorient.m ├── surfseeds.m ├── surfvolume.m ├── thickenbinvol.m ├── thinbinvol.m ├── uniqedges.m ├── v2m.m ├── v2s.m ├── varargin2struct.m ├── vol2mesh.m ├── vol2restrictedtri.m ├── vol2surf.m ├── volface.m └── volmap2mesh.m ├── metch ├── COPYING ├── affinemap.m ├── dist2surf.m ├── getplanefrom3pt.m ├── linextriangle.m ├── nodesurfnorm.m ├── proj2mesh.m ├── regpt2surf.m └── trisurfnorm.m ├── pushbuttonRotDown_Callback.m ├── pushbuttonRotHorizontalLeft_Callback.m ├── pushbuttonRotHorizontalRight_Callback.m ├── pushbuttonRotUp_Callback.m ├── pushbuttonRotVerticalLeft_Callback.m ├── pushbuttonRotVerticalRight_Callback.m ├── selectAtlasDir.m ├── setOrientationDigpts.m ├── setOrientationHeadvol.m ├── setOrientationRefpts.m ├── setpaths.m ├── toolboxesRequired.txt ├── uipanelBrainDisplay.m └── updateGuiControls_AfterProbeRegistration.m /.gitignore: -------------------------------------------------------------------------------- 1 | Group/FuncRegistry/UserFunctions/Registry.mat 2 | Data/Colin/fw/fluenceProf1.mat 3 | *.log 4 | LastCheckForUpdates.dat 5 | *.snirf 6 | 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Utils/Shared"] 2 | path = Utils/Shared 3 | url = https://github.com/BUNPC/Utils 4 | [submodule "Group/DataTree"] 5 | path = Group/DataTree 6 | url = https://github.com/BUNPC/DataTree 7 | -------------------------------------------------------------------------------- /AnatomyExists.m: -------------------------------------------------------------------------------- 1 | function b = AnatomyExists(dirname) 2 | 3 | b = false; 4 | 5 | if ~exist('dirname','var') 6 | dirname = pwd; 7 | end 8 | if dirname(end)~='/' && dirname(end)~='\' 9 | dirname(end+1)='/'; 10 | end 11 | dirnameAnat = [dirname, 'anatomical/']; 12 | 13 | if exist([dirnameAnat, 'headsurf.mesh'],'file') 14 | b=true; 15 | end 16 | if exist([dirnameAnat, 'headvol.vox'],'file') 17 | b=true; 18 | end 19 | 20 | 21 | -------------------------------------------------------------------------------- /AtlasViewerGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/AtlasViewerGUI.fig -------------------------------------------------------------------------------- /AtlasViewerGUI_version.m: -------------------------------------------------------------------------------- 1 | function verstr = AtlasViewerGUI_version(hObject) 2 | 3 | if ~exist('hObject','var') 4 | hObject = -1; 5 | end 6 | 7 | verstr = getVernum('AtlasViewerGUI'); 8 | if ishandle(hObject) 9 | set(hObject,'name', banner()); 10 | end 11 | -------------------------------------------------------------------------------- /Axesv/getUpVector.m: -------------------------------------------------------------------------------- 1 | function v = getUpVector(orientation) 2 | 3 | v = []; 4 | o = orientation; 5 | 6 | if isempty(o) 7 | return; 8 | end 9 | 10 | % Make sure we are dealing with a righ handed coordinate system 11 | if leftRightFlipped(o) 12 | o = [o(2), o(1), o(3)]; 13 | end 14 | 15 | if o(1)=='S' 16 | v = [1,0,0]; 17 | elseif o(1)=='I' 18 | v = [-1,0,0]; 19 | end 20 | if o(2)=='S' 21 | v = [0,1,0]; 22 | elseif o(2)=='I' 23 | v = [0,-1,0]; 24 | end 25 | if o(3)=='S' 26 | v = [0,0,1]; 27 | elseif o(3)=='I' 28 | v = [0,0,-1]; 29 | end 30 | -------------------------------------------------------------------------------- /Axesv/getZoomDistance.m: -------------------------------------------------------------------------------- 1 | function d = getZoomDistance() 2 | global atlasViewer 3 | p1 = get(atlasViewer.axesv.handles.axesSurfDisplay, 'CameraTarget'); 4 | p2 = get(atlasViewer.axesv.handles.axesSurfDisplay, 'CameraPosition'); 5 | d = uint64(dist3(p1, p2)); 6 | 7 | -------------------------------------------------------------------------------- /Axesv/rotDown.m: -------------------------------------------------------------------------------- 1 | function axesv = rotDown(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camorbit(axesv.handles.axesSurfDisplay, 0, deg, 'camera'); 7 | -------------------------------------------------------------------------------- /Axesv/rotHorizontalLeft.m: -------------------------------------------------------------------------------- 1 | function axesv = rotHorizontalLeft(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camorbit(axesv.handles.axesSurfDisplay, deg, 0, 'camera'); 7 | -------------------------------------------------------------------------------- /Axesv/rotHorizontalRight.m: -------------------------------------------------------------------------------- 1 | function axesv = rotHorizontalRight(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camorbit(axesv.handles.axesSurfDisplay, -deg, 0,'camera'); 7 | -------------------------------------------------------------------------------- /Axesv/rotUp.m: -------------------------------------------------------------------------------- 1 | function axesv = rotUp(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camorbit(axesv.handles.axesSurfDisplay, 0, -deg, 'camera'); 7 | -------------------------------------------------------------------------------- /Axesv/rotVerticalLeft.m: -------------------------------------------------------------------------------- 1 | function axesv = rotVerticalLeft(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camroll(axesv.handles.axesSurfDisplay, deg); 7 | -------------------------------------------------------------------------------- /Axesv/rotVerticalRight.m: -------------------------------------------------------------------------------- 1 | function axesv = rotVerticalRight(axesv, deg) 2 | 3 | if ~exist('deg','var') 4 | deg = axesv.rotation.degrees; 5 | end 6 | camroll(axesv.handles.axesSurfDisplay, -deg); 7 | -------------------------------------------------------------------------------- /Axesv/setOrientation.m: -------------------------------------------------------------------------------- 1 | function axesv = setOrientation(axesv,verr,verl,horr,horl,up,down) 2 | 3 | % Usage: setOrientation(axesv,verr,verl,horr,horl,up,down) 4 | 5 | axesv = rotVerticalLeft(axesv, verl); 6 | axesv = rotVerticalRight(axesv, verr); 7 | axesv = rotUp(axesv, up); 8 | axesv = rotDown(axesv, down); 9 | axesv = rotHorizontalLeft(axesv, horl); 10 | axesv = rotHorizontalRight(axesv, horr); 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Axesv/setZoom.m: -------------------------------------------------------------------------------- 1 | function setZoom(haxes, d1) 2 | cp0 = get(haxes, 'cameraposition'); 3 | ct0 = get(haxes, 'cameratarget'); 4 | va = cp0-ct0; 5 | d0 = dist3(cp0, ct0); 6 | k = d1/d0; 7 | cp_new = ct0 + (va * k); 8 | v_up = get(haxes, 'cameraupvector'); 9 | if angleBetweenVectors(abs(va), abs(v_up))==0 10 | v_up = [va(2), va(1), va(3)]; 11 | end 12 | set(haxes, 'cameraupvector',v_up); 13 | set(haxes, 'cameraposition',cp_new); 14 | 15 | -------------------------------------------------------------------------------- /Axesv/updateViewAngles.m: -------------------------------------------------------------------------------- 1 | function updateViewAngles(ii, az, el) 2 | global atlasViewer 3 | 4 | atlasViewer.axesv(ii).azimuth = az; 5 | atlasViewer.axesv(ii).elevation = el; 6 | 7 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/Colin/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 0.0000000e+00 1.0000000e+00 0.0000000e+00 0.0000000e+00 2 | 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 3 | 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/Colin/anatomical/headvol2ras.txt: -------------------------------------------------------------------------------- 1 | -1.00000 0.00000 0.00000 128.00000 2 | 0.00000 0.00000 1.00000 -128.00000 3 | 0.00000 -1.00000 0.00000 128.00000 4 | 0.00000 0.00000 0.00000 1.00000 5 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 2.5600000e+02 2.5600000e+02 2.5600000e+02 2 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/labelssurf.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/anatomical/labelssurf.mat -------------------------------------------------------------------------------- /Data/Colin/anatomical/labelssurf2vol.txt: -------------------------------------------------------------------------------- 1 | -1 0 0 132 2 | 0 0 -1 150 3 | 0 1 0 142 4 | 0 0 0 1 5 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/Colin/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | -1.0000000e+00 0.0000000e+00 0.0000000e+00 1.2800000e+02 2 | 0.0000000e+00 0.0000000e+00 -1.0000000e+00 1.2800000e+02 3 | 0.0000000e+00 1.0000000e+00 0.0000000e+00 1.2800000e+02 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/Colin/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 2 | 0.0000000e+00 1.0000000e+00 0.0000000e+00 0.0000000e+00 3 | 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/Colin/fw/fluenceProfs.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/fw/fluenceProfs.tar -------------------------------------------------------------------------------- /Data/Colin/fw/pialsurf_sensitivity.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/fw/pialsurf_sensitivity.mesh -------------------------------------------------------------------------------- /Data/Colin/fw/projVoltoMesh_brain.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/fw/projVoltoMesh_brain.mat -------------------------------------------------------------------------------- /Data/Colin/fw/projVoltoMesh_scalp.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Colin/fw/projVoltoMesh_scalp.mat -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/29w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/29w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/29w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/29w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/30w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/30w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/30w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/30w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/31w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/31w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/31w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/31w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/32w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/32w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/32w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/32w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/33w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/33w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/33w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/33w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/34w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/34w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/34w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/34w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/35w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/35w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/35w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/35w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/36w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/36w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/36w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/36w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/37w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/37w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/37w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/37w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/38w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/38w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/38w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/38w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/39w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/39w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/39w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/39w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/40w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/40w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/40w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/40w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/41w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/41w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/41w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/41w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/42w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/42w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/42w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/42w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/43w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/43w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/43w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/43w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/headsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/44w/anatomical/headsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/headsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/headvol.vox.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/44w/anatomical/headvol.vox.gz -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/headvol_dims.txt: -------------------------------------------------------------------------------- 1 | 1.1700000e+02 1.5900000e+02 1.2600000e+02 2 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/headvol_tiss_type.txt: -------------------------------------------------------------------------------- 1 | scalp 2 | csf 3 | gm 4 | wm 5 | brainstem 6 | cerebellum 7 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/pialsurf.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/NeonatalHeadModels/44w/anatomical/pialsurf.mesh -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/pialsurf2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/NeonatalHeadModels/44w/anatomical/refpts2vol.txt: -------------------------------------------------------------------------------- 1 | 1.1636364e+00 0.0000000e+00 0.0000000e+00 6.0000000e+01 2 | 0.0000000e+00 1.1636364e+00 0.0000000e+00 9.7945463e+01 3 | 0.0000000e+00 0.0000000e+00 1.1636364e+00 4.5054550e+01 4 | 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 5 | -------------------------------------------------------------------------------- /Data/Stats/refpts_stats_Adults1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Data/Stats/refpts_stats_Adults1.mat -------------------------------------------------------------------------------- /Digpts/Headsize/ellipse_1020_costfun.m: -------------------------------------------------------------------------------- 1 | function f = ellipse_1020_costfun(x, headsize) 2 | 3 | a = x(1); % Al to Ar axis 4 | b = x(2); % Nz to Iz axis 5 | c = x(3); % Cz axis 6 | 7 | % HC 8 | h = (a-b)^2 / (a+b)^2; 9 | HC = 3.14159 * (a+b) * (1+3*h/(10+sqrt(4-3*h))); 10 | 11 | % IzNz 12 | h = (b-c)^2 / (b+c)^2; 13 | IzNz = 3.14159 * (b+c) * (1+3*h/(10+sqrt(4-3*h))) * 1.2/2; 14 | 15 | % AlAr 16 | h = (a-c)^2 / (a+c)^2; 17 | AlAr = 3.14159 * (a+c) * (1+3*h/(10+sqrt(4-3*h))) * 1.2/2; 18 | 19 | %[HC IzNz AlAr] 20 | f = (HC-headsize.HC)^2 + (IzNz-headsize.NzCzIz)^2 + (AlAr-headsize.LPACzRPA)^2; 21 | 22 | -------------------------------------------------------------------------------- /Digpts/Headsize/extractHeadsize.m: -------------------------------------------------------------------------------- 1 | function [HC, NzCzIz, LPACzRPA] = extractHeadsize(headsize) 2 | scalefactor = .1; 3 | 4 | if headsize.isempty(headsize) 5 | HC = headsize.default.HC; 6 | NzCzIz = headsize.default.NzCzIz; 7 | LPACzRPA = headsize.default.LPACzRPA; 8 | else 9 | HC = headsize.HC; 10 | NzCzIz = headsize.NzCzIz; 11 | LPACzRPA = headsize.LPACzRPA; 12 | end 13 | HC = scalefactor*HC; 14 | NzCzIz = scalefactor*NzCzIz; 15 | LPACzRPA = scalefactor*LPACzRPA; 16 | 17 | -------------------------------------------------------------------------------- /Digpts/Headsize/setHeadsize.m: -------------------------------------------------------------------------------- 1 | function headsize = setHeadsize(headsize, headsizeParams) 2 | 3 | % This function expects headsizeParams to be numeric strings of 4 | % head size in cm units 5 | 6 | headsize.HC = str2num(headsizeParams{1})*10; 7 | headsize.NzCzIz = str2num(headsizeParams{2})*10; 8 | headsize.LPACzRPA = str2num(headsizeParams{3})*10; 9 | 10 | -------------------------------------------------------------------------------- /Digpts/existDigpts.m: -------------------------------------------------------------------------------- 1 | function b = existDigpts(digpts) 2 | 3 | b=1; 4 | if isempty(digpts) 5 | b=0; 6 | end 7 | if ~isfield(digpts,'refpts') 8 | b=0; 9 | end 10 | if ~isstruct(digpts) 11 | b=0; 12 | end 13 | -------------------------------------------------------------------------------- /Digpts/isHeadsizeEmpty.m: -------------------------------------------------------------------------------- 1 | function b = isHeadsizeEmpty(digpts) 2 | b = true; 3 | if isempty(digpts.headsize.HC) 4 | return 5 | end 6 | if isempty(digpts.headsize.NzCzIz) 7 | return 8 | end 9 | if isempty(digpts.headsize.LPACzRPA) 10 | return 11 | end 12 | b = false; 13 | -------------------------------------------------------------------------------- /Digpts/xformDigpts.m: -------------------------------------------------------------------------------- 1 | function digpts = xformDigpts(digpts, refpts) 2 | 3 | if ~exist('refpts','var') || isempty(refpts) 4 | refpts = []; 5 | end 6 | [rp_atlas, rp_subj] = findCorrespondingRefpts(refpts, digpts.refpts); 7 | T = gen_xform_from_pts(rp_subj, rp_atlas); 8 | 9 | digpts.refpts.pos = xform_apply(digpts.refpts.pos, T); 10 | digpts.pcpos = xform_apply(digpts.pcpos, T); 11 | digpts.srcpos = xform_apply(digpts.srcpos, T); 12 | digpts.detpos = xform_apply(digpts.detpos, T); 13 | digpts.center = digpts.refpts.center; 14 | 15 | digpts.T_2vol = T; -------------------------------------------------------------------------------- /Docs/DesignNotes.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Docs/DesignNotes.odp -------------------------------------------------------------------------------- /Docs/DesignNotes.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Docs/DesignNotes.ppt -------------------------------------------------------------------------------- /ForwardModel/enableDisableMCoutputGraphics.m: -------------------------------------------------------------------------------- 1 | function fwmodel = enableDisableMCoutputGraphics(fwmodel, onoff) 2 | 3 | handles = fwmodel.handles; 4 | if strcmp(onoff,'off') 5 | set(handles.menuItemGenerateLoadSensitivityProfile,'enable','off'); 6 | set(handles.menuItemEnableSensitivityMatrixVolume,'enable','off'); 7 | elseif strcmp(onoff,'on') 8 | if ~isempty(fwmodel.Adot) | (~isempty(fwmodel.errMCoutput) & all(fwmodel.errMCoutput==3)) 9 | set(handles.menuItemGenerateLoadSensitivityProfile,'enable','on'); 10 | set(handles.menuItemEnableSensitivityMatrixVolume,'enable','on'); 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /ForwardModel/enableFwmodelDisplay.m: -------------------------------------------------------------------------------- 1 | function fwmodel = enableFwmodelDisplay(fwmodel, val) 2 | 3 | if val==0 4 | val='off'; 5 | elseif val==1 6 | val='on'; 7 | end 8 | 9 | set(fwmodel.handles.menuItemGetSensitivityatMNICoordinates,'enable',val); 10 | -------------------------------------------------------------------------------- /ForwardModel/enableMCGenGuiControls.m: -------------------------------------------------------------------------------- 1 | function fwmodel = enableMCGenGuiControls(fwmodel, onoff) 2 | 3 | handles = fwmodel.handles; 4 | if strcmp(onoff,'off') 5 | set(handles.menuItemGenerateMCInput,'enable','off'); 6 | set(handles.menuItemGenFluenceProfile,'enable','off'); 7 | set(handles.menuItemLoadPrecalculatedProfile,'enable','off'); 8 | elseif strcmp(onoff,'on') 9 | set(handles.menuItemGenerateMCInput,'enable','on'); 10 | set(handles.menuItemGenFluenceProfile,'enable','on'); 11 | if ~isempty(fwmodel.fluenceProfFnames) 12 | set(handles.menuItemLoadPrecalculatedProfile,'enable','on'); 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /ForwardModel/enableSensitivityMatrixVolume.m: -------------------------------------------------------------------------------- 1 | function fwmodel = enableSensitivityMatrixVolume(fwmodel,val) 2 | 3 | fwmodel.AdotVolFlag = val; 4 | 5 | -------------------------------------------------------------------------------- /ForwardModel/getFwmodel_DisplayPanelImage.m: -------------------------------------------------------------------------------- 1 | function img = getFwmodel_DisplayPanelImage(fwmodel) 2 | 3 | % Wavelength to display always one for now. TBD: Add feature to select 4 | % between wavelengths 5 | iW = 1; 6 | if all(fwmodel.Adot(fwmodel.iCh(1),:,iW)==0) 7 | img = fwmodel.cmThreshold(1).*ones(size(sum(fwmodel.Adot(fwmodel.iCh,:,iW),1),2), 1); 8 | else 9 | img = log10(sum(fwmodel.Adot(fwmodel.iCh,:,iW),1)); 10 | end 11 | 12 | -------------------------------------------------------------------------------- /ForwardModel/getMCoutputExt.m: -------------------------------------------------------------------------------- 1 | function [ext, loadMCFuncPtr] = getMCoutputExt(mc_appname) 2 | 3 | ext = ''; 4 | loadMCFuncPtr = []; 5 | switch(mc_appname) 6 | case 'tMCimg' 7 | ext = '2pt'; 8 | loadMCFuncPtr = @load_tMCimg_2pt; 9 | case 'mcx' 10 | ext = 'inp.mc2'; 11 | loadMCFuncPtr = @loadmc2; 12 | end 13 | 14 | -------------------------------------------------------------------------------- /ForwardModel/get_tiss_prop.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ForwardModel/get_tiss_prop.m -------------------------------------------------------------------------------- /ForwardModel/initFluenceProf.m: -------------------------------------------------------------------------------- 1 | function f = initFluenceProf() 2 | 3 | f = struct(... 4 | 'intensities',[], ... 5 | 'voxPerNode',[], ... 6 | 'mesh',initMesh(), ... 7 | 'srcpos',[], ... 8 | 'normfactors',[], ... 9 | 'nphotons', 0, ... 10 | 'tiss_prop',[], ... 11 | 'index',0, ... 12 | 'last',[] ... 13 | ); 14 | 15 | -------------------------------------------------------------------------------- /ForwardModel/isMCapp.m: -------------------------------------------------------------------------------- 1 | function b = isMCapp(name) 2 | 3 | b = ismember(name, mcAppList()); 4 | 5 | -------------------------------------------------------------------------------- /ForwardModel/isregisteredFwmodel.m: -------------------------------------------------------------------------------- 1 | function b = isregisteredFwmodel(fwmodel, headvol) 2 | 3 | EPS = 1e-5; 4 | 5 | b1 = false; 6 | b2 = false; 7 | 8 | if all(abs(fwmodel.headvol.T_2digpts(:) - headvol.T_2digpts(:)) < EPS) 9 | b1 = true; 10 | end 11 | if ~isempty(fwmodel.headvol.img) 12 | b2 = true; 13 | end 14 | 15 | b = b1 & b2; 16 | 17 | -------------------------------------------------------------------------------- /ForwardModel/mcAppList.m: -------------------------------------------------------------------------------- 1 | function [mc_appnamelist, mc_appextin, mc_appextout] = mcAppList() 2 | 3 | mc_appnamelist = {'tMCimg','mcx'}; 4 | mc_appextin = {'.inp','.inp'}; 5 | mc_appextout = {'.2pt','.inp.mc2'}; 6 | 7 | 8 | -------------------------------------------------------------------------------- /ForwardModel/resetMC.m: -------------------------------------------------------------------------------- 1 | function fwmodel = resetMC(fwmodel) 2 | 3 | try 4 | delete([fwmodel.pathname, 'fw/*.2pt']) 5 | catch 6 | end 7 | 8 | try 9 | delete([fwmodel.pathname, 'fw/*.mc2']) 10 | catch 11 | end 12 | 13 | try 14 | delete([fwmodel.pathname, 'fw/*.his']) 15 | catch 16 | end 17 | 18 | try 19 | delete([fwmodel.pathname, 'fw/Adot*']) 20 | catch 21 | end 22 | 23 | -------------------------------------------------------------------------------- /ForwardModel/resetSensitivity.m: -------------------------------------------------------------------------------- 1 | function fwmodel = resetSensitivity(fwmodel, ~, ~) 2 | 3 | % Turn off controls related to projecting fwmodel onto pialsurf. 4 | % We'll turn them back on if probe registration is successful 5 | if ishandles(fwmodel.handles.surf) 6 | setImageDisplay_EmptyImage([], 'on') 7 | delete(fwmodel.handles.surf); 8 | fwmodel.handles.surf = []; 9 | end 10 | 11 | -------------------------------------------------------------------------------- /ForwardModel/setMCFields.m: -------------------------------------------------------------------------------- 1 | function fwmodel = setMCFields(fwmodel, mc_exepath, mc_exename, mc_appname, mc_exename_ext) 2 | 3 | if exist(mc_exepath,'dir')==7 4 | fwmodel.mc_exepath = mc_exepath; 5 | end 6 | if exist([mc_exepath, mc_exename],'file')==2 7 | fwmodel.mc_exename = mc_exename; 8 | end 9 | 10 | if ~isempty(mc_exename) 11 | fwmodel.mc_appname = mc_appname; 12 | fwmodel.mc_exename_ext = mc_exename_ext; 13 | end 14 | 15 | fwmodel.mc_rootpath = mc_exename; 16 | k = findstr(mc_exepath, mc_appname); 17 | if ~isempty(k) 18 | fwmodel.mc_rootpath = mc_exepath(1:k+length(mc_appname)); 19 | end 20 | -------------------------------------------------------------------------------- /ForwardModel/setMCoptions.m: -------------------------------------------------------------------------------- 1 | function fwmodel = setMCoptions(fwmodel) 2 | 3 | 4 | % Set MC options based on app type 5 | switch(fwmodel.mc_appname) 6 | case 'tMCimg' 7 | fwmodel.mc_options = ''; 8 | case 'mcx' 9 | fwmodel.mc_options = sprintf(' -n %g -U 0 -S 1 -f ', fwmodel.nphotons); 10 | end 11 | -------------------------------------------------------------------------------- /ForwardModel/showFwmodelDisplay.m: -------------------------------------------------------------------------------- 1 | function fwmodel = showFwmodelDisplay(fwmodel, hAxes, val) 2 | 3 | if ~ishandles(fwmodel.handles.surf) 4 | return; 5 | end 6 | if isempty(hAxes) 7 | hAxes = gca; 8 | end 9 | 10 | if val==0 11 | val='off'; 12 | elseif val==1 13 | val='on'; 14 | end 15 | 16 | if strcmp(val,'off') 17 | fwmodel = setSensitivityColormap(fwmodel, []); 18 | elseif strcmp(val,'on') 19 | fwmodel = setSensitivityColormap(fwmodel, hAxes); 20 | end 21 | set(fwmodel.handles.surf, 'visible',val); 22 | setImageDisplay_EmptyImage(fwmodel.handles.surf, val) 23 | 24 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | 2 | Monte-Carlo Simulation Code Contributors 3 | 4 | The original author of the tMCimg code is David Boas (dboas nmr.mgh.harvard.edu). 5 | 6 | This code is currently maintained by 7 | * Jay Dubb (jdubb nmr.mgh.harvard.edu) 8 | * Qianqian Fang (fangq nmr.mgh.harvard.edu) 9 | 10 | Please see ChangeLog for detailed contributions. 11 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/Darwin/tMCimg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ForwardModel/tMCimg/bin/Darwin/tMCimg -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/Linux/emptyfile.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ForwardModel/tMCimg/bin/Linux/emptyfile.txt -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/Win/tMCimg.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ForwardModel/tMCimg/bin/Win/tMCimg.exe -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/mc_sphere_seg.inp: -------------------------------------------------------------------------------- 1 | 1000000 2 | -1182763 3 | 50 24 34 4 | -5.050763e-01 8.081220e-01 3.030457e-01 5 | 0 5.000000e-09 6.000000e-09 6 | ./sphere_seg.bin 7 | 2 40 1 40 8 | 2 40 1 40 9 | 2 40 1 40 10 | 2 11 | 6.600000e-01 1.000000e-03 1.910000e-02 1 12 | 8.600000e-01 1.000000e-03 1.360000e-02 1 13 | 1 1 14 | 28 26 34 15 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/tMCimgRunExample.bat: -------------------------------------------------------------------------------- 1 | .\win\tMCimg.exe mc_sphere_seg 2 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/bin/tMCimgRunExample.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | OS=`uname` 3 | ./$OS/tMCimg sphere_seg 4 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/build.bat: -------------------------------------------------------------------------------- 1 | cd .\src 2 | call .\build.bat 3 | cd .. 4 | exit 5 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/install_linux_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | OS_TYPE=`uname` 3 | 4 | mkdir -p bin 5 | mkdir -p bin/$OS_TYPE 6 | mkdir -p obj 7 | mkdir -p obj/$OS_TYPE 8 | 9 | echo cp makefile.linux_mac makefile 10 | cp makefile.linux_mac makefile 11 | 12 | echo cp src/makefile.$OS_TYPE src/makefile 13 | cp src/makefile.$OS_TYPE src/makefile 14 | 15 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/makefile: -------------------------------------------------------------------------------- 1 | 2 | all:: 3 | for i in src; do (cd $$i ; make opt); done 4 | opt:: 5 | for i in src; do (cd $$i ; make opt); done 6 | debug:: 7 | for i in src; do (cd $$i ; make debug); done 8 | clean:: 9 | for i in src; do (cd $$i ; make clean); done 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/makefile.linux_mac: -------------------------------------------------------------------------------- 1 | 2 | all:: 3 | for i in src; do (cd $$i ; make opt); done 4 | opt:: 5 | for i in src; do (cd $$i ; make opt); done 6 | debug:: 7 | for i in src; do (cd $$i ; make debug); done 8 | clean:: 9 | for i in src; do (cd $$i ; make clean); done 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/makefile.win: -------------------------------------------------------------------------------- 1 | 2 | 3 | default:: 4 | cd src 5 | make opt 6 | opt:: 7 | cd src 8 | make opt 9 | debug:: 10 | cd src 11 | make debug 12 | clean:: 13 | cd src 14 | make clean 15 | 16 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/src/build.bat: -------------------------------------------------------------------------------- 1 | if not defined MSBUILD (set MSBUILD="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe") 2 | "%MSBUILD%" .\tMCimg.sln /t:rebuild /p:configuration=Debug 3 | move .\Debug\tMCimg.exe ..\bin\Win 4 | del /q .\Debug\* 5 | rmdir .\Debug 6 | 7 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/src/makefile: -------------------------------------------------------------------------------- 1 | OS=Linux 2 | include makefile.unix 3 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/src/makefile.Darwin: -------------------------------------------------------------------------------- 1 | OS=Darwin 2 | include makefile.unix 3 | -------------------------------------------------------------------------------- /ForwardModel/tMCimg/src/makefile.Linux: -------------------------------------------------------------------------------- 1 | OS=Linux 2 | include makefile.unix 3 | -------------------------------------------------------------------------------- /Group/DataTree/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Utils"] 2 | path = Utils 3 | url = https://github.com/BUNPC/Utils 4 | [submodule "FuncRegistry"] 5 | path = FuncRegistry 6 | url = https://github.com/BUNPC/FuncRegistry 7 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/DeleteTsv.m: -------------------------------------------------------------------------------- 1 | function DeleteTsv(rootdir) 2 | if ~exist('rootdir','var') 3 | rootdir = pwd; 4 | end 5 | rootdir = filesepStandard(rootdir); 6 | Snirf2Tsv(rootdir, 'remove'); 7 | 8 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/HDF5_CreateGroup.m: -------------------------------------------------------------------------------- 1 | function gid = HDF5_CreateGroup(fid, group) 2 | if strcmp(group, '/') || strcmp(group, '\') 3 | gid = H5G.open(fid, '/'); 4 | return 5 | end 6 | try 7 | gid = H5G.open(fid, group); 8 | catch 9 | rootgroup = fileparts(group); 10 | gid = HDF5_CreateGroup(fid, rootgroup); 11 | gid = H5G.create(gid, group, 'H5P_DEFAULT','H5P_DEFAULT','H5P_DEFAULT'); 12 | end 13 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/HDF5_GetFileDescriptor.m: -------------------------------------------------------------------------------- 1 | function fid = HDF5_GetFileDescriptor(fileobj) 2 | 3 | % Either fileobj is a name of a file or a HDF5 file descriptor 4 | if ischar(fileobj) 5 | if ispathvalid(fileobj,'file') 6 | fid = H5F.open(fileobj, 'H5F_ACC_RDWR', 'H5P_DEFAULT'); 7 | else 8 | fid = H5F.create(fileobj, 'H5F_ACC_TRUNC', 'H5P_DEFAULT', 'H5P_DEFAULT'); 9 | end 10 | if fid < 0 11 | return; 12 | end 13 | else 14 | fid = fileobj; 15 | end 16 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/HDF5_GroupClose.m: -------------------------------------------------------------------------------- 1 | function HDF5_GroupClose(fileobj, gid, fid) 2 | 3 | H5G.close(gid); 4 | if ischar(fileobj) 5 | H5F.close(fid); 6 | end 7 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/HDF5_GroupOpen.m: -------------------------------------------------------------------------------- 1 | function [gid, fid] = HDF5_GroupOpen(fileobj, location) 2 | 3 | % Find data location 4 | if ischar(fileobj) 5 | fid = H5F.open(fileobj); 6 | else 7 | fid = fileobj; 8 | end 9 | try 10 | gid = H5G.open(fid, location); 11 | catch 12 | gid.double = -1; 13 | end 14 | 15 | 16 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/HDF5_PostProcessing.m: -------------------------------------------------------------------------------- 1 | function val = HDF5_PostProcessing(val, val0, options) 2 | 3 | if ~exist('val0','var') 4 | val0 = []; 5 | end 6 | if ~exist('options','var') 7 | options = ''; 8 | end 9 | val = HDF5_Transpose(val, options); 10 | 11 | % Convert muti-row char array to cell string array 12 | if ischar(val) && ~iscell(val0) 13 | val = convertHDF5StrToMatlabStr(val); 14 | elseif ischar(val) 15 | val = convertHDF5StrToMatlabStr(val, 'cell'); 16 | elseif iscell(val) && length(val) == 1 17 | val = val{1}; 18 | elseif iscell(val) && length(val) > 1 19 | val = {val{:}}'; 20 | end 21 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/DataFiles/Hdf5/__init__.py -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/convertHDF5StrToMatlabStr.m: -------------------------------------------------------------------------------- 1 | function snew = convertHDF5StrToMatlabStr(s, type) 2 | snew = ''; 3 | 4 | if ~exist('type', 'var') || isempty(type) 5 | type = 'char'; 6 | end 7 | 8 | % Convert muti-row char array to cell string array 9 | if size(s,1)==1 && strcmp(type,'char') 10 | snew = strtrim_improve(s); 11 | else 12 | snew = cell(size(s,1),1); 13 | for ii = 1:size(s,1) 14 | snew{ii} = strtrim_improve(s(ii,:)); 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/h5read_safe.m: -------------------------------------------------------------------------------- 1 | function val = h5read_safe(fname, name, val) 2 | 3 | try 4 | val = h5read(fname, name); 5 | catch 6 | switch(class(val)) 7 | case 'char' 8 | val = ''; 9 | case 'cell' 10 | val = {}; 11 | otherwise 12 | val = []; 13 | end 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/hdf5isvalid.m: -------------------------------------------------------------------------------- 1 | function b = hdf5isvalid(fname) 2 | 3 | val = H5F.is_hdf5(fname); 4 | if val > 0 5 | b = true; 6 | else 7 | b = false; 8 | fprintf('File %s is not an HDF5 file.\n', fname); 9 | end -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/Hdf5/hdf5read_safe.m: -------------------------------------------------------------------------------- 1 | function val = hdf5read_safe(fname, name, val) 2 | 3 | try 4 | val = hdf5read(fname, name); 5 | catch 6 | switch(class(val)) 7 | case 'char' 8 | val = ''; 9 | case 'cell' 10 | val = {}; 11 | otherwise 12 | val = []; 13 | end 14 | end -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/DataFiles/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/DataFiles/__init__.py -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Default ignored files 3 | /workspace.xml -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/Snirf.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/Examples/FingerTapping_run3_tdmlproc.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/Snirf/Examples/FingerTapping_run3_tdmlproc.nirs -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/Examples/Simple_Probe.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/Snirf/Examples/Simple_Probe.nirs -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/Examples/findexamplesdir.m: -------------------------------------------------------------------------------- 1 | function rootdirexamples = findexamplesdir() 2 | 3 | rootdir = fileparts(which('SnirfClass.m')); 4 | rootdirexamples = filesepStandard([rootdir, '/Examples/']); 5 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/Examples/findfile.m: -------------------------------------------------------------------------------- 1 | function fnamefullpath = findfile(rootdirexamples, fname) 2 | 3 | fnamefullpath = [rootdirexamples, fname]; 4 | if ~exist(fnamefullpath, 'file') 5 | msg = sprintf('%s does not exist. You first have to generate it by running demo_snirf\n', fnamefullpath); 6 | MenuBox(msg, 'OK'); 7 | fnamefullpath = ''; 8 | return; 9 | end 10 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/Examples/neuro_run01.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/Snirf/Examples/neuro_run01.nirs -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/SnirfLoad.m: -------------------------------------------------------------------------------- 1 | % snirf = SnirfLoad( filenm ) 2 | % 3 | % This function will load a snirf file 'filenm' into a snirf class object 4 | 5 | function snirf = SnirfLoad( filenm ) 6 | 7 | snirf = SnirfClass( filenm ); 8 | 9 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/SnirfSave.m: -------------------------------------------------------------------------------- 1 | % SnirfSave( filenm, snirf ) 2 | % 3 | % This function will save a snirf object to file 'filenm'. 4 | % Recall that you create a snirf object with 5 | % snirf = SnirfClass(); 6 | % and then populate it with the required fields indicated by the SNIRF 7 | % specification. 8 | 9 | function SnirfSave( filenm, snirf ) 10 | 11 | snirf.Save( filenm ) 12 | 13 | -------------------------------------------------------------------------------- /Group/DataTree/AcquiredData/Snirf/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/AcquiredData/Snirf/__init__.py -------------------------------------------------------------------------------- /Group/DataTree/DesignNotes.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/DesignNotes.ppt -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s1/neuro_run01.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s1/neuro_run01.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s1/neuro_run02.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s1/neuro_run02.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s1/neuro_run03.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s1/neuro_run03.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s2/neuro_run06.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s2/neuro_run06.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s2/neuro_run07.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s2/neuro_run07.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/Example4_twNI/s2/neuro_run08.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/Example4_twNI/s2/neuro_run08.snirf -------------------------------------------------------------------------------- /Group/DataTree/Examples/SubjDataSample/test.snirf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTree/Examples/SubjDataSample/test.snirf -------------------------------------------------------------------------------- /Group/DataTree/Version.txt: -------------------------------------------------------------------------------- 1 | 1.22.0 -------------------------------------------------------------------------------- /Group/DataTreeGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/DataTreeGUI.fig -------------------------------------------------------------------------------- /Group/FuncRegistry/LoadFuncReg.m: -------------------------------------------------------------------------------- 1 | function R = LoadFuncReg(parent) 2 | 3 | % Syntax: 4 | % 5 | % R = LoadFuncReg() 6 | % R = LoadFuncReg(parent) 7 | % 8 | % Description: 9 | % 10 | % 11 | 12 | 13 | % First get all the argument there are to get using the 8 possible syntax 14 | % calls 15 | if nargin==0 16 | parent = []; 17 | end 18 | 19 | if ~isempty(parent) && isproperty(parent, 'R') && ~isempty(parent.reg) 20 | reg = parent.reg; 21 | else 22 | reg = RegistriesClass(); 23 | end 24 | 25 | -------------------------------------------------------------------------------- /Group/FuncRegistry/UserFunctions/dummy.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Group/FuncRegistry/UserFunctions/dummy.m -------------------------------------------------------------------------------- /Group/FuncRegistry/UserFunctions/mlAct_Matrix2BinaryVector.m: -------------------------------------------------------------------------------- 1 | function mlAct = mlAct_Matrix2BinaryVector(mlAct0, ml) 2 | N = max(size(ml,1), size(mlAct0,1)); 3 | mlAct = zeros(N,1); 4 | for iCh = 1:N 5 | if all(size(mlAct0) == size(ml)) 6 | k = find(mlAct0(:,1)==ml(iCh,1) & mlAct0(:,2)==ml(iCh,2) & mlAct0(:,4)==ml(iCh,4)); 7 | else 8 | k = find(mlAct0(:,1)==ml(iCh,1) & mlAct0(:,2)==ml(iCh,2)); 9 | end 10 | if mlAct0(k(1),3)==1 11 | mlAct(iCh) = 1; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /Group/FuncRegistry/UserFunctions/mlAct_Matrix2IndexList.m: -------------------------------------------------------------------------------- 1 | function lstAct = mlAct_Matrix2IndexList(mlAct, ml) 2 | lstAct = []; 3 | for iCh = 1:size(ml,1) 4 | if size(ml,2)==4 5 | k = find(mlAct(:,1)==ml(iCh,1) & mlAct(:,2)==ml(iCh,2) & mlAct(:,4)==ml(iCh,4)); 6 | else 7 | k = find(mlAct(:,1)==ml(iCh,1) & mlAct(:,2)==ml(iCh,2)); 8 | end 9 | if mlAct(k,3)==1 10 | lstAct = [lstAct; iCh]; 11 | end 12 | end 13 | 14 | -------------------------------------------------------------------------------- /Group/FuncRegistry/Version.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 -------------------------------------------------------------------------------- /Group/LoadCurrElem.m: -------------------------------------------------------------------------------- 1 | function currElem = LoadCurrElem(group, iSubj) 2 | global logger 3 | currElem = []; 4 | if ~exist('iSubj','var') || isempty(iSubj) 5 | iSubj = 0; 6 | end 7 | if isempty(group) 8 | return 9 | end 10 | 11 | if iSubj==0 12 | currElem = group; 13 | else 14 | currElem = group.subjs(iSubj); 15 | end 16 | 17 | currElem.LoadSubBranch(); 18 | if currElem.GetError()<0 19 | logger.Write('Error loading group data. Discarding group data'); 20 | currElem = []; 21 | end 22 | 23 | -------------------------------------------------------------------------------- /Group/getCurrElemIdx.m: -------------------------------------------------------------------------------- 1 | function idx = getCurrElemIdx(hGroupList) 2 | idx = []; 3 | if ~ishandles(hGroupList) 4 | return; 5 | end 6 | 7 | idx = 0; 8 | idx0 = get(hGroupList, 'value'); 9 | if idx0==1 10 | idx = 0; 11 | elseif idx0 > 1 12 | idx = idx0-1; 13 | end 14 | -------------------------------------------------------------------------------- /HbConc/enableHbConcDisplay.m: -------------------------------------------------------------------------------- 1 | function enableHbConcDisplay(hbconc, val) 2 | 3 | if val==0 4 | val='off'; 5 | elseif val==1 6 | val='on'; 7 | end 8 | 9 | -------------------------------------------------------------------------------- /HbConc/enableHbConcGen.m: -------------------------------------------------------------------------------- 1 | function hbconc = enableHbConcGen(hbconc, val) 2 | 3 | set(hbconc.handles.menuItemOverlayHbConc, 'enable', 'on'); 4 | -------------------------------------------------------------------------------- /HbConc/isHbConcSingleCond.m: -------------------------------------------------------------------------------- 1 | function b = isHbConcSingleCond(hbconc) 2 | 3 | b = []; 4 | if ~exist('hbconc','var') 5 | return; 6 | end 7 | if isempty(hbconc) 8 | return; 9 | end 10 | 11 | b = (size(hbconc.HbConcRaw, 4) == 1); 12 | -------------------------------------------------------------------------------- /HbConc/loadDataHbConc.m: -------------------------------------------------------------------------------- 1 | function hbconc = loadDataHbConc(hbconc, dataTree) 2 | 3 | if isempty(dataTree) 4 | return 5 | end 6 | 7 | dataTree.currElem.Load(); 8 | 9 | % Check if there's group acquisition data to load 10 | if ~isempty(dataTree.currElem) && ~dataTree.currElem.IsEmpty() 11 | hbconc.HbConcRaw = dataTree.currElem.GetDcAvg(); 12 | hbconc.tHRF = dataTree.currElem.GetTHRF(); 13 | end 14 | if length(hbconc.tHRF) > 1 15 | hbconc.config.tRangeMin = hbconc.tHRF(1); 16 | hbconc.config.tRangeMax = hbconc.tHRF(end); 17 | end 18 | 19 | -------------------------------------------------------------------------------- /HbConc/resetHbConc.m: -------------------------------------------------------------------------------- 1 | function hbconc = resetHbConc(hbconc) 2 | 3 | if ishandles(hbconc.handles.HbO) 4 | delete(hbconc.handles.HbO); 5 | hbconc.handles.HbO = []; 6 | end 7 | if ishandles(hbconc.handles.HbR) 8 | delete(hbconc.handles.HbR); 9 | hbconc.handles.HbR = []; 10 | end 11 | hbconc = setHbConcColormap(hbconc, []); 12 | hbconc.mesh = initMesh(); 13 | -------------------------------------------------------------------------------- /HbConc/setHbConcColormap.m: -------------------------------------------------------------------------------- 1 | function hbconc = setHbConcColormap(hbconc, ~, img, cmThreshold) 2 | if ~exist('img','var') 3 | img = []; 4 | end 5 | if ~exist('cmThreshold','var') 6 | cmThreshold = []; 7 | end 8 | 9 | if ~isempty(cmThreshold) 10 | createColorbar(cmThreshold); 11 | else 12 | createColorbar([], img); 13 | end -------------------------------------------------------------------------------- /Headsurf/existsHeadsurf.m: -------------------------------------------------------------------------------- 1 | function b = existsHeadsurf(varargin) 2 | 3 | if nargin==0 || isempty(varargin{1}) 4 | global atlasViewer 5 | headsurf = atlasViewer.headsurf; 6 | else 7 | headsurf = varargin{1}; 8 | end 9 | 10 | b = ishandles(headsurf.handles.surf); 11 | 12 | -------------------------------------------------------------------------------- /Headvol/saveHeadvol.m: -------------------------------------------------------------------------------- 1 | function saveHeadvol(headvol, mode) 2 | 3 | if isempty(headvol) | isempty(headvol.img) 4 | return; 5 | end 6 | 7 | dirname = [headvol.pathname, '/anatomical/']; 8 | if ~exist(dirname, 'dir') 9 | mkdir(dirname); 10 | end 11 | if ~exist('mode', 'var') 12 | mode='nooverwrite'; 13 | end 14 | 15 | if ~exist([dirname, 'headvol.vox'], 'file') | strcmp(mode, 'overwrite') 16 | if ~isempty(headvol.imgOrig) 17 | headvol.img = headvol.imgOrig; 18 | else 19 | headvol.img = xform_apply_vol_smooth(headvol.img, inv(headvol.T_2mc)); 20 | end 21 | save_vox([dirname, 'headvol.vox'], headvol); 22 | end 23 | 24 | -------------------------------------------------------------------------------- /Headvol/saveHeadvolOrient.m: -------------------------------------------------------------------------------- 1 | function headvol = saveHeadvolOrient(headvol, obj) 2 | 3 | headvol.orientation = obj.orientation; 4 | if isempty(headvol.orientationOrig) 5 | headvol.orientationOrig = obj.orientation; 6 | end 7 | 8 | -------------------------------------------------------------------------------- /ImgRecon/GetExtinctions.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ImgRecon/GetExtinctions.m -------------------------------------------------------------------------------- /ImgRecon/ImageRecon.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/ImgRecon/ImageRecon.fig -------------------------------------------------------------------------------- /ImgRecon/enableImgReconDisplay.m: -------------------------------------------------------------------------------- 1 | function enableImgReconDisplay(imgrecon, val) 2 | 3 | if val==0 4 | val='off'; 5 | elseif val==1 6 | val='on'; 7 | end 8 | 9 | -------------------------------------------------------------------------------- /ImgRecon/enableImgReconGen.m: -------------------------------------------------------------------------------- 1 | function imgrecon = enableImgReconGen(imgrecon, val) 2 | 3 | set(imgrecon.handles.pushbuttonCalcMetrics_new, 'enable',val); 4 | set(imgrecon.handles.menuItemImageReconGUI, 'enable',val); 5 | -------------------------------------------------------------------------------- /ImgRecon/initAimg_conc.m: -------------------------------------------------------------------------------- 1 | function Aimg_conc = initAimg_conc() 2 | 3 | Aimg_conc = struct('HbO',[],'HbR',[]); 4 | 5 | -------------------------------------------------------------------------------- /ImgRecon/saveImgRecon.m: -------------------------------------------------------------------------------- 1 | function saveImgRecon(imgrecon) 2 | 3 | if isempty(imgrecon) 4 | return; 5 | end 6 | dirname = imgrecon.pathname; 7 | dirnameOut = [dirname 'imagerecon/']; 8 | 9 | Aimg_conc = imgrecon.Aimg_conc; 10 | Aimg_conc_scalp = imgrecon.Aimg_conc_scalp; 11 | 12 | HbO = Aimg_conc.HbO; 13 | HbR = Aimg_conc.HbR; 14 | if ~isempty(HbO) & ~isempty(HbO) 15 | save([dirnameOut, 'Aimg_conc.mat'], 'HbO','HbR'); 16 | end 17 | 18 | HbO = Aimg_conc_scalp.HbO; 19 | HbR = Aimg_conc_scalp.HbR; 20 | if ~isempty(HbO) & ~isempty(HbO) 21 | save([dirnameOut, 'Aimg_conc_scalp.mat'], 'HbO','HbR'); 22 | end 23 | 24 | -------------------------------------------------------------------------------- /ImgRecon/setImgReconColormap.m: -------------------------------------------------------------------------------- 1 | function imgrecon = setImgReconColormap(imgrecon, hAxes, img, cmThreshold) 2 | if ~exist('img','var') || isempty(img) 3 | img = getImgRecon_DisplayPanelImage(imgrecon); 4 | end 5 | if ~exist('cmThreshold','var') 6 | cmThreshold = []; 7 | end 8 | 9 | % Get axes 10 | if ~isempty(hAxes) 11 | axes(hAxes); 12 | else 13 | return; 14 | end 15 | 16 | if ~isempty(cmThreshold) 17 | createColorbar(cmThreshold, img); 18 | else 19 | createColorbar([], img); 20 | end 21 | 22 | -------------------------------------------------------------------------------- /Install/createShortcut.sh: -------------------------------------------------------------------------------- 1 | #!sh 2 | 3 | rm -rf ~/Desktop/AtlasViewerGUI* 4 | rm -rf ~/Desktop/Test 5 | 6 | perl ~/Downloads/atlasviewer_install/makefinalapp.pl ~/atlasviewer/run_AtlasViewerGUI.sh ~/Desktop/AtlasViewerGUI.$1 7 | ln -s ~/atlasviewer/Test ~/Desktop/Test 8 | 9 | chmod 755 ~/Desktop/AtlasViewerGUI.$1 10 | chmod 755 ~/Desktop/Test 11 | 12 | exit 13 | -------------------------------------------------------------------------------- /Install/createShortcut.vbs: -------------------------------------------------------------------------------- 1 | 2 | Set objArgs = WScript.Arguments 3 | application = objArgs(0) 4 | 5 | Set sh = CreateObject("WScript.Shell") 6 | Set shortcut = sh.CreateShortcut(application + ".lnk") 7 | 8 | 9 | shortcut.TargetPath = application 10 | shortcut.WorkingDirectory = "C:\Users\Public\atlasviewer\Test" 11 | shortcut.Save 12 | -------------------------------------------------------------------------------- /Install/finishInstallGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Install/finishInstallGUI.fig -------------------------------------------------------------------------------- /Install/generateDesktopPath.bat: -------------------------------------------------------------------------------- 1 | @SET DESKTOP_REG_ENTRY="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" 2 | @SET DESKTOP_REG_KEY="Desktop" 3 | @SET DESKTOP_DIR= 4 | @FOR /F "tokens=1,2*" %%a IN ('REG QUERY %DESKTOP_REG_ENTRY% /v %DESKTOP_REG_KEY% ^| FINDSTR "REG_SZ"') DO ( 5 | @set DESKTOP_DIR="%%c" 6 | ) 7 | echo %DESKTOP_DIR% > .\desktopPath.txt 8 | -------------------------------------------------------------------------------- /Install/getAppname.m: -------------------------------------------------------------------------------- 1 | function [appname, exename] = getAppname() 2 | global platform 3 | 4 | if isempty(platform) || ~isstruct(platform) 5 | platform = setplatformparams(); 6 | end 7 | [~, exename] = fileparts(platform.exename{1}); 8 | appname = exename; 9 | k = strfind(lower(appname), 'gui'); 10 | appname(k:k+2) = ''; 11 | 12 | -------------------------------------------------------------------------------- /Install/getRelativePath.m: -------------------------------------------------------------------------------- 1 | function path3 = getRelativePath(path1, path2) 2 | path3 = ''; 3 | path1 = filesepStandard_startup(path1); 4 | path2 = filesepStandard_startup(path2); 5 | 6 | k = strfind(path1, path2); 7 | if isempty(k) %#ok<*STREMP> 8 | return 9 | end 10 | if ispathvalid(path1, 'dir') 11 | j = 1; 12 | else 13 | j = 0; 14 | end 15 | path3 = path1(length(path2)+1:end-j); 16 | 17 | -------------------------------------------------------------------------------- /Install/removeEntryFromList.m: -------------------------------------------------------------------------------- 1 | function list = removeEntryFromList(name, list) 2 | 3 | temp = strfind(list, name); 4 | k=[]; 5 | for ii=1:length(temp) 6 | if ~isempty(temp{ii}) 7 | k=ii; 8 | end 9 | end 10 | list(k) = []; 11 | 12 | -------------------------------------------------------------------------------- /Install/setup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | @echo. 3 | @echo. 4 | @echo PLEASE WAIT ... INSTALLATION WILL START IN A FEW MINUTES ... 5 | @echo. 6 | @call .\uninstall.bat 7 | @move .\installtemp .\setup.exe 8 | @echo. 9 | @echo NOTE: In case of installation failure, refer to log file setup.log . 10 | @echo. 11 | @(call .\setup.exe) 12 | @move .\setup.exe .\installtemp 13 | 14 | -------------------------------------------------------------------------------- /Install/uninstall.bat: -------------------------------------------------------------------------------- 1 | 2 | @echo off 3 | 4 | @SET DESKTOP_REG_ENTRY="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" 5 | @SET DESKTOP_REG_KEY="Desktop" 6 | @SET DESKTOP_DIR= 7 | @FOR /F "tokens=1,2*" %%a IN ('REG QUERY %DESKTOP_REG_ENTRY% /v %DESKTOP_REG_KEY% ^| FINDSTR "REG_SZ"') DO ( 8 | @set DESKTOP_DIR="%%c" 9 | ) 10 | 11 | set dirnameSrc=%cd% 12 | set dirnameDst=c:\users\public 13 | 14 | IF EXIST %DESKTOP_DIR%\AtlasViewerGUI.exe.lnk (del /Q /F %DESKTOP_DIR%\AtlasViewerGUI.exe.lnk) 15 | IF EXIST %dirnameDst%\atlasviewer (rmdir /S /Q %dirnameDst%\atlasviewer) 16 | 17 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/LICENSE.txt -------------------------------------------------------------------------------- /Labelssurf/initLabelssurfProbeProjection.m: -------------------------------------------------------------------------------- 1 | function labelssurf = initLabelssurfProbeProjection(labelssurf) 2 | 3 | hLabelsSurf = labelssurf.handles.surf; 4 | idxL = labelssurf.idxL; 5 | colormaps = labelssurf.colormaps; 6 | idxCm = labelssurf.colormapsIdx; 7 | 8 | cm = colormaps(idxCm).col; 9 | set(hLabelsSurf,'faceVertexCData',cm(idxL,:)); 10 | -------------------------------------------------------------------------------- /Labelssurf/saveLabelSurf2Vol.m: -------------------------------------------------------------------------------- 1 | function saveLabelSurf2Vol(headvol) 2 | % Author:Sreekanth Kura (skura@bu.edu) 3 | 4 | % I am assuming imported anatomy will be saved in RAS orientation. 5 | S = size(headvol.img); 6 | T = headvol.T_2ras; 7 | Tras_2vol = T; 8 | for u = 1:3 9 | if sum(Tras_2vol(u,1:3)) == -1 10 | Tras_2vol(u,4) = S(u); 11 | else 12 | Tras_2vol(u,4) = 0; 13 | end 14 | end 15 | 16 | Tras_mni = (Tras_2vol'*T')'; 17 | Tmni_ras = inv(Tras_mni); 18 | dirname = [headvol.pathname, '/anatomical/']; 19 | filename = [dirname 'labelssurf2vol.txt']; 20 | writematrix(Tmni_ras,filename,'Delimiter',' ') -------------------------------------------------------------------------------- /Pialsurf/setPialsurfHandles.m: -------------------------------------------------------------------------------- 1 | function pialsurf = setPialsurfHandles(pialsurf, handles) 2 | 3 | pialsurf.handles.editTransparency = handles.editBrainTransparency; 4 | set(pialsurf.handles.editTransparency,'enable','off'); 5 | 6 | pialsurf.handles.radiobuttonShowPial = handles.radiobuttonShowPial; 7 | set(pialsurf.handles.radiobuttonShowPial,'enable','off'); 8 | 9 | pialsurf.handles.axes = handles.axesSurfDisplay; 10 | 11 | -------------------------------------------------------------------------------- /Pialvol/savePialvolOrient.m: -------------------------------------------------------------------------------- 1 | function headvol = saveHeadvolOrient(headvol, obj) 2 | 3 | headvol.orientation = obj.orientation; 4 | if isempty(headvol.orientationOrig) 5 | headvol.orientationOrig = obj.orientation; 6 | end 7 | 8 | -------------------------------------------------------------------------------- /Probe/E31.asc: -------------------------------------------------------------------------------- 1 | FP1 2 | FP2 3 | F7 4 | F3 5 | FZ 6 | F4 7 | F8 8 | FT9 9 | FC5 10 | FC6 11 | FT10 12 | T7 13 | C3 14 | CZ 15 | C4 16 | T8 17 | TP9 18 | CP5 19 | CP6 20 | TP10 21 | P9 22 | P7 23 | P3 24 | PZ 25 | P4 26 | P8 27 | P10 28 | O1 29 | OZ 30 | O2 31 | NOSE 32 | -------------------------------------------------------------------------------- /Probe/SDgui/SDgui.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/SDgui.fig -------------------------------------------------------------------------------- /Probe/SDgui/SDgui_3DViewSelected.m: -------------------------------------------------------------------------------- 1 | function s = SDgui_3DViewSelected(handles) 2 | global SD 3 | 4 | s = ''; 5 | if get(handles.radiobuttonView3D, 'value') 6 | if isempty(SD.SrcPos3D) && isempty(SD.DetPos3D) 7 | return 8 | end 9 | s = '3D'; 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Probe/SDgui/SDgui_EditsMade.m: -------------------------------------------------------------------------------- 1 | function b = SDgui_EditsMade() 2 | global filedata 3 | global SD 4 | 5 | b = true; 6 | if ~sd_data_IsEmpty() 7 | if ~sd_data_Equal(SD, filedata.SD) 8 | return 9 | end 10 | end 11 | b = false; 12 | -------------------------------------------------------------------------------- /Probe/SDgui/SDgui_version.m: -------------------------------------------------------------------------------- 1 | function SDgui_version(hObject) 2 | 3 | if ~exist('hObject','var') 4 | hObject = -1; 5 | end 6 | title = sprintf('SDgui (v%s) - %s', getVernum('SDgui'), filesepStandard(pwd)); 7 | if ishandle(hObject) 8 | set(hObject,'name', title); 9 | end 10 | -------------------------------------------------------------------------------- /Probe/SDgui/Version.txt: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /Probe/SDgui/ViewChannelsGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/ViewChannelsGUI.fig -------------------------------------------------------------------------------- /Probe/SDgui/getOptPosFromAxes.m: -------------------------------------------------------------------------------- 1 | function optpos=getOptPosFromAxes(h_nodes) 2 | 3 | optpos=[]; 4 | for i=1:length(h_nodes) 5 | optpos(i,:) = get(h_nodes(i),'position'); 6 | end 7 | 8 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength1_edit_ButtonDownFcn.m: -------------------------------------------------------------------------------- 1 | % --- If Enable == 'on', executes on mouse press in 5 pixel border. 2 | % --- Otherwise, executes on mouse press in 5 pixel border or over wavelength1_edit. 3 | function wavelength1_edit_ButtonDownFcn(hObject, eventdata, handles) 4 | % hObject handle to wavelength1_edit (see GCBO) 5 | % eventdata reserved - to be defined in a future version of MATLAB 6 | % handles structure with handles and user data (see GUIDATA) 7 | 8 | set(hObject,'enable','on'); 9 | 10 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength1_edit_Update.m: -------------------------------------------------------------------------------- 1 | function wavelength1_edit_Update(handles, wl) 2 | 3 | set(handles.wavelength1_edit, 'string',num2str(wl)); 4 | wavelength_edit_Callback(handles.wavelength1_edit, [wl,1], handles); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength2_edit_ButtonDownFcn.m: -------------------------------------------------------------------------------- 1 | % --- If Enable == 'on', executes on mouse press in 5 pixel border. 2 | % --- Otherwise, executes on mouse press in 5 pixel border or over wavelength1_edit. 3 | function wavelength2_edit_ButtonDownFcn(hObject, eventdata, handles) 4 | % hObject handle to wavelength1_edit (see GCBO) 5 | % eventdata reserved - to be defined in a future version of MATLAB 6 | % handles structure with handles and user data (see GUIDATA) 7 | 8 | set(hObject,'enable','on'); 9 | 10 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength2_edit_Update.m: -------------------------------------------------------------------------------- 1 | function wavelength2_edit_Update(handles, wl) 2 | 3 | set(handles.wavelength2_edit,'string',num2str(wl)); 4 | wavelength_edit_Callback(handles.wavelength2_edit, [wl,2], handles); 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength3_edit_ButtonDownFcn.m: -------------------------------------------------------------------------------- 1 | % --- If Enable == 'on', executes on mouse press in 5 pixel border. 2 | % --- Otherwise, executes on mouse press in 5 pixel border or over wavelength1_edit. 3 | function wavelength3_edit_ButtonDownFcn(hObject, eventdata, handles) 4 | % hObject handle to wavelength1_edit (see GCBO) 5 | % eventdata reserved - to be defined in a future version of MATLAB 6 | % handles structure with handles and user data (see GUIDATA) 7 | 8 | set(hObject,'enable','on'); 9 | 10 | 11 | -------------------------------------------------------------------------------- /Probe/SDgui/lambda/wavelength3_edit_Update.m: -------------------------------------------------------------------------------- 1 | function wavelength3_edit_Update(handles, wl) 2 | 3 | set(handles.wavelength3_edit,'string',num2str(wl)); 4 | wavelength_edit_Callback(handles.wavelength3_edit, [wl,3], handles); 5 | 6 | 7 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_det_tbl_Clear.m: -------------------------------------------------------------------------------- 1 | function optode_det_tbl_Clear(handles) 2 | 3 | optode_tbl_CreateFcn(handles.optode_det_tbl, 200, {'x','y','z','Grommet Type','Grommet Rot'}); 4 | 5 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_det_tbl_get_tbl_data.m: -------------------------------------------------------------------------------- 1 | function [tbl_data, tbl_size] = optode_det_tbl_get_tbl_data(handles) 2 | 3 | hObject = handles.optode_det_tbl; 4 | tbl_data = get(hObject, 'data'); 5 | userdata = get(hObject, 'userdata'); 6 | tbl_size = userdata.tbl_size; 7 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_src_tbl_get_tbl_data.m: -------------------------------------------------------------------------------- 1 | function [tbl_data, tbl_size] = optode_src_tbl_get_tbl_data(handles) 2 | 3 | hObject = handles.optode_src_tbl; 4 | tbl_data = get(hObject,'data') ; 5 | userdata = get(hObject,'userdata') ; 6 | tbl_size = userdata.tbl_size; 7 | 8 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_src_tbl_srcmap_show_GetVal.m: -------------------------------------------------------------------------------- 1 | function val = optode_src_tbl_srcmap_show_GetVal(handles) 2 | 3 | val = get( handles.optode_src_tbl_srcmap_show, 'value'); 4 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_src_tbl_srcmap_show_UpdateSrcTbl.m: -------------------------------------------------------------------------------- 1 | function optode_src_tbl_srcmap_show_UpdateSrcTbl(handles) 2 | 3 | optode_src_tbl_srcmap_show_Callback(handles.optode_src_tbl_srcmap_show, [], handles); 4 | 5 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls/optode_tbls_Hide.m: -------------------------------------------------------------------------------- 1 | function optode_tbls_Hide(handles, val) 2 | 3 | set(handles.optode_tbls_panel, 'visible',val); 4 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_CellSelectionCallback.m: -------------------------------------------------------------------------------- 1 | function optode_anchor_tbl_CellSelectionCallback(hObject, eventdata, handles) 2 | 3 | anchor_tbl_data = get(hObject,'data'); 4 | userdata = get(hObject,'userdata'); 5 | userdata.selection = eventdata.Indices; 6 | set(hObject,'userdata',userdata); 7 | 8 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_Clear.m: -------------------------------------------------------------------------------- 1 | function optode_anchor_tbl_Clear(handles) 2 | 3 | hObject = handles.optode_anchor_tbl; 4 | optode_anchor_tbl_CreateFcn(hObject,[],[]); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_CreateFcn.m: -------------------------------------------------------------------------------- 1 | function optode_anchor_tbl_CreateFcn(hObject, eventdata, handles) 2 | 3 | A=repmat({'',''},10,1); 4 | userdata.tbl_data = A; 5 | userdata.tbl_size = 0; 6 | userdata.selection = []; 7 | set(hObject,'Data',A,'userdata',userdata); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_Init.m: -------------------------------------------------------------------------------- 1 | function optode_anchor_tbl_Init(handles,al) 2 | 3 | hObject = handles.optode_anchor_tbl; 4 | 5 | D=repmat({'' ''},100,1); 6 | for i=1:size(al,1) 7 | D{i,1}=al{i,1}; 8 | D{i,2}=al{i,2}; 9 | end 10 | userdata.tbl_data = D; 11 | userdata.tbl_size = size(al,1); 12 | userdata.selection = []; 13 | set(hObject,'Data',D,'userdata',userdata); 14 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_Update.m: -------------------------------------------------------------------------------- 1 | function optode_anchor_tbl_Update(handles,al) 2 | 3 | hObject = handles.optode_anchor_tbl; 4 | 5 | D=repmat({'',''},100,1); 6 | for i=1:size(al,1) 7 | D{i,1}=al{i,1}; 8 | D{i,2}=al{i,2}; 9 | end 10 | userdata.tbl_data = D; 11 | userdata.tbl_size = size(al,1); 12 | set(hObject,'data',D,'userdata',userdata); 13 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_anchor_tbl_get_tbl_data.m: -------------------------------------------------------------------------------- 1 | function tbl_data=optode_anchor_tbl_get_tbl_data(handles) 2 | 3 | hObject = handles.optode_anchor_tbl; 4 | tbl_data = get(hObject,'data') ; 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_dummy_tbl_CellSelectionCallback.m: -------------------------------------------------------------------------------- 1 | function optode_dummy_tbl_CellSelectionCallback(hObject, eventdata, handles) 2 | 3 | tbl_data = get(hObject,'data'); 4 | ncols=size(tbl_data,2); 5 | userdata = get(hObject, 'userdata'); 6 | tbl_size = userdata.tbl_size; 7 | if ~isempty(eventdata.Indices) 8 | r=eventdata.Indices(1); 9 | c=eventdata.Indices(2); 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_dummy_tbl_Clear.m: -------------------------------------------------------------------------------- 1 | function optode_dummy_tbl_Clear(handles) 2 | 3 | hObject = handles.optode_dummy_tbl; 4 | optode_tbl_CreateFcn(hObject, 100, {'opt#','x','y','z','Grommet Type','Grommet Rot'}); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_dummy_tbl_UpdateNum.m: -------------------------------------------------------------------------------- 1 | function optode_dummy_tbl_UpdateNum(handles,noptreal) 2 | 3 | hObject = handles.optode_dummy_tbl; 4 | 5 | D=get(hObject,'data'); 6 | userdata=get(hObject,'userdata'); 7 | tbl_size = userdata.tbl_size; 8 | 9 | for i=1:tbl_size 10 | D{i,1} = num2str(i+noptreal); 11 | end 12 | 13 | userdata.tbl_data = D; 14 | set(hObject, 'userdata',userdata); 15 | 16 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_spring_tbl_CellSelectionCallback.m: -------------------------------------------------------------------------------- 1 | function optode_spring_tbl_CellSelectionCallback(hObject, eventdata, handles) 2 | 3 | spring_tbl_data = get(hObject,'data'); 4 | userdata = get(hObject,'userdata'); 5 | userdata.selection = eventdata.Indices; 6 | set(hObject,'userdata',userdata); 7 | 8 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_spring_tbl_Clear.m: -------------------------------------------------------------------------------- 1 | function optode_spring_tbl_Clear(handles) 2 | 3 | hObject = handles.optode_spring_tbl; 4 | optode_spring_tbl_CreateFcn(hObject,[],[]); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_spring_tbl_CreateFcn.m: -------------------------------------------------------------------------------- 1 | function optode_spring_tbl_CreateFcn(hObject, eventdata, handles) 2 | 3 | A=repmat({'' '' ''},100,1); 4 | userdata.tbl_size = 0; 5 | userdata.selection = []; 6 | set(hObject,'Data',A,'userdata',userdata); 7 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_spring_tbl_get_tbl_data.m: -------------------------------------------------------------------------------- 1 | function tbl_data=optode_spring_tbl_get_tbl_data(handles) 2 | 3 | hObject = handles.optode_spring_tbl; 4 | tbl_data = get(hObject,'data') ; 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/optode_tbls2/optode_tbls2_Hide.m: -------------------------------------------------------------------------------- 1 | function optode_tbls2_Hide(handles,val) 2 | 3 | h_optode_tbls2_panel = handles.optode_tbls2_panel; 4 | set(h_optode_tbls2_panel,'visible',val); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes/probe_geometry_axes_Clear.m: -------------------------------------------------------------------------------- 1 | function probe_geometry_axes_Clear(handles) 2 | 3 | hObject = handles.probe_geometry_axes; 4 | probe_geometry_axes_CreateFcn(hObject, [], []); 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes/probe_geometry_axes_GetUserData.m: -------------------------------------------------------------------------------- 1 | function userdata = probe_geometry_axes_GetUserData(handles) 2 | 3 | hObject = handles.probe_geometry_axes; 4 | userdata = get(hObject,'userdata'); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes/probe_geometry_axes_SetAxisEqual.m: -------------------------------------------------------------------------------- 1 | function probe_geometry_axes_SetAxisEqual(handles) 2 | 3 | hObject = handles.probe_geometry_axes; 4 | 5 | axes(hObject); 6 | axis equal; 7 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes2/getSpringListFromAxes.m: -------------------------------------------------------------------------------- 1 | function sl=getSpringListFromAxes(optpos, h_edges) 2 | 3 | sl=zeros(length(h_edges),3); 4 | for i=1:length(h_edges) 5 | x=get(h_edges(i),'xdata'); 6 | y=get(h_edges(i),'ydata'); 7 | z=get(h_edges(i),'zdata'); 8 | p1=[x(1) y(1) z(1)]; 9 | p2=[x(2) y(2) z(2)]; 10 | [foo j]=nearest_point(optpos,p1); 11 | sl(i,1)=j; 12 | [foo k]=nearest_point(optpos,p2); 13 | sl(i,2)=k; 14 | end 15 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes2/probe_geometry_axes2_Clear.m: -------------------------------------------------------------------------------- 1 | function probe_geometry_axes2_Clear(handles) 2 | 3 | hObject = handles.probe_geometry_axes2; 4 | probe_geometry_axes2_CreateFcn(hObject, [], []); 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes2/probe_geometry_axes2_GetUserData.m: -------------------------------------------------------------------------------- 1 | function userdata = probe_geometry_axes2_GetUserData(handles) 2 | 3 | hObject = handles.probe_geometry_axes2; 4 | userdata = get(hObject,'userdata'); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/probe_geometry_axes2/probe_geometry_axes2_SetAxisEqual.m: -------------------------------------------------------------------------------- 1 | function probe_geometry_axes2_SetAxisEqual(handles) 2 | 3 | hObject = handles.probe_geometry_axes2; 4 | 5 | axes(hObject); 6 | axis equal; 7 | -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/111tap1.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/111tap1.nirs -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/111tap_run1.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/111tap_run1.nirs -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/Simple_Probe.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/Simple_Probe.nirs -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/probe1.SD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/probe1.SD -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/probe2.SD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/probe2.SD -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/probe_large.SD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/probe_large.SD -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/tw1.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/tw1.nirs -------------------------------------------------------------------------------- /Probe/SDgui/sample_data/twocyc158.nirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Probe/SDgui/sample_data/twocyc158.nirs -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_AddDummyPos.m: -------------------------------------------------------------------------------- 1 | function sd_data_AddDummyPos(i, pos) 2 | global SD 3 | SD.DummyPos(i,:) = pos; 4 | 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_AddEditSpring.m: -------------------------------------------------------------------------------- 1 | function sd_data_AddEditSpring(r, s) 2 | global SD 3 | 4 | SD.SpringList(r,:) = s; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_AnyGrommetTypeSet.m: -------------------------------------------------------------------------------- 1 | function b = sd_data_AnyGrommetTypeSet() 2 | global SD 3 | 4 | b = false; 5 | if isfield(SD,'SrcGrommetType') 6 | if ~all(strcmpi(SD.SrcGrommetType, 'none')) 7 | b = true; 8 | end 9 | end 10 | if isfield(SD,'DetGrommetType') 11 | if ~all(strcmpi(SD.DetGrommetType, 'none')) 12 | b = true; 13 | end 14 | end 15 | 16 | 17 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_AssignTbl.m: -------------------------------------------------------------------------------- 1 | function a = sd_data_AssignTbl(a, tbl) 2 | 3 | if isempty(tbl) 4 | a = []; 5 | end 6 | ncoord = sd_data_GetCoordNum(''); 7 | for ir = 1:size(tbl,1) 8 | for ic = 1:ncoord 9 | a(ir,ic) = str2double(tbl{ir,ic}); 10 | end 11 | end 12 | a(ir+1:end,:) = []; 13 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_Copy.m: -------------------------------------------------------------------------------- 1 | function SD2 = sd_data_Copy(SD2, SD1) 2 | n = NirsClass(SD2); 3 | n.CopyProbe(SD1); 4 | SD2 = n.SD; 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_Delete3D.m: -------------------------------------------------------------------------------- 1 | function sd_data_Delete3D() 2 | global SD 3 | 4 | SD.SrcPos3D = []; 5 | SD.DetPos3D = []; 6 | SD.DummyPos3D = []; 7 | SD.Landmarks = sd_data_InitLandmarks(); 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_DeleteDummyPos.m: -------------------------------------------------------------------------------- 1 | function sd_data_DeleteDummyPos(i) 2 | global SD 3 | 4 | SD.DummyPos(i,:) = []; 5 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_DeleteRegistrationData.m: -------------------------------------------------------------------------------- 1 | function sd_data_DeleteRegistrationData() 2 | global SD 3 | 4 | SD.DummyPos = []; 5 | SD.DummyPos3D = []; 6 | SD.SpringList = []; 7 | SD.AnchorList = []; 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_DeleteSpring.m: -------------------------------------------------------------------------------- 1 | function sd_data_DeleteSpring(i) 2 | global SD 3 | 4 | SD.SpringList(i,:) = []; 5 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_Equal.m: -------------------------------------------------------------------------------- 1 | function b = sd_data_Equal(SD1, SD2) 2 | n1 = NirsClass(SD1); 3 | n2 = NirsClass(SD2); 4 | b = (n1 == n2); 5 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_ErrorFix.m: -------------------------------------------------------------------------------- 1 | function [err, SD1] = sd_data_ErrorFix(SD1) 2 | global SD 3 | 4 | if ~exist('SD1','var') 5 | SD1 = SD; 6 | else 7 | SD = SD1; 8 | end 9 | err = false; 10 | 11 | if sd_data_IsEmpty() 12 | return 13 | end 14 | 15 | n = NirsClass(SD); 16 | SD = n.SD; 17 | 18 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetAnchorList.m: -------------------------------------------------------------------------------- 1 | function al = sd_data_GetAnchorList() 2 | global SD 3 | 4 | al = {}; 5 | 6 | if isempty(SD) 7 | return 8 | end 9 | if iscell(SD.AnchorList) 10 | for ii = 1:size(SD.AnchorList,1) 11 | al{ii,1} = num2str(SD.AnchorList{ii,1}); 12 | al{ii,2} = SD.AnchorList{ii,2}; 13 | end 14 | else 15 | for ii = 1:size(SD.AnchorList,1) 16 | al{ii,1} = num2str(SD.AnchorList(ii,1)); 17 | al{ii,2} = num2str(SD.AnchorList(ii,2:end)); 18 | end 19 | end -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetCoordNum.m: -------------------------------------------------------------------------------- 1 | function ncoord = sd_data_GetCoordNum(data3D) 2 | 3 | n(1) = size(sd_data_Get(['SrcPos', data3D]), 2); 4 | n(2) = size(sd_data_Get(['DetPos', data3D]), 2); 5 | ncoord = max(n); 6 | if ncoord==0 7 | ncoord = 3; 8 | end 9 | 10 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetGrommetChoices.m: -------------------------------------------------------------------------------- 1 | function choices = sd_data_GetGrommetChoices() 2 | 3 | % This is to make sure we update just one cfg file for grommet choices then SDgui and 4 | % AtlasViewer can use same cfg file. 5 | choices = GetGrommetChoices(); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetMeasList.m: -------------------------------------------------------------------------------- 1 | function ml = sd_data_GetMeasList() 2 | global SD 3 | 4 | ml = []; 5 | if isempty(SD) 6 | return 7 | end 8 | if size(SD.MeasList,2)<3 9 | return; 10 | end 11 | if ~isempty(SD.MeasList) 12 | k = find(SD.MeasList(:,4)==1); 13 | ml = SD.MeasList(k,1:2); 14 | end 15 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetNwl.m: -------------------------------------------------------------------------------- 1 | function nwl = sd_data_GetNwl() 2 | global SD 3 | 4 | nwl = 0; 5 | if ~isempty(SD.Lambda) 6 | nwl = length(SD.Lambda); 7 | end 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_GetSpringList.m: -------------------------------------------------------------------------------- 1 | function sl = sd_data_GetSpringList() 2 | global SD 3 | 4 | sl = []; 5 | if isempty(SD) 6 | return 7 | end 8 | if ~isempty(SD.SpringList) 9 | sl = SD.SpringList; 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_Init.m: -------------------------------------------------------------------------------- 1 | function [SD, n] = sd_data_Init(SD0, units) 2 | SD = []; 3 | n = []; 4 | if ~exist('SD0','var') 5 | SD0 = []; 6 | end 7 | if ~exist('units','var') 8 | units = ''; 9 | end 10 | n = NirsClass(SD0); 11 | if ~isempty(units) 12 | n.SetProbeSpatialUnit(units); 13 | end 14 | if isempty(n) 15 | return; 16 | end 17 | SD = n.SD; 18 | 19 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_InitLandmarks.m: -------------------------------------------------------------------------------- 1 | function landmarks = sd_data_InitLandmarks() 2 | landmarks = struct('pos',[], 'labels',{{}}); 3 | 4 | 5 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_IsEmpty.m: -------------------------------------------------------------------------------- 1 | function b = sd_data_IsEmpty(SDo) 2 | global SD 3 | 4 | if nargin==0 5 | SDo = SD; 6 | end 7 | 8 | b = true; 9 | if isempty(SDo) 10 | return; 11 | end 12 | if isempty(SDo.SrcPos) 13 | return; 14 | end 15 | if isempty(SDo.DetPos) 16 | return; 17 | end 18 | if isempty(SDo.SrcPos3D) 19 | return; 20 | end 21 | if isempty(SDo.DetPos3D) 22 | return; 23 | end 24 | b = false; 25 | 26 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetAnchorList.m: -------------------------------------------------------------------------------- 1 | function al = sd_data_SetAnchorList(al, al_sz) 2 | global SD 3 | 4 | if ~exist('al_sz','var') 5 | al_sz = size(al,1); 6 | end 7 | 8 | SD.AnchorList = {}; 9 | for ii = 1:al_sz 10 | SD.AnchorList{ii,1} = str2num(al{ii,1}); 11 | SD.AnchorList{ii,2} = al{ii,2}; 12 | end 13 | 14 | % Update AtlasViewerGUI 15 | SDgui_AtlasViewerGUI('update'); 16 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDetGrommetRot.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDetGrommetRot(tbl) 2 | global SD 3 | 4 | SD.DetGrommetRot = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDetGrommetType.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDetGrommetType(tbl) 2 | global SD 3 | 4 | SD.DetGrommetType = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDetPos.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDetPos(tbl) 2 | global SD 3 | 4 | SD.DetPos = sd_data_AssignTbl(SD.DetPos, tbl); 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDetPos3D.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDetPos3D(tbl) 2 | global SD 3 | 4 | SD.DetPos3D = sd_data_AssignTbl(SD.DetPos3D, tbl); 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDummyGrommetRot.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDummyGrommetRot(tbl) 2 | global SD 3 | 4 | SD.DummyGrommetRot = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDummyGrommetType.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDummyGrommetType(tbl) 2 | global SD 3 | 4 | SD.DummyGrommetType = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDummyPos.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDummyPos(tbl) 2 | global SD 3 | 4 | SD.DummyPos = sd_data_AssignTbl(SD.DummyPos, tbl); 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetDummyPos3D.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetDummyPos3D(tbl) 2 | global SD 3 | 4 | SD.DummyPos3D = sd_data_AssignTbl(SD.DummyPos3D, tbl); 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetLambda.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetLambda(lambda) 2 | global SD 3 | 4 | if isempty(SD) 5 | return 6 | end 7 | SD.Lambda = lambda; 8 | if ~isempty(SD.MeasList) 9 | if length(lambda) > length(unique(SD.MeasList(:,4))) 10 | ml = sd_data_GetMeasList(); 11 | sd_data_SetMeasList(ml); 12 | end 13 | end 14 | 15 | % Update AtlasViewerGUI 16 | SDgui_AtlasViewerGUI('update'); 17 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetMeasList.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetMeasList(ml) 2 | global SD 3 | 4 | if isempty(ml) 5 | SD.MeasList=[]; 6 | return; 7 | end 8 | 9 | nwl = sd_data_GetNwl(); 10 | nmeas = size(ml,1); 11 | if nwl>0 12 | % Update SD data 13 | SD.MeasList = []; 14 | for j = 1:nwl 15 | SD.MeasList = [SD.MeasList; ml, ones(nmeas,1), ones(nmeas,1)*j]; 16 | end 17 | else 18 | SD.MeasList = [ml, ones(nmeas,1), ones(nmeas,1)]; 19 | end 20 | 21 | % Update AtlasViewerGUI 22 | SDgui_AtlasViewerGUI('update'); 23 | 24 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSpringList.m: -------------------------------------------------------------------------------- 1 | function [sl, i] = sd_data_SetSpringList(varargin) 2 | global SD 3 | 4 | if length(varargin)==1 5 | sl = varargin{1}; 6 | [sl,i] = sort_sl(sl); 7 | SD.SpringList = sl; 8 | elseif length(varargin)==2 9 | tbl = varargin{1}; 10 | tbl_size = varargin{2}; 11 | for ii=1:tbl_size 12 | sl(ii,1) = str2num(tbl{ii,1}); 13 | sl(ii,2) = str2num(tbl{ii,2}); 14 | sl(ii,3) = str2num(tbl{ii,3}); 15 | end 16 | end 17 | 18 | % Update AtlasViewerGUI 19 | SDgui_AtlasViewerGUI('update'); 20 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSrcGrommetRot.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetSrcGrommetRot(tbl) 2 | global SD 3 | 4 | SD.SrcGrommetRot = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSrcGrommetType.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetSrcGrommetType(tbl) 2 | global SD 3 | 4 | SD.SrcGrommetType = tbl; 5 | 6 | % Update AtlasViewerGUI 7 | SDgui_AtlasViewerGUI('update'); 8 | 9 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSrcMap.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetSrcMap() 2 | global SD 3 | 4 | SD.SrcMap = []; 5 | for j = 1:size(SD.SrcPos,1) 6 | sd_data_SetSrcMapEntry(j); 7 | end 8 | 9 | % Update AtlasViewerGUI 10 | SDgui_AtlasViewerGUI('update'); 11 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSrcMapDefault.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetSrcMapDefault(nwl) 2 | global SD 3 | 4 | if isempty(SD) 5 | return 6 | end 7 | if ~exist('nwl','var') || isempty(nwl) 8 | nwl = sd_data_GetNwl(); 9 | end 10 | if nwl==0 11 | return; 12 | end 13 | SD.SrcMap = []; 14 | for i = 1:size(SD.SrcPos,1) 15 | k = nwl; 16 | for j = 1:nwl 17 | SD.SrcMap(j,i) = i*nwl-k+1; 18 | k=k-1; 19 | end 20 | end 21 | 22 | % Update AtlasViewerGUI 23 | SDgui_AtlasViewerGUI('update'); 24 | -------------------------------------------------------------------------------- /Probe/SDgui/sd_data/sd_data_SetSrcMapEntry.m: -------------------------------------------------------------------------------- 1 | function sd_data_SetSrcMapEntry(i, lasers) 2 | global SD 3 | 4 | if ~exist('lasers','var') || isempty(lasers) 5 | nwl = sd_data_GetNwl(); 6 | if nwl>0 && size(SD.SrcPos,1)>0 7 | if nwl 2 | global SD 3 | global filedata 4 | 5 | filedata.SD = SD; 6 | 7 | fields = fieldnames(filedata); 8 | strLst=[]; 9 | n=length(fields); 10 | for ii=1:n 11 | if ii5))); 5 | if isempty(dmin) 6 | threshold(1)=1; 7 | threshold(2)=1; 8 | threshold(3)=1; 9 | else 10 | threshold(1)=dmin/3; 11 | threshold(2)=dmin/2; 12 | threshold(3)=dmin/1.5; 13 | end -------------------------------------------------------------------------------- /Probe/SDgui/utils/redraw_text.m: -------------------------------------------------------------------------------- 1 | function h=redraw_text(h) 2 | 3 | uistack(h, 'top'); 4 | 5 | 6 | -------------------------------------------------------------------------------- /Probe/SDgui/utils/redraw_text_many.m: -------------------------------------------------------------------------------- 1 | function [h1 h2]=redraw_text_many(h1,h2) 2 | 3 | if ~exist('h2','var') 4 | h2=[]; 5 | end 6 | for ii=1:length(h1) 7 | h1(ii)=redraw_text(h1(ii)); 8 | end 9 | for ii=1:length(h2) 10 | h2(ii)=redraw_text(h2(ii)); 11 | end 12 | -------------------------------------------------------------------------------- /Probe/findUnique.m: -------------------------------------------------------------------------------- 1 | function files = findUnique(files) 2 | 3 | for ii = 1:length(files) 4 | [~, ~, ext] = fileparts(files(ii).name); 5 | switch(lower(ext)) 6 | case '.sd' 7 | data = load(files(ii).name, '-mat'); 8 | SD = data.SD; 9 | case '.nirs' 10 | data = load(files(ii).name, '-mat'); 11 | SD = data.SD; 12 | case '.snirf' 13 | data = SnirfClass(files(ii).name); 14 | SD = NirsClass(data); 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Probe/isComplete.m: -------------------------------------------------------------------------------- 1 | function b = isComplete(probe) 2 | b = false; 3 | if probe.isempty(probe) 4 | return 5 | end 6 | b = true; 7 | % TBD: need meaningful check for registration data 8 | 9 | -------------------------------------------------------------------------------- /Probe/isProbeFlat.m: -------------------------------------------------------------------------------- 1 | function b = isProbeFlat(probe) 2 | b = true; 3 | 4 | if ~isempty(probe.optpos_reg) 5 | optpos = probe.optpos_reg; 6 | else 7 | optpos = probe.optpos; 8 | end 9 | ncoord = size(optpos, 2); 10 | for ii = 1:ncoord 11 | if length(unique(optpos(:,ii)))==1 12 | return; 13 | end 14 | end 15 | b = false; -------------------------------------------------------------------------------- /Probe/loadSD.m: -------------------------------------------------------------------------------- 1 | function probe = loadSD(probe, SD) 2 | if ischar(SD) 3 | filedata = load(SD, '-mat'); 4 | SD = filedata.SD; 5 | end 6 | probe0 = convertSD2probe(SD); 7 | probe = probe.copy(probe, probe0); 8 | 9 | -------------------------------------------------------------------------------- /Probe/probeHas3DLandmarkRegistration.m: -------------------------------------------------------------------------------- 1 | function b = probeHas3DLandmarkRegistration(probe) 2 | b = false; 3 | if isempty(probe.registration.refpts) 4 | return; 5 | end 6 | if isempty(probe.registration.refpts.pos) 7 | return; 8 | end 9 | if isempty(probe.registration.refpts.labels) 10 | return; 11 | end 12 | if strcmpi(probe.registration.direction, 'atlas2probe') 13 | return 14 | end 15 | if size(probe.registration.refpts.pos,1) ~= length(probe.registration.refpts.labels) 16 | return; 17 | end 18 | b = true; 19 | 20 | -------------------------------------------------------------------------------- /Probe/probeHasDigptsRegistration.m: -------------------------------------------------------------------------------- 1 | function b = probeHasDigptsRegistration(probe) 2 | b = false; 3 | if isProbeFlat(probe) 4 | return; 5 | end 6 | if isempty(probe.registration.refpts) 7 | return; 8 | end 9 | if length(probe.registration.refpts.pos)<5 10 | return; 11 | end 12 | b = true; 13 | 14 | -------------------------------------------------------------------------------- /Probe/probeHasLandmarkRegistration.m: -------------------------------------------------------------------------------- 1 | function b = probeHasLandmarkRegistration(probe) 2 | 3 | b = false; 4 | if isempty(probe) 5 | return; 6 | end 7 | if isempty(probe.optpos_reg) 8 | return; 9 | end 10 | if isempty(probe.registration) 11 | return; 12 | end 13 | if isempty(probe.registration.refpts) 14 | return; 15 | end 16 | if size(probe.registration.refpts.pos,1)<5 17 | return; 18 | end 19 | b = true; 20 | 21 | -------------------------------------------------------------------------------- /Probe/pullProbeToHeadsurf.m: -------------------------------------------------------------------------------- 1 | function probe = pullProbeToHeadsurf(probe, head) 2 | if isPreRegisteredProbe(probe)==2 3 | MenuBox('Probe already registered to head surface'); 4 | return 5 | end 6 | if isempty(probe.optpos_reg) 7 | optpos = probe.optpos; 8 | else 9 | optpos = probe.optpos_reg; 10 | end 11 | probe.optpos_reg = pullPtsToSurf(optpos, head, probe.pullToSurfAlgorithm); 12 | -------------------------------------------------------------------------------- /Probe/registerDigpts/C2S.m: -------------------------------------------------------------------------------- 1 | function [r, theta, phi] = C2S(XYZ) 2 | 3 | % [r, theta, phi] = C2S(XYZ); 4 | % 5 | % ref. 6 | % http://en.wikipedia.org/wiki/Spherical_coordinates 7 | % http://en.wikipedia.org/wiki/Atan2 8 | 9 | r = sum((XYZ .^ 2), 2) .^ 0.5; 10 | theta = atan2(XYZ(:,2), XYZ(:,1)); 11 | phi = acos(XYZ(:,3) ./ r); 12 | -------------------------------------------------------------------------------- /Probe/saveSD.m: -------------------------------------------------------------------------------- 1 | function saveSD(SD, dirname) 2 | if ispathvalid([dirname, '/probe.SD']) 3 | filedata = load([dirname, '/probe.SD'], '-mat'); 4 | if ~sd_data_Equal(SD, filedata.SD) 5 | save([dirname, '/probe.SD'],'-mat', 'SD'); 6 | end 7 | else 8 | save([dirname, '/probe.SD'],'-mat', 'SD'); 9 | end 10 | -------------------------------------------------------------------------------- /Probe/testGenProbe.m: -------------------------------------------------------------------------------- 1 | function SD = testGenProbe(dt) 2 | if ~exist('dt','var') 3 | dt = 30; 4 | end 5 | setNamespace('AtlasViewerGUI'); 6 | atlasDir = getAtlasDir(); 7 | refpts = initRefpts(); 8 | refpts = getRefpts(refpts, atlasDir); 9 | optpos = refpts.pos; 10 | [srcpos, detpos, ml] = genProbeFromRefpts(optpos, dt); 11 | SD.SrcPos = srcpos; 12 | SD.DetPos = detpos; 13 | SD.MeasList = ml; 14 | n = NirsClass(SD); 15 | SD = n.SD; 16 | save('probe_try1.nirs','-mat','SD'); 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AtlasViewer 2 | AtlasViewer is a MATLAB application for the display of fNIRS data on atlas anatomy developed and maintained by the [Boston University Neurophotonics Center](http://www.bu.edu/neurophotonics/). 3 | 4 | # Quick links 5 | * [Downloading AtlasViewer](https://github.com/BUNPC/AtlasViewer/wiki/Download-and-Installation) 6 | * [AtlasViewer Community & Support Forum](https://openfnirs.org/community/homer3-forum/) 7 | -------------------------------------------------------------------------------- /Refpts/FindRefptsGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Refpts/FindRefptsGUI.fig -------------------------------------------------------------------------------- /Refpts/RefptsSystemConfigGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Refpts/RefptsSystemConfigGUI.fig -------------------------------------------------------------------------------- /Refpts/SelectEEGCurvesGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Refpts/SelectEEGCurvesGUI.fig -------------------------------------------------------------------------------- /Refpts/clearRefptsProjection.m: -------------------------------------------------------------------------------- 1 | function refpts = clearRefptsProjection(refpts) 2 | 3 | if ishandles(refpts.handles.hCortexProjection) 4 | delete(refpts.handles.hCortexProjection); 5 | refpts.handles.hCortexProjection = []; 6 | end 7 | 8 | if ishandles(refpts.handles.hProjectionRays) 9 | delete(refpts.handles.hProjectionRays); 10 | refpts.handles.hProjectionRays = []; 11 | end 12 | 13 | -------------------------------------------------------------------------------- /Refpts/curvelen.m: -------------------------------------------------------------------------------- 1 | function [len, gapmax] = curvelen(curve_seg, iStart, iEnd) 2 | 3 | len=0; 4 | gapmax=0; 5 | 6 | if ~exist('iStart', 'var') 7 | iStart = 1; 8 | end 9 | if ~exist('iEnd', 'var') 10 | iEnd = size(curve_seg(iStart:end,:), 1); 11 | end 12 | N = iEnd-iStart+1; 13 | 14 | for i=iStart:N-1 15 | d=dist3(curve_seg(i,:), curve_seg(i+1,:)); 16 | len=len+d; 17 | if(d>gapmax) 18 | gapmax=d; 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Refpts/findCorrespondingRefpts.m: -------------------------------------------------------------------------------- 1 | function [rp_atlas, rp_subj] = findCorrespondingRefpts(r1, r2) 2 | 3 | rp_atlas = []; 4 | rp_subj = []; 5 | 6 | r1 = makeLandmarksBackwardCompatible(r1); 7 | r2 = makeLandmarksBackwardCompatible(r2); 8 | 9 | jj=1; 10 | for ii=1:length(r1.labels) 11 | kk = find(strcmpi(r1.labels{ii}, r2.labels)); 12 | if ~isempty(kk) 13 | rp_atlas(jj,:) = r1.pos(ii,:); 14 | rp_subj(jj,:) = r2.pos(kk,:); 15 | jj=jj+1; 16 | end 17 | end 18 | 19 | -------------------------------------------------------------------------------- /Refpts/setRefptsFontSize.m: -------------------------------------------------------------------------------- 1 | function refpts = setRefptsFontSize(refpts) 2 | if ~ishandles(refpts.handles.labels(1,1)) 3 | return; 4 | end 5 | refpts.handles.textSize = get(refpts.handles.labels(1,1), 'fontsize'); 6 | -------------------------------------------------------------------------------- /Refpts/set_eeg_curve_select.m: -------------------------------------------------------------------------------- 1 | function refpts = set_eeg_curve_select(refpts) 2 | 3 | curves = fieldnames(refpts.eeg_system.curves); 4 | for jj=1:length(curves) 5 | eval(sprintf('refpts.eeg_system.curves.%s.selected = 1;', curves{jj})); 6 | end 7 | -------------------------------------------------------------------------------- /Refpts/viewAxes.m: -------------------------------------------------------------------------------- 1 | function viewAxes(refpts, hAxes, axes_order) 2 | 3 | % Arg 1 4 | if ~ishandles(hAxes) 5 | hAxes = gca; 6 | set(hAxes, {'xgrid', 'ygrid','zgrid'}, {'on','on','on'}); 7 | axis vis3d; 8 | axis equal 9 | rotate3d 10 | setappdata(h, 'hOrigin',{}); 11 | setappdata(h, 'hViewOrigin',[]); 12 | end 13 | 14 | viewAxesXYZ(hAxes, axes_order, [0,0,0]); 15 | viewAxesRAS(hAxes, axes_order, refpts.pos); 16 | -------------------------------------------------------------------------------- /Test/Test-AtlasViewer/atlasViewer.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Test/Test-AtlasViewer/atlasViewer.mat -------------------------------------------------------------------------------- /Test/Test-AtlasViewer/probe.SD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Test/Test-AtlasViewer/probe.SD -------------------------------------------------------------------------------- /Test/Testing_procedure.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Test/Testing_procedure.pdf -------------------------------------------------------------------------------- /Utils/Shared/GetLastCheckForUpdates.m: -------------------------------------------------------------------------------- 1 | function dt = GetLastCheckForUpdates() 2 | if ~ispathvalid([getAppDir, 'LastCheckForUpdates.dat']) 3 | try 4 | dt = datetime - duration(200,0,0); 5 | catch 6 | dt = -1; 7 | end 8 | else 9 | fd = fopen([getAppDir, 'LastCheckForUpdates.dat'],'rt'); 10 | dt = fgetl(fd); 11 | fclose(fd); 12 | end 13 | 14 | -------------------------------------------------------------------------------- /Utils/Shared/InitConfig.m: -------------------------------------------------------------------------------- 1 | function cfg = InitConfig(cfg) 2 | if ~exist('cfg','var') || isempty(cfg) 3 | cfg = ConfigFileClass(); 4 | elseif ~isa(cfg, 'ConfigFileClass') 5 | cfg = ConfigFileClass(); 6 | end 7 | -------------------------------------------------------------------------------- /Utils/Shared/InitLogger.m: -------------------------------------------------------------------------------- 1 | function logger = InitLogger(logger, appname, options) 2 | if ~exist('appname','var') 3 | appname = 'History'; 4 | end 5 | if ~exist('options','var') 6 | options = []; 7 | end 8 | if ~exist('logger','var') || isempty(logger) 9 | logger = Logger(appname, options); 10 | elseif ~logger.IsOpen() 11 | logger.Open(); 12 | if ~logger.IsOpen() 13 | logger = Logger(appname, options); 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Utils/Shared/OpenFileGUI.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Utils/Shared/OpenFileGUI.fig -------------------------------------------------------------------------------- /Utils/Shared/SetLastCheckForUpdates.m: -------------------------------------------------------------------------------- 1 | function SetLastCheckForUpdates() 2 | try 3 | dt = datetime; 4 | catch 5 | dt = -1; 6 | end 7 | fd = fopen([getAppDir, 'LastCheckForUpdates.dat'],'wt'); 8 | fprintf(fd, '%s\n', dt); 9 | fclose(fd); 10 | 11 | -------------------------------------------------------------------------------- /Utils/Shared/Version.txt: -------------------------------------------------------------------------------- 1 | 1.8.3 -------------------------------------------------------------------------------- /Utils/Shared/buildpathfrompathparts.m: -------------------------------------------------------------------------------- 1 | function pathname = buildpathfrompathparts(pp, options) 2 | pathname=''; 3 | if ~iscell(pp) 4 | return 5 | end 6 | if ~exist('options', 'var') 7 | options = ''; 8 | end 9 | for ii = 1:length(pp) 10 | if ~isempty(pathname) && pathname(end)=='/' 11 | pathname = [pathname, strtrim(pp{ii}), '/']; 12 | else 13 | pathname = [strtrim(pp{ii}), '/']; 14 | end 15 | end 16 | if ispathvalid(['/', pathname]) 17 | pathname = ['/', pathname]; 18 | end 19 | if optionExists(options, 'rmTrailSep') 20 | if pathname(end)=='/' 21 | pathname(end) = ''; 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /Utils/Shared/cd_safe.m: -------------------------------------------------------------------------------- 1 | function cd_safe(dirname) 2 | 3 | if exist(dirname, 'dir') == 7 4 | try 5 | cd(dirname); 6 | catch 7 | ; 8 | end 9 | end -------------------------------------------------------------------------------- /Utils/Shared/ceiln.m: -------------------------------------------------------------------------------- 1 | function val = ceiln(val0, n) 2 | if ~exist('n','var') 3 | n = 0; 4 | end 5 | pw = ceil(log10(abs(val0))); % Find order of magnitude of val. 6 | res = 10^(pw-n-2); % Resolution to round to. 7 | valtemp = val0*res; 8 | val = ceil(valtemp)/res; % < change floor() to ceil(), for ceiling equivalent. 9 | -------------------------------------------------------------------------------- /Utils/Shared/cell2str.m: -------------------------------------------------------------------------------- 1 | function str = cell2str(c) 2 | 3 | str = ''; 4 | for ii=1:length(c) 5 | if isempty(str) 6 | str = sprintf(c{ii}); 7 | else 8 | str = [str, ' ', sprintf(c{ii})]; 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Utils/Shared/convert_optodepos_to_circlular_2D_pos.m: -------------------------------------------------------------------------------- 1 | function xy = convert_optodepos_to_circlular_2D_pos(pos, T, norm_factor) 2 | pos = [pos ones(size(pos,1),1)]; 3 | pos_unit_sphere = pos*T; 4 | pos_unit_sphere_norm = sqrt(sum(pos_unit_sphere.^2,2)); 5 | pos_unit_sphere = pos_unit_sphere./pos_unit_sphere_norm ; 6 | 7 | [azimuth,elevation, ~] = cart2sph(pos_unit_sphere(:,1),pos_unit_sphere(:,2),pos_unit_sphere(:,3)); 8 | elevation = pi/2-elevation; 9 | [x,y] = pol2cart(azimuth,elevation); % get plane coordinates 10 | xy = [x y]; 11 | xy = xy/norm_factor; % set maximum to unit length 12 | end 13 | 14 | 15 | -------------------------------------------------------------------------------- /Utils/Shared/delimiter.m: -------------------------------------------------------------------------------- 1 | function d = delimiter() 2 | 3 | if ispc 4 | d = ';'; 5 | else 6 | d = ':'; 7 | end 8 | 9 | -------------------------------------------------------------------------------- /Utils/Shared/dependencies.m: -------------------------------------------------------------------------------- 1 | function [apps, vers, appdirs] = dependencies() 2 | apps = {}; 3 | vers = {}; 4 | appdirs = {}; 5 | submodules = parseGitSubmodulesFile(getAppDir()); 6 | temp = submodules(:,1); 7 | for ii = 1:length(temp) 8 | [~, apps{ii,1}] = fileparts(temp{ii}); 9 | vers{ii,1} = getVernum(apps{ii,1}); 10 | appdirs{ii,1} = submodules{ii,2}; 11 | end 12 | 13 | -------------------------------------------------------------------------------- /Utils/Shared/floorn.m: -------------------------------------------------------------------------------- 1 | function val = floorn(val0, n) 2 | if ~exist('n','var') 3 | n = 0; 4 | end 5 | pw = ceil(log10(abs(val0))); % Find order of magnitude of val. 6 | res = 10^(pw-n-2); % Resolution to round to. 7 | valtemp = val0*res; 8 | val = floor(valtemp)/res; % < change floor() to ceil(), for ceiling equivalent. 9 | 10 | -------------------------------------------------------------------------------- /Utils/Shared/getCurrTime.m: -------------------------------------------------------------------------------- 1 | function [dateNum, dateStr] = getCurrTime() 2 | ds = char(datetime('now','TimeZone','local','Format','yyyy-MM-dd HH:mm:ss')); 3 | [dateNum, dateStr] = datestr2datenum(ds); 4 | 5 | -------------------------------------------------------------------------------- /Utils/Shared/getParentRecursive.m: -------------------------------------------------------------------------------- 1 | function top = getParentRecursive(obj) 2 | % Returns topmost parent of a given graphics object using getParent function. 3 | while (~isempty(obj)) 4 | top = obj; 5 | obj = obj.getParent(); 6 | end 7 | end 8 | 9 | -------------------------------------------------------------------------------- /Utils/Shared/getStandardOutputFuncName.m: -------------------------------------------------------------------------------- 1 | function printFuncName = getStandardOutputFuncName() 2 | global logger 3 | 4 | if isempty(logger) 5 | printFuncName = 'fprintf'; 6 | elseif isa(logger, 'Logger') 7 | if ~logger.IsOpen() 8 | logger.Open(); 9 | end 10 | if ~logger.IsOpen() 11 | printFuncName = 'fprintf'; 12 | else 13 | printFuncName = 'logger.Write'; 14 | end 15 | else 16 | printFuncName = 'logger.Write'; 17 | end -------------------------------------------------------------------------------- /Utils/Shared/help_local.m: -------------------------------------------------------------------------------- 1 | function s = help_local(fname) 2 | s = ''; 3 | fd = fopen(fname, 'r'); 4 | if fd<0 5 | return 6 | end 7 | formaldeclfound = false; 8 | while 1 9 | line = strtrim(fgetl(fd)); 10 | if isempty(line) && ~formaldeclfound 11 | continue 12 | end 13 | if line==-1 14 | break; 15 | end 16 | if ~isempty(line) && line(1) == '%' 17 | s = sprintf('%s %s\n', s, line(2:end)); 18 | elseif ~formaldeclfound && strncmp(line, 'function', 8) 19 | formaldeclfound = true; 20 | else 21 | break 22 | end 23 | end 24 | fclose(fd); 25 | -------------------------------------------------------------------------------- /Utils/Shared/includes.m: -------------------------------------------------------------------------------- 1 | function b = includes(s1, s2) 2 | 3 | % Sep 4, 2020: Removed verLessThan because it's slowing down Homer3 startup 4 | 5 | % if verLessThan('matlab','9.1') 6 | % b = ~isempty(strfind(s1,s2)); 7 | % else 8 | % b = contains(s1,s2); 9 | % end 10 | 11 | if iscell(s1) 12 | b = ~isempty(find(strcmp(s1, s2))); 13 | else 14 | b = ~isempty(strfind(s1,s2)); %#ok 15 | % b = contains(s1,s2); 16 | end 17 | -------------------------------------------------------------------------------- /Utils/Shared/isalnum.m: -------------------------------------------------------------------------------- 1 | function y = isalnum( x ) 2 | y = false; 3 | if isempty(x) 4 | return; 5 | end 6 | y = all( (x>='0' & x<='9') | (x>='a' & x<='z') | (x>='A' & x<='Z') ); 7 | -------------------------------------------------------------------------------- /Utils/Shared/isbasictype.m: -------------------------------------------------------------------------------- 1 | function b = isbasictype(v) 2 | 3 | if isstruct(v) || isobject(v) 4 | b = false; 5 | elseif iscell(v) 6 | b = false; 7 | else 8 | b = true; 9 | end -------------------------------------------------------------------------------- /Utils/Shared/isblankline.m: -------------------------------------------------------------------------------- 1 | function b = isblankline(s) 2 | b = true; 3 | if all(isspace(s)) 4 | return; 5 | end 6 | if isempty(s) 7 | return; 8 | end 9 | b = false; 10 | 11 | -------------------------------------------------------------------------------- /Utils/Shared/isdir_private.m: -------------------------------------------------------------------------------- 1 | function b = isdir_private(dirname) 2 | % 3 | % isdir_private() is a backward compatible version of matlab's isdir() 4 | % function. 5 | % 6 | % isdir() is a new matlab function that is an improvment over exist() to 7 | % tell if a pathname is a directory or not. But it didn't exist prior to R2017. 8 | % Therefore we use try/catch to still be able to use isdir when it exists 9 | 10 | try 11 | b = isdir(dirname); 12 | catch 13 | b = (exist(dirname,'dir') == 7); 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Utils/Shared/isfile_private.m: -------------------------------------------------------------------------------- 1 | function b = isfile_private(dirname) 2 | % 3 | % isfile_private() is a backward compatible version of matlab's isfile() 4 | % function. 5 | % 6 | % isfile() is a new matlab function that is an improvment over exist() to 7 | % tell if a pathname is a file or not. But it didn't exist prior to R2017. 8 | % Therefore we use try/catch to still be able to use isfile when it exists 9 | 10 | try 11 | b = isfile(dirname); 12 | catch 13 | b = (exist(dirname,'file') == 2); 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Utils/Shared/ishandles.m: -------------------------------------------------------------------------------- 1 | function b = ishandles(h) 2 | 3 | b = false; 4 | if isempty(h) 5 | return; 6 | end 7 | if isa(h,'function_handle') 8 | return; 9 | end 10 | for ii=1:length(h(:)) 11 | if ~ishandle(h(ii)) 12 | return; 13 | end 14 | end 15 | b = true; 16 | 17 | -------------------------------------------------------------------------------- /Utils/Shared/islinux.m: -------------------------------------------------------------------------------- 1 | function result = islinux() 2 | 3 | % We want to distinguish between MAC and Unix 4 | % which is what this function does 5 | 6 | result = ~strncmp(computer,'PC',2) & ~strncmp(computer,'MAC',3); 7 | 8 | -------------------------------------------------------------------------------- /Utils/Shared/isnumber.m: -------------------------------------------------------------------------------- 1 | function b = isnumber(str) 2 | 3 | if ~ischar(str) 4 | b = false; 5 | return; 6 | end 7 | if isempty(str) 8 | b = false; 9 | return; 10 | end 11 | 12 | b = all( (str>='0' & str<='9') | (str =='e') | (str=='-' | str=='+' | str=='.' | str == ' ')); 13 | 14 | -------------------------------------------------------------------------------- /Utils/Shared/isolateDigits.m: -------------------------------------------------------------------------------- 1 | function digits = isolateDigits(x, base) 2 | digits = []; 3 | 4 | if ~exist('base','var') || (base < 2 || base > 16) 5 | base = 10; 6 | end 7 | if base ~= uint32(base) 8 | return; 9 | end 10 | if x == 0 11 | digits = 0; 12 | return; 13 | end 14 | 15 | kk = 1; 16 | while 1 17 | 18 | d = mod(x,base); 19 | x = floor(x/base); 20 | 21 | if (x == 0) && (d == 0) 22 | break; 23 | end 24 | 25 | digits(kk) = d; 26 | kk = kk+1; 27 | 28 | end 29 | 30 | -------------------------------------------------------------------------------- /Utils/Shared/isproperty.m: -------------------------------------------------------------------------------- 1 | function b = isproperty(obj, propname) 2 | 3 | if isstruct(obj) 4 | b = isfield(obj, propname); 5 | elseif isobject(obj) 6 | b = all(isprop(obj, propname)); 7 | else 8 | b = false; 9 | end 10 | -------------------------------------------------------------------------------- /Utils/Shared/isuppercase.m: -------------------------------------------------------------------------------- 1 | function b = isuppercase(s) 2 | b = all(upper(s)==s); 3 | 4 | -------------------------------------------------------------------------------- /Utils/Shared/isvalidfuncname.m: -------------------------------------------------------------------------------- 1 | function b = isvalidfuncname(s) 2 | b = false; 3 | if nargin==0 4 | return; 5 | end 6 | if ~ischar(s) 7 | return; 8 | end 9 | if isempty(s) 10 | return; 11 | end 12 | 13 | % First char has to be a letter 14 | if (s(1)<'A' || s(1)>'Z') && (s(1)<'a' || s(1)>'z') 15 | return; 16 | end 17 | b = true; -------------------------------------------------------------------------------- /Utils/Shared/iswholenum.m: -------------------------------------------------------------------------------- 1 | function b = iswholenum(x) 2 | % Reason for this function is that isinteger() looks at the class of the number 3 | % rather it's actual value. So isinteger(4) will return true but integer(4.0) will 4 | % be false even though 4.0 = 4. This is a problem. 5 | b = false; 6 | if ~ismember(class(x), {'double','single','int8','uint8','int16','uint16','int32','uint32'}); 7 | return; 8 | end 9 | b = (x == floor(x)); 10 | 11 | -------------------------------------------------------------------------------- /Utils/Shared/jsonlab/LICENSE_BSD.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Utils/Shared/jsonlab/LICENSE_BSD.txt -------------------------------------------------------------------------------- /Utils/Shared/jsonlab/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Utils/Shared/jsonlab/README.txt -------------------------------------------------------------------------------- /Utils/Shared/jsonlab/isoctavemesh.m: -------------------------------------------------------------------------------- 1 | function [isoctave, verinfo]=isoctavemesh 2 | % 3 | % [isoctave verinfo]=isoctavemesh 4 | % 5 | % determine whether the code is running in octave 6 | % 7 | % author: Qianqian Fang, 8 | % 9 | % output: 10 | % isoctave: 1 if in octave, otherwise 0 11 | % verinfo: a string, showing the version of octave (OCTAVE_VERSION) 12 | % 13 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 14 | % 15 | verinfo=''; 16 | isoctave=(exist('OCTAVE_VERSION','builtin')~=0); 17 | if(nargout==2 && isoctave) 18 | verinfo=OCTAVE_VERSION; 19 | end 20 | -------------------------------------------------------------------------------- /Utils/Shared/namespace/deleteNamespace.m: -------------------------------------------------------------------------------- 1 | function deleteNamespace(nm) 2 | global namespace 3 | if isdeployed() 4 | return; 5 | end 6 | if nargin==0 7 | return 8 | end 9 | if strcmp(nm, 'all') 10 | namespace = []; 11 | end 12 | k = []; 13 | for ii = 1:length(namespace) 14 | if strcmp(namespace(ii).name, nm) 15 | k = [k,ii]; %#ok 16 | end 17 | end 18 | namespace(k) = []; 19 | 20 | 21 | -------------------------------------------------------------------------------- /Utils/Shared/optionExists.m: -------------------------------------------------------------------------------- 1 | function b = optionExists(options, option) 2 | % Check if option (arg2) exists in a set of options (arg1) 3 | 4 | if isempty(options) 5 | b = false; 6 | return; 7 | end 8 | if ~exist('option','var') || isempty(option) 9 | b = false; 10 | return; 11 | end 12 | options2 = str2cell(options,{':',';',','}); 13 | b = ~isempty(find(strcmp(options2,option))); %#ok 14 | 15 | % b = ~isempty(findstr(options, option)); %#ok<*FSTR> -------------------------------------------------------------------------------- /Utils/Shared/propnames.m: -------------------------------------------------------------------------------- 1 | function props = propnames(s) 2 | 3 | if isstruct(s) 4 | props = fieldnames(s); 5 | else 6 | props = properties(s); 7 | end -------------------------------------------------------------------------------- /Utils/Shared/replaceSpecialChars.m: -------------------------------------------------------------------------------- 1 | function s2 = replaceSpecialChars(s) 2 | s2 = ''; 3 | if ~ischar(s) 4 | s2 = s; 5 | return; 6 | end 7 | [c, k] = str2cell(s, '''', 'keepblanks'); 8 | for ii = 1:length(c) 9 | if isempty(s2) 10 | s2 = c{ii}; 11 | else 12 | s2 = sprintf('"%s" %s', s2, c{ii}); 13 | end 14 | end 15 | 16 | % Remove any newlines or carriage returns from middle of string ONLY IF 17 | % there are quotes to be managed 18 | if ~isempty(k) 19 | k1 = find(s2==10); 20 | k2 = find(s2==13); 21 | m = [k1,k2]; 22 | j = find(m == length(s2)); 23 | m(j) = []; 24 | s2(m) = ''; 25 | end -------------------------------------------------------------------------------- /Utils/Shared/resamplee.m: -------------------------------------------------------------------------------- 1 | function resig = resamplee(sig,upsample,downsample) 2 | if upsample*downsample<2^31 3 | resig = resample(sig,upsample,downsample); 4 | else 5 | sig1half = sig(1:floor(length(sig)/2)); 6 | sig2half = sig(floor(length(sig)/2):end); 7 | resig1half = resamplee(sig1half, floor(upsample/2), length(sig1half)); 8 | resig2half = resamplee(sig2half, upsample-floor(upsample/2), length(sig2half)); 9 | resig = [resig1half(:); resig2half(:)]; 10 | end 11 | -------------------------------------------------------------------------------- /Utils/Shared/rmdir_safe.m: -------------------------------------------------------------------------------- 1 | function status = rmdir_safe(pname) 2 | status = 0; 3 | 4 | try 5 | if exist(pname,'dir') 6 | rmdir(pname, 's'); 7 | end 8 | catch 9 | status = -1; 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Utils/Shared/simData/simulateProbeData.m: -------------------------------------------------------------------------------- 1 | function snirf = simulateProbeData(probefile, ntpts) 2 | snirf = SnirfClass.empty(); 3 | if ~exist('probefile','var') 4 | return; 5 | end 6 | if ~exist('ntpts','var') 7 | ntpts = 1e3; 8 | end 9 | 10 | if ~ispathvalid(probefile) 11 | return; 12 | end 13 | 14 | nirs = NirsClass(probefile); 15 | for iM = 1:length(nirs.SD.MeasList) 16 | [nirs.t, nirs.d(:,iM)] = simulateDataTimeSeries(ntpts); 17 | end 18 | snirf = SnirfClass(nirs.d, nirs.t, nirs.SD, [], []); 19 | [p,f] = fileparts(probefile); 20 | snirf.Save(['./',f,'.snirf']); 21 | 22 | 23 | -------------------------------------------------------------------------------- /Utils/Shared/sprintf_waitbar.m: -------------------------------------------------------------------------------- 1 | function s2 = sprintf_waitbar(s) 2 | % Syntax: 3 | % s2 = sprintf_waitbar(s) 4 | % 5 | % Description: 6 | % Change character string with '_' character(s), to '\_', 7 | % so that the string is correctly displayed in a waitbar object. 8 | % Waitbar does not handle char strings with '_' gracefully. 9 | % This function inserts a '\' chararcter before each occurrence of 10 | % '_' so that it shows up corrctly when displayed in a waitbar object 11 | % 12 | s2 = s; 13 | k = find(s=='_'); 14 | for ii=1:length(k) 15 | s2 = sprintf('%s\\%s', s2(1:k(ii)+(ii-1)-1), s2(k(ii)+(ii-1):end)); 16 | end 17 | -------------------------------------------------------------------------------- /Utils/Shared/strcellfind.m: -------------------------------------------------------------------------------- 1 | function [b,idxs] = strcellfind(strs, s) 2 | 3 | b = false; 4 | 5 | r = strfind(strs, s); 6 | 7 | idxs=[]; 8 | kk=1; 9 | for ii=1:length(r) 10 | if ~isempty(r{ii}) 11 | b = true; 12 | idxs(kk) = ii; 13 | kk=kk+1; 14 | end 15 | end 16 | 17 | -------------------------------------------------------------------------------- /Utils/Shared/strtrim_improve.m: -------------------------------------------------------------------------------- 1 | function s = strtrim_improve(s0) 2 | % 3 | % strtrim handles only a limited number of whitespace types. 4 | % But does NOT handle 0 for example. This function turns all 5 | % whitespaces including 0 to plain old spaces which strtrim 6 | % does handle. 7 | % 8 | % 9 | s = s0; 10 | s(s<33) = ' '; % Replace all non-printable chracters with spaces 11 | 12 | % Feed the digestable new string to strtrim. 13 | s = strtrim(s); 14 | 15 | 16 | -------------------------------------------------------------------------------- /Utils/Shared/verGreaterThanOrEqual.m: -------------------------------------------------------------------------------- 1 | function b = verGreaterThanOrEqual(tool, version) 2 | 3 | if verLessThan(tool,version) 4 | b = false; 5 | else 6 | b = true; 7 | end 8 | 9 | -------------------------------------------------------------------------------- /Utils/Shared/versionnum2str.m: -------------------------------------------------------------------------------- 1 | function verstr = versionnum2str(vernum) 2 | verstr = ''; 3 | for ii = 1:length(vernum) 4 | if isempty(verstr) 5 | verstr = num2str(vernum(ii)); 6 | else 7 | verstr = sprintf('%s.%s', verstr, num2str(vernum(ii))); 8 | end 9 | end 10 | 11 | -------------------------------------------------------------------------------- /Utils/Shared/versionstr2num.m: -------------------------------------------------------------------------------- 1 | function [n0, n1] = versionstr2num(s) 2 | n0 = 0; 3 | if iscell(s) 4 | c = s; 5 | else 6 | c = str2cell(s,'.'); 7 | end 8 | n1 = zeros(1,length(c)); 9 | m = length(c); 10 | b = 100; 11 | for ii = 1:length(c) 12 | n0 = n0 + (str2num(c{ii}) * b^(m-ii)); 13 | n1(1,ii) = str2num(c{ii}); 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Utils/Shared/waitForGui.m: -------------------------------------------------------------------------------- 1 | function waitForGui(h, quiet) 2 | if nargin==0 3 | return; 4 | end 5 | if nargin < 2 6 | quiet = 0; 7 | end 8 | 9 | set(h, 'visible','on'); 10 | 11 | timer = tic; 12 | guiname = get(h, 'name'); 13 | if ~quiet 14 | fprintf('%s GUI is busy...\n', guiname); 15 | end 16 | while ishandle(h) 17 | if mod(toc(timer), 5)>4.5 18 | if ~quiet 19 | fprintf('%s GUI is busy...\n', guiname); 20 | end 21 | timer = tic; 22 | end 23 | pause(.1); 24 | end 25 | 26 | -------------------------------------------------------------------------------- /Utils/angleBetweenVectors.m: -------------------------------------------------------------------------------- 1 | function theta = angleBetweenVectors(u,v) 2 | 3 | theta = []; 4 | 5 | ndims_u = size(u,2); 6 | ndims_v = size(v,2); 7 | 8 | if ndims_u ~= ndims_v 9 | return; 10 | end 11 | 12 | ndims = ndims_u; 13 | 14 | if ndims ~= 2 & ndims~=3 15 | return; 16 | end 17 | 18 | if ndims==2 19 | theta = rad2deg( acos( dot(u,v) / (sqrt(u(1)^2 + u(2)^2) * sqrt(v(1)^2 + v(2)^2)) ) ); 20 | elseif ndims==3 21 | theta = rad2deg( acos( dot(u,v) / (sqrt(u(1)^2 + u(2)^2 + u(3)^2) * sqrt(v(1)^2 + v(2)^2 + v(3)^2)) ) ); 22 | end 23 | 24 | -------------------------------------------------------------------------------- /Utils/applyCoordTranspose.m: -------------------------------------------------------------------------------- 1 | function v = applyCoordTranspose(axes_order, v0) 2 | 3 | v=[]; 4 | 5 | if axes_order(1)>0 6 | v(:,1) = v0(:,abs(axes_order(1))); 7 | else 8 | v(:,1) = -v0(:,abs(axes_order(1))); 9 | end 10 | if axes_order(2)>0 11 | v(:,2) = v0(:,abs(axes_order(2))); 12 | else 13 | v(:,2) = -v0(:,abs(axes_order(2))); 14 | end 15 | if axes_order(3)>0 16 | v(:,3) = v0(:,abs(axes_order(3))); 17 | else 18 | v(:,3) = -v0(:,abs(axes_order(3))); 19 | end 20 | -------------------------------------------------------------------------------- /Utils/banner.m: -------------------------------------------------------------------------------- 1 | function title = banner() 2 | platform = ['R', version('-release')]; 3 | title = sprintf('AtlasViewerGUI (v%s, %s) - %s', getVernum('AtlasViewerGUI'), platform, filesepStandard(pwd)); 4 | -------------------------------------------------------------------------------- /Utils/closeallwaitbars.m: -------------------------------------------------------------------------------- 1 | function closeallwaitbars() 2 | % H1 line 3 | % help section 4 | wh=findall(0,'tag','TMWWaitbar'); 5 | delete(wh); 6 | -------------------------------------------------------------------------------- /Utils/cropSeparator.m: -------------------------------------------------------------------------------- 1 | function pname = cropSeparator(pname) 2 | if nargin==0 3 | pname = ''; 4 | return; 5 | end 6 | if isempty(pname) 7 | return; 8 | end 9 | if ~ischar(pname) 10 | return; 11 | end 12 | while pname(end) == '/' || pname(end) == '\' 13 | pname(end) = ''; 14 | if isempty(pname) 15 | return; 16 | end 17 | end 18 | 19 | -------------------------------------------------------------------------------- /Utils/drmDecode.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Utils/drmDecode.p -------------------------------------------------------------------------------- /Utils/drmIsEncoded.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/Utils/drmIsEncoded.p -------------------------------------------------------------------------------- /Utils/equal.m: -------------------------------------------------------------------------------- 1 | function b = equal(x1, x2, err) 2 | 3 | b=[]; 4 | if ~all(size(x1)==size(x2)) 5 | return; 6 | end 7 | 8 | if ~exist('err','var') 9 | err=1e-5; 10 | end 11 | 12 | if all(abs(x1-x2) 20 | 21 | % b = ~isempty(findstr(options, option)); %#ok<*FSTR> 22 | -------------------------------------------------------------------------------- /Utils/submodules/pathsubtract_startup.m: -------------------------------------------------------------------------------- 1 | function diff = pathsubtract(p2_0, p1_0, options) 2 | if ~exist('options','var') 3 | options = ''; 4 | end 5 | if optionExists_startup(options, 'nochange') 6 | option = ''; 7 | else 8 | option = 'full'; 9 | end 10 | p1 = filesepStandard_startup(p1_0, option); 11 | p2 = filesepStandard_startup(p2_0, option); 12 | if isempty(p1) 13 | p1 = p1_0; 14 | end 15 | if isempty(p2) 16 | p2 = p2_0; 17 | end 18 | k = strfind(p2, p1); 19 | if ~isempty(k) && k(1)==1 20 | diff = p2(k(1)+length(p1):end); 21 | elseif ~isempty(k) 22 | diff = p2(1:k(1)-1); 23 | else 24 | diff = ''; 25 | end 26 | -------------------------------------------------------------------------------- /Utils/submodules/removeFolderContents.m: -------------------------------------------------------------------------------- 1 | function removeFolderContents(folder) 2 | warning('off','MATLAB:RMDIR:RemovedFromPath') 3 | if isemptyFolder(folder) 4 | return 5 | end 6 | o = dir(folder); 7 | for ii = 1:length(o) 8 | if strcmp(o(ii).name,'.') 9 | continue 10 | end 11 | if strcmp(o(ii).name,'..') 12 | continue 13 | end 14 | try 15 | if o(ii).isdir 16 | rmdir([folder, '/', o(ii).name],'s') 17 | else 18 | delete([folder, '/', o(ii).name]) 19 | end 20 | catch 21 | end 22 | end 23 | warning('on','MATLAB:RMDIR:RemovedFromPath') 24 | -------------------------------------------------------------------------------- /Utils/submodules/setTerminal.m: -------------------------------------------------------------------------------- 1 | function s = setTerminal() 2 | % This is needed on a MAC to execute some shell commands 3 | % Otherwise the system command executes its own shell that forces the user 4 | % to press Enter key to continue matlab script execution. 5 | s = ''; 6 | if ismac() 7 | s = 'TERM=ansi; '; 8 | end 9 | 10 | -------------------------------------------------------------------------------- /Utils/submodules/waitForGui_startup.m: -------------------------------------------------------------------------------- 1 | function waitForGui_startup(h) 2 | if nargin==0 3 | return; 4 | end 5 | 6 | set(h, 'visible','on'); 7 | 8 | timer = tic; 9 | guiname = get(h, 'name'); 10 | % fprintf('%s GUI is busy...\n', guiname); 11 | while ishandle(h) 12 | if mod(toc(timer), 5)>4.5 13 | % fprintf('%s GUI is busy...\n', guiname); 14 | timer = tic; 15 | end 16 | pause(.1); 17 | end 18 | 19 | -------------------------------------------------------------------------------- /Utils/suppressGuiArgWarning.m: -------------------------------------------------------------------------------- 1 | function suppressGuiArgWarning(onoff) 2 | 3 | if onoff 4 | warning('off', 'MATLAB:str2func:invalidFunctionName') 5 | else 6 | warning('on', 'MATLAB:str2func:invalidFunctionName') 7 | end -------------------------------------------------------------------------------- /Utils/waitbar_msg_print.m: -------------------------------------------------------------------------------- 1 | function h = waitbar_msg_print(msg, h, step, total) 2 | 3 | if ~exist('h','var') 4 | h = []; 5 | end 6 | if ~exist('step','var') 7 | step = 0; 8 | total = 1; 9 | end 10 | 11 | if isempty(h) 12 | h = waitbar(step/total, msg); 13 | else 14 | h = waitbar(step/total, h, msg); 15 | end 16 | fprintf('%s\n', msg); 17 | 18 | -------------------------------------------------------------------------------- /Version.txt: -------------------------------------------------------------------------------- 1 | 2.51.0 -------------------------------------------------------------------------------- /buttonZoomIn_Callback.m: -------------------------------------------------------------------------------- 1 | function buttonZoomIn_Callback(hObject, eventdata, handles) 2 | global atlasViewer; 3 | axesv = atlasViewer.axesv; 4 | ax=[]; 5 | for ii=1:length(axesv) 6 | if ishandles(axesv(ii).handles.pushbuttonZoomIn) 7 | if hObject==axesv(ii).handles.pushbuttonZoomIn 8 | ax=axesv(ii); 9 | break; 10 | end 11 | end 12 | end 13 | 14 | camzoom(ax.handles.axesSurfDisplay, ax.zoomincr); 15 | atlasViewer.axesv(ii) = ax; 16 | 17 | -------------------------------------------------------------------------------- /editDegRotation_Callback.m: -------------------------------------------------------------------------------- 1 | function editDegRotation_Callback(hObject, eventdata, handles) 2 | global atlasViewer; 3 | axesv = atlasViewer.axesv; 4 | ax=[]; 5 | for ii=1:length(axesv) 6 | if ishandles(axesv(ii).handles.editDegRotation) 7 | if hObject==axesv(ii).handles.editDegRotation 8 | val = str2num(get(hObject,'string')); 9 | axesv(ii).rotation.degrees = val; 10 | atlasViewer.axesv(ii) = axesv(ii); 11 | end 12 | end 13 | end 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /freesurfer/fast_fileexists.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fast_fileexists.m -------------------------------------------------------------------------------- /freesurfer/fast_ldbhdr.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fast_ldbhdr.m -------------------------------------------------------------------------------- /freesurfer/fast_ldbslice.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fast_ldbslice.m -------------------------------------------------------------------------------- /freesurfer/fast_svbhdr.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fast_svbhdr.m -------------------------------------------------------------------------------- /freesurfer/fast_svbslice.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fast_svbslice.m -------------------------------------------------------------------------------- /freesurfer/fmri_ldbfile.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/fmri_ldbfile.m -------------------------------------------------------------------------------- /freesurfer/reshape1d.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/reshape1d.m -------------------------------------------------------------------------------- /freesurfer/reshape2d.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/freesurfer/reshape2d.m -------------------------------------------------------------------------------- /genProbeFromFluenceProf.m: -------------------------------------------------------------------------------- 1 | function genProbeFromFluenceProf(fwmodel) 2 | 3 | fid = fopen('./probe.txt','w'); 4 | 5 | for ii = 1:length(fwmodel.fluenceProfFnames) 6 | prof = loadFluenceProf(fwmodel.fluenceProfFnames{ii}); 7 | for jj=1:size(prof.srcpos,1) 8 | s = prof.srcpos(jj,:); 9 | fprintf(fid, '%0.1f\t%0.1f\t%0.1f\n', s(1), s(2), s(3)); 10 | end 11 | end 12 | 13 | fclose(fid); -------------------------------------------------------------------------------- /iso2mesh/bin/cgalmesh.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalmesh.exe -------------------------------------------------------------------------------- /iso2mesh/bin/cgalmesh.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalmesh.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalmesh.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalmesh.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/cgalmesh.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalmesh.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/cgalmesh.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalmesh.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalpoly.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalpoly.exe -------------------------------------------------------------------------------- /iso2mesh/bin/cgalpoly.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalpoly.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalpoly.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalpoly.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/cgalpoly.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalpoly.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/cgalpoly.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalpoly.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsimp2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsimp2.exe -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsimp2.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsimp2.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsimp2.mexmac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsimp2.mexmac -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsimp2.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsimp2.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsimp2.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsimp2.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsurf.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsurf.exe -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsurf.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsurf.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsurf.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsurf.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsurf.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsurf.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/cgalsurf.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cgalsurf.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/cork.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cork.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/cork.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/cork.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.exe -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexarmhf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexarmhf -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexmac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexmac -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/jmeshlib.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/jmeshlib.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.exe -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.mexa64 -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.mexarmhf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.mexarmhf -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.mexglx -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.mexmaci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.mexmaci -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix.mexmaci64 -------------------------------------------------------------------------------- /iso2mesh/bin/meshfix_x86_64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/meshfix_x86_64.exe -------------------------------------------------------------------------------- /iso2mesh/bin/mpfr-vc80-mt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/bin/mpfr-vc80-mt.dll -------------------------------------------------------------------------------- /iso2mesh/delendelem.m: -------------------------------------------------------------------------------- 1 | function elem=delendelem(elem,mask) 2 | % 3 | % elem=delendelem(elem,mask) 4 | % 5 | % delete elements whose nodes are all edge nodes 6 | % 7 | % author: Qianqian Fang, 8 | % date: 2007/11/24 9 | % 10 | % input/output: 11 | % elem: input/output, surface/volumetric element list 12 | % mask: of length of node number, =0 for internal nodes, =1 for edge nodes 13 | % 14 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 15 | % 16 | 17 | badidx=sum(mask(elem)'); 18 | elem(find(badidx==size(elem,2)),:)=[]; 19 | -------------------------------------------------------------------------------- /iso2mesh/fillsurf.m: -------------------------------------------------------------------------------- 1 | function [no,el]=fillsurf(node,face) 2 | % 3 | % [no,el]=fillsurf(node,face) 4 | % 5 | % calculate the enclosed volume for a closed surface 6 | % 7 | % author: Qianqian Fang, 8 | % 9 | % input: 10 | % node: node coordinates 11 | % face: surface triangle list 12 | % 13 | % output: 14 | % vol: total volume of the enclosed space 15 | % 16 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 17 | % 18 | 19 | ISO2MESH_TETGENOPT='-YY'; 20 | [no,el]=surf2mesh(node,face,[],[],1,1); 21 | -------------------------------------------------------------------------------- /iso2mesh/findiso2meshbin.m: -------------------------------------------------------------------------------- 1 | function dirname = findiso2meshbin() 2 | 3 | 4 | % Search matlab paths for bin dir 5 | dirname = ffpath('iso2mesh/bin'); 6 | 7 | if isempty(dirname) 8 | dirnameApp = getAppDir(); 9 | if exist(dirnameApp,'dir') 10 | dirname = dirnameApp; 11 | end 12 | else 13 | dirname = [dirname, '/iso2mesh/bin/']; 14 | end 15 | -------------------------------------------------------------------------------- /iso2mesh/getexeextfinal.m: -------------------------------------------------------------------------------- 1 | function exesuff = getexeextfinal(exename) 2 | 3 | exesuff = getexeext(); 4 | 5 | exesuff = fallbackexeext(exesuff, exename); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iso2mesh/iso2mesh_workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/iso2mesh_workflow.jpg -------------------------------------------------------------------------------- /iso2mesh/isoctavemesh.m: -------------------------------------------------------------------------------- 1 | function [isoctave verinfo]=isoctavemesh 2 | % 3 | % [isoctave verinfo]=isoctavemesh 4 | % 5 | % determine whether the code is running in octave 6 | % 7 | % author: Qianqian Fang, 8 | % 9 | % output: 10 | % isoctave: 1 if in octave, otherwise 0 11 | % verinfo: a string, showing the version of octave (OCTAVE_VERSION) 12 | % 13 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 14 | % 15 | verinfo=''; 16 | isoctave=(exist('OCTAVE_VERSION','builtin')~=0); 17 | if(nargout==2 && isoctave) 18 | verinfo=OCTAVE_VERSION; 19 | end 20 | -------------------------------------------------------------------------------- /iso2mesh/m2v.m: -------------------------------------------------------------------------------- 1 | function varargout=m2v(varargin) 2 | % 3 | % vol=m2v(node,face,Nxyz) 4 | % or 5 | % vol=m2v(node,face,xi,yi,zi) 6 | % 7 | % shortcut for mesh2vol, rasterizing a teterahedral mesh to a volume using graphics 8 | % 9 | % author: Qianqian Fang (fangq nmr.mgh.harvard.edu) 10 | % 11 | % input/output: please see details in the help for mesh2vol 12 | % 13 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 14 | % 15 | 16 | [varargout{1:nargout}]=mesh2vol(varargin{:}); 17 | -------------------------------------------------------------------------------- /iso2mesh/rat_head.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BUNPC/AtlasViewer/71fc98ec8ca54783378310304113e825bbcd476a/iso2mesh/rat_head.mat -------------------------------------------------------------------------------- /iso2mesh/removedupelem.m: -------------------------------------------------------------------------------- 1 | function elem=removedupelem(elem) 2 | % 3 | % elem=removedupelem(elem) 4 | % 5 | % remove doubly duplicated (folded) elements 6 | % 7 | % author: Qianqian Fang, 8 | % 9 | % input: 10 | % elem: list of elements (node indices) 11 | % 12 | % output: 13 | % elem: element list after removing the duplicated elements 14 | % 15 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 16 | % 17 | 18 | [el,count1,count2]=unique(sort(elem')','rows'); 19 | bins=hist(count2,1:size(elem,1)); 20 | cc=bins(count2); 21 | elem(find(cc>0&mod(cc,2)==0),:)=[]; 22 | -------------------------------------------------------------------------------- /iso2mesh/savesmf.m: -------------------------------------------------------------------------------- 1 | function savesmf(v,f,fname) 2 | % 3 | % savesmf(v,f,fname) 4 | % 5 | % save a surface mesh to smf format 6 | % 7 | % author: Qianqian Fang, 8 | % date: 2007/11/21 9 | % 10 | % input: 11 | % v: input, surface node list, dimension (nn,3) 12 | % f: input, surface face element list, dimension (be,3) 13 | % fname: output file name 14 | % 15 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 16 | % 17 | 18 | fid=fopen(fname,'wt'); 19 | fprintf(fid,'v %.16f %.16f %.16f\n',v'); 20 | fprintf(fid,'f %d %d %d\n',f'); 21 | fclose(fid); 22 | -------------------------------------------------------------------------------- /iso2mesh/v2m.m: -------------------------------------------------------------------------------- 1 | function [node,elem,face]=v2m(img,isovalues,opt,maxvol,method) 2 | % 3 | % [node,elem,face]=v2m(img,isovalues,opt,maxvol,method) 4 | % 5 | % volumetric mesh generation from binary or gray-scale volumetric images 6 | % shortcut for vol2mesh 7 | % 8 | % author: Qianqian Fang (fangq nmr.mgh.harvard.edu) 9 | % 10 | % inputs and outputs are similar to those defined in vol2mesh 11 | % 12 | % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 13 | % 14 | if(nargin==4) 15 | method='cgalsurf'; 16 | end 17 | 18 | [node,elem,face]=vol2mesh(img,1:size(img,1),1:size(img,2),1:size(img,3),opt,maxvol,1,method,isovalues); 19 | -------------------------------------------------------------------------------- /toolboxesRequired.txt: -------------------------------------------------------------------------------- 1 | Image Processing Toolbox 2 | Simulink 3 | Control System Toolbox 4 | --------------------------------------------------------------------------------