arboretum/utils.py
def export_hdf(filename: str,
               segmentation: np.ndarray = None,
               tracker_state: TrackerFrozenState = None):
    """ export the tracking data to an hdf file """

    if os.path.exists(filename):
        raise IOError(f'{filename} already exists!')

    with ArboretumHDFHandler(filename, 'w') as h:
        h.write_segmentation(segmentation)

        if tracker_state is not None:
            if tracker_state.objects is not None:
                h.write_objects(tracker_state, obj_type='obj_type_1')
            if tracker_state.tracks is not None:
                h.write_tracks(tracker_state, obj_type='obj_type_1')
 export the tracking data to an hdf file 
export the tracking data to an hdf file
export the tracking data to an hdf file
def export_hdf(filename: str,
               segmentation: np.ndarray = None,
               tracker_state: TrackerFrozenState = None):
    if os.path.exists(filename):
        raise IOError(f'{filename} already exists!')
    with ArboretumHDFHandler(filename, 'w') as h:
        h.write_segmentation(segmentation)
        if tracker_state is not None:
            if tracker_state.objects is not None:
                h.write_objects(tracker_state, obj_type='obj_type_1')
            if tracker_state.tracks is not None:
                h.write_tracks(tracker_state, obj_type='obj_type_1')
def export_hdf ( filename : str , segmentation : np . ndarray = None , tracker_state : TrackerFrozenState = None ) : if os . path . exists ( filename ) : raise IOError ( f'{filename} already exists!' ) with ArboretumHDFHandler ( filename , 'w' ) as h : h . write_segmentation ( segmentation ) if tracker_state is not None : if tracker_state . objects is not None : h . write_objects ( tracker_state , obj_type = 'obj_type_1' ) if tracker_state . tracks is not None : h . write_tracks ( tracker_state , obj_type = 'obj_type_1' )
export the tracking data to an hdf file
export the tracking data to an hdf file
""" export the tracking data to an hdf file """
filename
str
segmentation
np.ndarray
tracker_state
TrackerFrozenState