Commit 423f9779 authored by Jay's avatar Jay
Browse files

v1.13

-- Change MetaDataTags format to conform to latest SNIRF spec change where metaDataTags is a variable length structure with immediate direct indexing for better search performance.
-- Add generator for standalone Snirf reader/writer
parent 5ce45ea8
Loading
Loading
Loading
Loading

.DS_Store

deleted100644 → 0
−8 KiB

File deleted.

+11 −8
Original line number Diff line number Diff line
@@ -17,18 +17,21 @@ classdef DataFilesClass < handle
            obj.type = '';
            obj.pathnm = pwd;
            skipconfigfile = false;
            if nargin==1
                if ischar(varargin{1}) && strcmp(varargin{1}, 'standalone')
                    skipconfigfile = true;
                else
            
            if nargin>0
                obj.type = varargin{1};
                if obj.type(1)=='.'
                    obj.type(1)='';
                end
            end
            end
            obj.errmsg = {};
            
            if nargin>1
                if strcmp(varargin{2}, 'standalone')
                    skipconfigfile = true;
                end
            end
            
            obj.config = struct('RegressionTestActive','');
            if skipconfigfile==false
                cfg = ConfigFileClass();
+1 −1
Original line number Diff line number Diff line
function DeleteSnirfFiles(snirffiles0)

if ~exist('snirffiles0','var')
    snirffiles0 = DataFilesClass('.snirf').files;
    snirffiles0 = DataFilesClass('.snirf','standalone').files;
end

snirffiles = mydir('');
+29 −0
Original line number Diff line number Diff line

NOTE: This documentation is a work in progress. More detailed documentation will be added in the coming months.


Introduction:
=============
SNIRF is a HDF5-based file format for storing and sharing NIRS data independently of any platform-specific file format such as Matlab. SNIRFReaderWriter is an implementation in Matlab of a SNIRF reader/writer application (as the name implies). 


Downloading SNIRFReaderWriter:
==============================
First download the SNIRFReaderWriter package. Go online to https://github.com/fNIRS/snirf-code and click the green "Clone or download" button on right. Then click "Download ZIP" right below the green button. Once you have downloaded the zip file, unzip it.


Installing SNIRFReaderWriter
==============================

1. Open Matlab and in the command window, change the current folder to the SNIRFReaderWriter root folder that you downloaded. In the command window, type

   >> setpaths

This will set all the required matlab search paths for SNIRFReaderWriter. Note: this step should be done every time a new Matlab session is started. 

At this point you should be ready to start SNIRFReaderWriter from the Matlab command window. 

2. Running the SNIRF demo:

Run the demos demo_snirf.m and demo_snirf_readfile.m (which should be available on the Matlab command line after running setpaths). They demonstrate how to use SnirfClass reader/writer to save, load and read SNIRF files. Make sure to run demo_snirf before demo_snirf_readfile.m since it expects the snirf files generated by demo_snirf to be present (otherwise it displays a message box stating this if it doesn't find them). The SNIRFReaderWriter project includes sample .nirs files (DataTree/AcquiredData/Snirf/Examples) which the demo converts to .snirf files and then shows how to load them back into memory. 
Loading