sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
9f89eb1b7f45196fb2c192f64017113246e1432fdb53a8a3d546e6839002deb7 | C | 2,575 | 103 | /*
** read nuisance covariates file into a matrix
**
** G.Lohmann, MPI-KYB, 2018
*/
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
extern int VStringToken (char *,c... |
61537bc337753e150ced5cca1d3fd06773c2688478ececa268911fa240b034c6 | C | 2,576 | 108 | /*
//
// Copyright 2011-2014 NimbusKit
// Originally ported from https://github.com/ingenuitas/python-tesseract/blob/master/fmemopen.c
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
/... |
091e907137ed7e5ca0f31fc05ba0fd5b05e31e4b39a3ac29d9e95d6b01c4844b | C | 2,583 | 95 | #include <math.h>
#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
/*declare variables*/
const mwSize *dims;
mwIndex indx;
int i, numdims;
int numelin;
mxClassID classid;
double *input1r, *input1i, *output1r, *output1i;
double a, b, c, d, denom;
doub... |
4aca27ccfe35bfdecdee1505830316216c503806886028f28f76a35abe86efb7 | C | 2,604 | 110 | /*! \file
2D scaling using bilinear interpolation.
Scale all slices of a 3D image using slicewise bilinear interpolation.
The image center remains fixed.
\par Author:
Gabriele Lohmann, MPI-CBS
*/
/* From the Vista library: */
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <viaio/os.h>
#include <viaio/VIm... |
99d43dc2114985e70cb11d6e6757463cb108890984b9c9c2a9379e407e45d642 | C | 2,617 | 100 |
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_histogram.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <stdio.h>
#include <stdlib.h>... |
1d9555901f8ffb52326dd802899e381d7186300f567ec28f129d8fb5829504cb | C | 2,634 | 132 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include "jz_am... |
0ab89b21e902dc1d957ff2edb9716e13e17db36cd9ca6035801c05bbf2c05632 | C | 2,648 | 97 | /* rand.c -- drand48 implementation from the FreeBSD source tree. */
// This file is an amalgamation of the many small files in FreeBSD to do with
// drand48 and friends implementations.
// It comprises _rand48.c, rand48.h, srand48.c, drand48.c, erand48.c, lrand48.c
/*
* Copyright (c) 1993 Martin Birgmeier
* All r... |
773965f72062ee0df023f5c7e33f4faa48ed9881c125bf3286668f421bcbb99a | C | 2,704 | 97 | /* rand.c -- drand48 implementation from the FreeBSD source tree. */
// This file is an amalgamation of the many small files in FreeBSD to do with
// drand48 and friends implementations.
// It comprises _rand48.c, rand48.h, srand48.c, drand48.c, erand48.c, lrand48.c
/*
* Copyright (c) 1993 Martin Birgmeier
* All r... |
d93b751c934f025de443e38c49ee1daba3db7775f2fbeff69c67988a645e90ce | C | 2,710 | 130 | /*
* This file contains routines for computing image statistics.
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright not... |
e44325c8405faeb4fcdaf17df29f020a76396961c85c61bd1085acbfd56a2de0 | C | 2,741 | 121 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include <stdio... |
ef4f3620f6e06f74433c207cdd1a64ad8d5065e158b5d7780e46f6b3895778dc | C | 2,757 | 100 | #include <math.h>
#include <string.h>
#include "mex.h"
#include <stdio.h>
/*
* Copyright (C) 2008, Robert Oostenveld, F.C. Donders Ccentre for Cognitive Neuroimaging
* Copyright (C) 2007, Peter Desain, Nijmegen Institute for Cognition and Information
*
* This program is free software; you can redistribute it and/o... |
dd69cdb1baa124d3e25b42b48bd312bed8d302bb6dd87a1a2adc3af6828791e1 | C | 2,781 | 112 | /*
** Input: a segmentation image containing at least three classes:
** grey matter, white matter, CSF
**
** Output:
** metric image from two distamce transforms
**
** G.Lohmann, MPI-KYB, May 2024
*/
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#incl... |
583da4a7c6bd65b314664924e01c13752e80c515eb4a77d7f695719f2564809b | C | 2,810 | 90 | #include <string.h>
#include <math.h>
#include "mex.h"
void
mexFunction (int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[])
{
mxArray *lf;
double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, eps, alpha, beta, A, B, C;
double r[3], u[3], d[3];
double *lf_p, *rm_p, *um_p, *R;
int nchan, i;
char str[2... |
a0768a067541c2173af983c555b5618430b7545943c149e64a484ffcfda989f7 | C | 2,814 | 94 | #include <math.h>
#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
/*declare variables*/
const mwSize *dims;
mwSize *dimsout;
mwIndex indx;
int i, numdims;
int numelin;
mxClassID classid;
double *input1r, *input1i, *output1r, *output1i;
double a, b, c... |
6255a680e8163b0cc55198cd419d34b8da8576517633810cdd56c3661f06bb25 | C | 2,826 | 126 | #include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_cblas.h>
#include <gsl/gsl_blas.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int DNorm(double *data,siz... |
dbce9434ef7e502e1e39e38cc495bd9abe273b0c9f5c01920c7244daa6b1d7af | C | 2,851 | 83 | /**
*****************************************************************************
**
** File : sysmem.c
**
** Author : Auto-generated by STM32CubeIDE
**
** Abstract : STM32CubeIDE Minimal System Memory calls file
**
** For more information about which c-functions
** need whic... |
516771ebd95e69010b602f0b6bfc04e69986df8fffbf7436fb91d832c58b5da8 | C | 2,864 | 93 | /****************************************************************
*
* Copyright (C) Max Planck Institute
* for Human Cognitive and Brain Sciences, Leipzig
*
* Author Gabriele Lohmann, 2004, <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the ... |
71026c2334a0f5523175bafac69c6eda9357d41af72dd78f9fd54dffcd342b3e | C | 2,869 | 83 | /* test/test_index.c -- simple tool to build an index, for the test harness.
Copyright (C) 2018 Genome Research Ltd.
Author: James Bonfield <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to... |
23a08e7754819ca3ac3dc2a466fd1b08924b181391f56ac3ed83565ff1c27b5e | C | 2,876 | 125 | /*! \file
2d chamfer distance transform.
For each foreground pixel, the length of the shortest
2D path to the nearest background pixel is computed.
The chamfer distance metric is an approximation to the
Euclidian distance.
\par References:
G. Borgefors (1984).
"Distance Transforms in arbitrary dimensions",
CVGIP 27,... |
e13e4118809261cc198038a02ed4ef958662239bc1fd6639492d29a11396811a | C | 2,896 | 97 | /* Fuzz testing target. */
/*
* Copyright (c) 2019 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
6bfd09d48815f0153457a1bbcb89fbfc9bf27864baa5ea644b23f381668b76e9 | C | 2,907 | 91 | /* md5fa.c -- MD5 checksum utility.
Copyright (C) 2008, 2009, 2015 Genome Research Ltd.
Author: Heng Li <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restri... |
739e54ed6928cc5ca52e9b714a477aeb1af654b9195ef37fc2573441bee2c329 | C | 2,945 | 96 | #include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_math.h>
#include "gsl_utils.h"
#define ROUND(x) (int)(((x) >= 0)... |
7d956044a92d58e0cd97c40e4ffb36b3e0d9feebcd63486d20d1650fbaa33db8 | C | 2,973 | 100 | /* Fuzz testing target. */
/*
* Copyright (c) 2019 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
623256b84d1cf37aa5a91045aba1b0fae7dbf3a6f70c171e6af96073d1f05752 | C | 2,985 | 96 | /*
** Cylarim: Cylinder-based Algorithm for Laminar fMRI Data Analysis
**
** G.Lohmann, MPI-KYB, Oct 2024
*/
/* From the standard C library: */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <via... |
f09e70c7b23f3777dc3ae9ff6d3317789e322deade4129e230ab81d256fd671c | C | 2,986 | 125 | /*
** generate permutation table using exchangeability information
**
** G.Lohmann, July 2018
*/
#include <viaio/Vlib.h>
#include <viaio/file.h>
#include <viaio/option.h>
#include <viaio/mu.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl... |
9c8996ac276e34a018a334121252ecafa5e54edc7a9dd75265729e88415048a4 | C | 3,025 | 123 | /*
** read nifti-1 to vista format
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <math.h>
#include <nifti/nifti1.h>
#include <nifti/nifti1_io.h>
#include <nifti/nifti2.h>
#d... |
a07928f388a571cc4dd3c642f166b3d73f7c66263766c978fe94452edde6b5f7 | C | 3,050 | 98 | /*
* $Id: Crop.c 3177 2008-04-01 14:47:24Z karstenm $
*
* This file contains routines for inverting and negating images.
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby gran... |
9a8ecc50aafec14c978f2509356d4d6a9db4a3bf6c716e72acf958b78d1410bb | C | 3,055 | 106 | /* Fuzz testing target. */
/*
* Copyright (c) 2019 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
fe3ea62b010fe04c30ac1967e90405755e10695021378acc0447c6e531a53d5b | C | 3,062 | 94 | /*
* $Id: Fill.c 3177 2008-04-01 14:47:24Z karstenm $
*
* This file contains a routine for filling an image with a pixel
* value constant.
*/
/*
* Copyright 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose... |
caa40b61b362bb95ab8ab4d786b937793a2c993b5b020a27e1397a45c95a9557 | C | 3,121 | 111 | /*
* WRITE_CTF_SHM writes a packet to shared memory. This function can be
* used for real-time processing of data while it is being acquired.
*
* Use as
* write_ctf_shm(msgNumber, msgType, msgId, sampleNumber, numSamples, numChannels, data);
*
* Copyright (C) 2007, Robert Oostenveld
*
* $Id$
*/
#include <s... |
88a2cf299a85beb84fd6d31e4d446160546f7cd8cd9166d4ff6f0f80dee19a14 | C | 3,154 | 160 | /*! \file
2D Anisotropic diffusion
\par Reference:
G.Gerig, O. Kuebler, R. Kikinis, F.Jolesz:
Nonlinear anisotropic filtering of MRI data.
IEEE Trans on Medical Imaging, Vol.11, No.2, June 1992.
\par Author:
G.Lohmann, MPI-CBS
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <stdio.h>
#incl... |
cb49eb5cf3d2db0fe4fd2345b4d6b6d6c6733b482ba716d733d3e7a6f649bc52 | C | 3,160 | 123 | /*
* The original plgndr function was implemented using some code from
* Numerical Recipes in C. However, it was not allowed to release that code
* as open source. The new implementation below is using some code from
* the GNU Scientific Library (http://www.gnu.org/software/gsl).
*
* Copyright (C) 2002-2006 ... |
7272ca790554deffe04ce150da2bd06b9da81cb0619e82f3af76502898e119f1 | C | 3,200 | 138 | /*
** B-H-FDR applied to zmap
**
** G.Lohmann, Jan 2018
*/
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <float.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include ... |
e2a7930da51f92410ca2ebe4e87f5f2cb260eb15cce34c6f888b792c077b85a4 | C | 3,203 | 125 | /*
** detrending, subtract moving average
** G.Lohmann, 2018, MPI-KYB
*/
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
extern void VGetStats(double *data,int nt,int i0,double *ave,double *... |
68ddeac68b0cdbe914d3837323cfd011bb1c0dac091e037e993531aeb2e234fa | C | 3,233 | 157 | /*! \file
2D/3D median filter
\par Author:
Gabriele Lohmann, MPI-CBS
*/
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
/* From the standard C library: */
#include <stdio.h>
#include <stdlib.h>
#include <gsl/gsl_cblas.h>
#include <gsl/gsl_matrix.h>
#includ... |
aaef703b40e4f881f8a52d8a1be6408c3937a412e4fed5762ac0b55d5354c63b | C | 3,234 | 163 | /*! \file
Smoothing filters using convolutions
\par Author:
Gabriele Lohmann, MPI-CBS
*/
/* From the Vista library: */
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
/* From the standard C libaray: */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#inclu... |
784827f55d9902789508d6690647a2aa7b2eb0c98450d2742c44d2f66c60a2f4 | C | 3,250 | 163 | /*! \file
3d Euclidean distance transform.
For each background voxel, the length of the shortest
3D path to the nearest foreground voxel is computed.
\par References:
Toyofumi Saito, Jun-Ichiro Toriwaki (1994).
"New algorithms for euclidean distance transformation of a n-dimensional
picture with applications",
Patte... |
5ae5d926b4aa3021395ce02a1cf5532ead419847dfd1c3b537107bbc7b173d0e | C | 3,254 | 101 | /****************************************************************
*
* Copyright (C) Max Planck Institute
* for Biological Cybernetics, Tuebingen, Germany
*
* Author: Gabriele Lohmann, 2015
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Lic... |
5b90f61ed202ef26048d3350785fff735209ea51ce20e2b5f716005b52af345d | C | 3,257 | 86 | /* bam_flags.c -- flags subcommand.
Copyright (C) 2013-2014, 2021 Genome Research Ltd.
Author: Petr Danecek <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without re... |
96c1464d6b26181200cbaf41b203e1da82abb8f93ad687c297a52cade7d28c3b | C | 3,262 | 124 | /*
* Copyright (C) 1999-2022 Christophe Phillips
*/
/*
Input : ind_tr, XYZv, weight, defl
Output : Cii_cog
weight = (sig[0]-sig[1])/((sig[0]+sig[1])*2.*pi) ;
*/
#include <math.h>
#include "mex.h"
void Cii_cog(double C[], double ind_tr[], int Ntri, double XYZv[], int Nvert,
double weight, double defl)
{
do... |
a1ca8473fb92452732d3c0503c7a04b2bfa052c9eb7e19de1d43d4e0b23a6be2 | C | 3,313 | 87 | /* test/test_introspection.c -- demonstration of introspection function usage
Copyright (C) 2020-2021 Genome Research Ltd.
Author: James Bonfield <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software... |
20900015979afee13abf63baf6c531d929d8281cd89ad1661b07c83953ece064 | C | 3,320 | 148 |
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_multifit.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/... |
7db027a9bfd901edcc6aeed51395da4c3b7f64e8c76d4e8b5505c50e924e6f36 | C | 3,355 | 149 |
#include <viaio/Vlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_combination.h>
/* binomial coefficient, n choose k */
double b... |
e5e421895e83e9cd746c16d774896718bbca4881c8b62661d439ecb17a832a1d | C | 3,360 | 144 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include <stdio... |
a284a4cdeec9d32cabfa3db36a922973cd4adb01f02df40c549b4c12041ec683 | C | 3,367 | 143 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include <math.... |
e507a8160e9c741be7d180ff5a90a9ecc2ee08e488a174026e6376bf196c61ae | C | 3,394 | 164 | #include "jz_zim.h"
#include <stdio.h>
jz_color_rgb jz_color_red={255,0,0};
jz_color_rgb jz_color_green={0,255,0};
jz_color_rgb jz_color_blue={0,0,255};
jz_color_rgb jz_color_cgray={128,128,128};
jz_color_rgb jz_color_white={255,255,255};
/*-----------------------------------------------------------------------------... |
53d3e2e79945d55db6b16f90f778dcd33373d62582490eadff5c6682dd71d438 | C | 3,401 | 125 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "poisson.h"
#include "my_poisson.h"
#include <SFMT.h>
int len(double *a);
/*
struct POISSON *create_poisson(int num, int *num_group, int *total_poisson, double firingrate)
{
struct POISSON *poisson;
int i,j;
int *total,*group;
total = total_... |
bd6b856daf051684282d90614775a84e34d76d459aeb3ace54bfd4937951823f | C | 3,410 | 139 |
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_multifit.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/... |
18a64cd9cca35ada01779d3ed9444304d473b7edc57d6320c076ed9966642276 | C | 3,412 | 109 | /* The MIT/Expat License
Copyright (C) 2017 Genome Research Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify,... |
99396a56234d84144912ae9105c6f222d32b113795c9c9290cc67299c2a27dd3 | C | 3,441 | 124 |
/*
* Copyright (C) 2006, Robert Oostenveld, F.C. Donders Ccentre for Cognitive Neuroimaging
* Copyright (C) 2007, Peter Desain, Nijmegen Institute for Cognition and Information
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publis... |
ee24b095cd61e7a6fce83d0b9a09d2abf42d1f56629e1dac225c9ef6bac24e0a | C | 3,487 | 109 | #include "mex.h"
/*
* Copyright (C) 2002-2022 Guillaume Flandin
*/
/*
Differences with built-in findstr:
- allows to search only the n first occurrences of a pattern
- allows to search only in a substring (given an index of the beginning)
MATLAB hack:
- doesn't use mxGetString to... |
f7b55182a147bd91fbd3a9481b84d74af859573fe582f9b615bbd2b9dfc5393c | C | 3,493 | 142 | /*
** read nifti-1 to vista format
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <math.h>
#include <nifti/nifti2.h>
#include <nifti/nifti1_io.h>
#define ABS(x) ((x) > 0 ? (x... |
faf4154efd73ac8549e59dec5e20f3e7b981e896804060a490467165733637cb | C | 3,514 | 121 | /*
* READ_CTF_SHM reads metainformation or selected blocks of data from
* shared memory. This function can be used for real-time processing of
* data while it is being acquired.
*
* Use as
* [msgType msgId sampleNumber numSamples numChannels] = read_ctf_shm;
* or
* [data] = read_ctf_shm(msgNumber);
* [da... |
487dc2446abeed89e2b72620c312afefe9744dc31ba35f8dd39f3ec64fa3546b | C | 3,561 | 208 | /*
** test "checking plane"-condition (Tsao, and Fu's algorithm)
** used in topological thinning
**
** G.Lohmann, Januar 1997
*/
#include <stdio.h>
#include <stdlib.h>
/* From the Vista library: */
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#define BAND 0
#defi... |
7b20038539b8d695c7c7f8fb0bf70e1b406095c75e06310e775d33e3aa83bc97 | C | 3,561 | 191 | /*
** t-tests
**
** G.Lohmann, Jan 2017
*/
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#define TINY 1.0e-10
#define ABS(x) ((x) > 0 ? (x) : -(x))
#def... |
23f7476a8e512eb679eb016e3dada1c23ce3843218396a4479f9ade241874748 | C | 3,623 | 177 | /*
** bilateral filter
**
** G.Lohmann, Jan 2017
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
extern float kth_smallest(float *a, size_t n, size_t k);
#define Median(a,n) kth_smallest(a,n,(((n)&1)?((n)/2):(((n)/... |
025ac9e296a909f2d6d2a4b2f26794306a94345c538ff68e0b6fccaf73329079 | C | 3,639 | 88 | /* test_kfunc.c -- kt_fisher_exact() unit tests
Copyright (C) 2020 University of Glasgow.
Author: John Marshall <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the So... |
50d625cc12380ce2c74741bc5eb37c45213d4e8b62a4a0bb365fa46a1c9baf30 | C | 3,645 | 181 | /*! \file
3D Anisotropic diffusion
\par Reference:
G.Gerig, O. Kuebler, R. Kikinis, F.Jolesz:
Nonlinear anisotropic filtering of MRI data.
IEEE Trans on Medical Imaging, Vol.11, No.2, June 1992.
\par Author:
G.Lohmann, MPI-CBS
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <stdio.h>
#inclu... |
c447887f2bded867bdb52d99887921c99cc38fe328e86c13654223ccd55a3911 | C | 3,658 | 169 | /*! \file
Convolution
This file contains code for 2D and 3D convolutions, and for
1D convolutions. 1D convolutions can be used to implement
separable 2D/3D filters.
\par Author:
Gabriele Lohmann, MPI-CBS
*/
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
/* F... |
b0d032730c7535ff0f781cd04523baaa050cc57f5b85bf82491af4de0cd35253 | C | 3,661 | 120 | /* The MIT/Expat License
Copyright (C) 2017-2018 Genome Research Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mo... |
cb97ae765a24ded3216499c7589f444234782d7a503d51f06807968a9b2e1f23 | C | 3,680 | 164 | #include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/* read voxel value */
double VGetVoxel(VImage *src,int nimages,int b,int r,int c,int j)
{
double u=0;
if (nimages <= 1) { /* 3D */
u... |
d6aa294a3fa14ed9586ff2312cf46eaab6a58b760ee8e7a4b775e410f895ca7a | C | 3,685 | 155 | /*
** Matrix Projection,
** Ref: Lohmann, Loktyushin, Stelzer, Scheffler (2018) bioRXiv
**
** G.Lohmann, MPI-KYB, Nov 2018
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_errno.h>
#includ... |
c2cf21267bb9cc8ab92157c32d3b0614aed09ccd357a7ac007da6abfc8c4934a | C | 3,746 | 135 | /*
* Copyright (C) 1999-2022 Christophe Phillips
*/
/*
Input : XYZva, XYZvb, trib, weight, defl
Output : Cii
siga==sig[0], sigb==sig[1], sigc==sig[2], sigd==sig[3]
weight = (sig[0]-sig[1])/((sig[2]+sig[3])*2.*pi) ;
*/
#include <math.h>
#include "mex.h"
void Cij_cst(double C[], double XYZva[], int Nverta, ... |
6544049ea79ee20a1f387f8e64a8cd3108177c3ba8a77383cf7d1ab1863c7a71 | C | 3,755 | 166 | /*
** file IO update for lipsia programs
** lipsia programs can read files with extensions .v .v.gz .nii .nii.gz
** lipsia outputs files with extensions .v
**
** G.Lohmann, MPI-KYB, May 2017
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include <math.h>
#inc... |
97fa3f0f22e78cece971a597f75bdc6fafcce4ea52696fe48e3d021099ac1443 | C | 3,761 | 143 | /*
** estimate false discovery rate based on histograms
** input histograms are generated by "vted"
**
** Ref: Lohmann et al (2016) PLoS One, 11(6):e0158185
**
** G.Lohmann, MPI-KYB, Jan 2015
*/
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#includ... |
4aae719480255fa692cd319759d72881cca89273711673d45261efb3ff9cd8cb | C | 3,780 | 130 | /*
* $Id: Flip.c 3177 2008-04-01 14:47:24Z karstenm $
*
* This file contains routines for flipping images
*
* 10/09/1997: bug in horizonatal flipping of VShort images corrected (FK)
*
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell thi... |
5ea3037215e692a2572089d387a7ffd386ad212d80a6df0a66fe0f31aac2088e | C | 3,800 | 168 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "viaio/Vlib.h"
#include "viaio/VImage.h"
#include "viaio/mu.h"
#include "viaio/option.h"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_sort.h>
#include <gsl/gsl_permutation.h>
#... |
7ec06929c15254ac1590f5bf2c7dd59f3fae2bba75e18475ec52b1a8a353e7fc | C | 3,800 | 148 | #include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_sort.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_rng.h>
... |
f682c46eca5a4f65292841085532b718d54e2cf4d2d0c24ede198bed4d092e29 | C | 3,807 | 121 | /* Fuzz testing target. */
/*
* Copyright (c) 2019 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
388fa9fad5450ff748e6238918f428f253ed0a3a06c51bb2038a6e8a8ac4f58e | C | 3,821 | 145 | /*
** LISA single subject statistical inference using 1st level GLM (general linear modeling).
** The prewhitening approach is adapted from Worsley et al (2002), Neuroimage 15(1).
**
** G.Lohmann, MPI-KYB, 2018
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <stdio.h>
#include <stdl... |
fad94248235ea120f1e2e42c1912db74c407949bdbca80430f03747e13748560 | C | 3,830 | 170 | /*
** PLS partial least squares, Algorithm SIMPLS
** X is multivariate (p>0), Y is univariate (m=1)
**
** Ref:
** Sijmen de Jong, Chemometrics and Intelligent Lab Systems, 18 (1993), pp. 251-263
**
** G.Lohmann, Oct 2020
*/
#include "viaio/Vlib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stri... |
abf80530774272b084d4e0bfe4013294a4ee446bd8552b873247ab28a81e72b2 | C | 3,840 | 115 | /* test/test-vcf-sweep.c -- VCF test harness.
Copyright (C) 2013-2014 Genome Research Ltd.
Author: Petr Danecek <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software withou... |
6605016d5ddab9d0f98a787a32c6dacc1e924976c96c17e6c921397eb5b38c9e | C | 3,865 | 118 | /*
* $Id: Type.c 3177 2008-04-01 14:47:24Z karstenm $
*
* Routines in this file allow one to register types (e.g., "image") along
* with sets of routines for operating on objects of those types.
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, an... |
ef40a20ebdf512870f322a98c156f0d12ccbaca3c6ada9ab0c1a1a0658a31b2d | C | 3,911 | 171 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include <math.... |
ddc520b44e0cb2f80af43b6dca5a019534b368bcb4beb76163261c4f1c71b201 | C | 3,934 | 129 | /* test/test_mod.c -- testing of base modification functions
Copyright (C) 2020 Genome Research Ltd.
Author: James Bonfield <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Sof... |
b32a1c90eeca7241a1d4c7c63393b77fc7e83866b5a2c0c4d8b8912e3b79b3bc | C | 3,948 | 126 | /*
* MEX file implementation of ft_getopt: this function is called very frequently
* and therefore worthwile to speed up with a compiled version.
*
* Use as
* val = ft_getopt(s, key, default)
* where s is a structure or a cell-array.
*
* It will return the value of the option, or an empty array if the option... |
8e0ed20c10248a0ac186dfe086966e763035342d1d0ef7ad81e36e299c9e9d53 | C | 3,951 | 123 | /* Fuzz testing target. */
/*
* Copyright (c) 2019 Genome Research Ltd.
* Author(s): James Bonfield
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
c7a1cb9e35043cd03fc32ee46d374b5a9e904f4ac8a16e790d213067ac226ac3 | C | 3,964 | 152 | /* test/fuzz/hts_open_fuzzer.c -- Fuzz driver for hts_open.
Copyright (C) 2018 Google LLC.
Copyright (C) 2019-2020 Genome Research Ltd.
Author: Markus Kusano <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation fil... |
fc3254ed6f7bc69d1cf4959ce8ddf057c79b186c30b6366aa7ae33da0923b240 | C | 3,974 | 147 | /*
* Copyright (C) 1999-2022 Christophe Phillips
*/
/*
Input : XYZva, ind_tra, XYZvb, ind_trb, weight, defl
Output : Cij_cog
weight = (sig[0]-sig[1])/((sig[2]+sig[3])*2.*pi) ;
*/
#include <math.h>
#include "mex.h"
void sol_angle(double *dO, double *r1, double *r2, double *r3)
{
double det, d1, d2, d3, den ... |
6cda9c3dd75bb3e495439b5daca0cca0f32fcce9838510e7789856e3cc5762a8 | C | 3,983 | 185 | /*! \file
3D grey level morphology.
\par Reference:
P. Maragos, R.W. Schafer (1990):
"Morphological Systems for multidimensional signal processing",
Proc. of the IEEE, Vol. 78, No. 4, pp. 690--709.
\par Author:
Gabriele Lohmann, MPI-CBS
*/
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <stdio.h>... |
4d142d7d39ac0f11fa0c30849ecca2ab1fafb22063ec714b648a27522c843b6c | C | 4,004 | 165 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include <math.... |
4090e3f96019010108113f45d3835d88b843d1503c7981235e8a9cec8e6cf995 | C | 4,007 | 200 | /*! \file
2D bicubic spline interpolation for image zooming.
\par Reference:
Michael J. Aramini.
"Efficient image magnification by bicubic spline interpolation".
http://members.bellatlantic.net/~vze2vrva/
\par Author:
Gabriele Lohmann, MPI-CBS
*/
/* From the Vista library: */
#include <viaio/Vlib.h>
#include <vi... |
488786f5a707f6e82195b5e30d3034e48ff1e80823dd7063b5b7b157c5ade5bd | C | 4,037 | 109 | /****************************************************************
*
* vpreprocess: vpreprocess.c
*
* Copyright (C) Max Planck Institute
* for Human Cognitive and Brain Sciences, Leipzig
*
* Authors Gabriele Lohmann, Karsten Mueller <[email protected]>
*
* This program is free software; you can redistribute it ... |
2f0db383bf308f6f3e834eab9c3dc806c858bb2e2587a88dd99ece14c981e3a4 | C | 4,049 | 201 | /*
**
** Lit:
** Y.Yu, S.T. Acton:
** Speckle reducing anisotropic diffusion.
** IEEE Trans Image Proc., Vol. 11, No. 11, Nov 2002
**
** G.Lohmann, MPI-CBS, 2008
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <gsl/gsl_math.h>
#define ... |
96f5a20f0720cf2d82019bb84baefb0c2f67c38ead952af25a7f556828a17c52 | C | 4,058 | 184 | /**
*****************************************************************************
**
** File : syscalls.c
**
** Author : Auto-generated by STM32CubeIDE
**
** Abstract : STM32CubeIDE Minimal System calls file
**
** For more information about which c-functions
** need which of ... |
c70c247284a9293a0d4d3a143b666abd5f58ef12b232555b30b431ccc206eb15 | C | 4,061 | 161 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/file.h>
#include <viaio/mu.h>
extern void xprintmat(double **A,int n,int m);
extern void printmat(VImage);
extern double **MatrixAlloc(int n,int m... |
57d06dbdcd8b75fe629c602737e5e53ea66029cbe6b181fe033a33bf05bda976 | C | 4,064 | 173 | /*! \file
Geometric transformations using bilinear interpolation.
This file contains functions for bilinear resampling
and 2D rotations. The transformation equation is:
y = A(x-x0) + b
where x,x0,b,y are 1x2 vectors and A is a 2x2 matrix.
The vector x0 can be used to specify a position that
remains unchanged b... |
62402bee974c6177b14b2fcbd4f0b7ac424f6415988c68509987a8e3e183fdaa | C | 4,087 | 182 |
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_multifit.h>
#include <gsl/gsl_statistics.h>
/* From the standard C library: */
#include <stdio.h>
#include <std... |
91b8d903aeed1f06e4aebf45ec0743b86a25949208e5f355f0e1e4e9e6a2879e | C | 4,099 | 134 | /*
* $Id: Transpose.c 3177 2008-04-01 14:47:24Z karstenm $
*
* This file contains routines for transposing images
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted wi... |
160634d1bcdc808e42c6dc4f9b45a0c3764be7b3f266dfd5756474df60f47dfa | C | 4,124 | 155 | /*
Copyright (c) 2010 Genome Research Ltd.
Author: Andrew Whitwham <[email protected]>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of... |
fe8dd37600d251ab590443d3b5d745e5594c5770326845c6b23096aacf767408 | C | 4,124 | 150 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "poisson.h"
struct POISSON *create_poisson(int num, int *num_group, int *total_poisson, double firingrate)
{
struct POISSON *poisson;
int i,j;
int *total,*group;
total = total_poisson;
group = num_group;
poisson = (struct POISSON *)mallo... |
0521cd2a0377b5e377225609efc4ce26865fc586859e1b1c78deb79a0355061d | C | 4,142 | 178 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include "vote.... |
2123e494f5249463773520df910d63f54b83dfba03880a7b7dc23d5d4dbfdb98 | C | 4,166 | 199 | /*
* $Id: Error.c 3177 2008-04-01 14:47:24Z karstenm $
*
* This file contains routines for reporting errors.
*/
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without... |
49a7da262862411c6865fd1e66dca615e7ce951f42f5731d6de86215f21dda44 | C | 4,218 | 144 | #include <viaio/VImage.h>
#include <string.h>
#include <gsl/gsl_matrix.h>
#include <viaio/Vlib.h>
#include "gsl_utils.h"
void prewhite(gsl_matrix_float** pinvX,gsl_matrix_float** invM,gsl_matrix_float* X,int numlags)
{
int n = X->size2;
/* preparation for whitening */
/* X^T */
gsl_matrix_float* trans... |
65cbfbccb420d635382c2078310acb9b5bf156c856a886a28c5009413132cfad | C | 4,219 | 121 | /*
* This is a MATLAB MEX interface for Bob Cox's extensive nifti_stats.c
* functionality. See nifti_stats.m for documentation.
* Copyright (C) 2005-2022 Wellcome Centre for Human Neuroimaging
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "mex.h"
#include "nifti1.h"
extern int nifti_i... |
1d03c1cd9ab46ca2dac04c52a61dc5950a690a82a7aa011d2bc31a6b67d7dc13 | C | 4,222 | 169 | /*
** Input: a segmentation image containing at least three classes:
** grey matter, white matter, CSF
**
** Output:
** metric image from two distamce transforms
**
** G.Lohmann, MPI-KYB, May 2024
*/
/* From the Vista library: */
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#incl... |
b77788beda3b346b6798f816ec54d1b6e9897a1004d10d4371b07ee56df83c49 | C | 4,222 | 168 | /*
** detrending, fit polynomial or order 1 (linear), 3 or 5
** G.Lohmann, Aug 2016, MPI-KYB
*/
#include <viaio/VImage.h>
#include <viaio/Vlib.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_m... |
394783c4281131d80d296f394ede20245ee03f6904b380e5eb826932f8efab0a | C | 4,295 | 189 | /******************************************************************************
This file is part of the FAST protein structure alignment package,
developed by Jianhua Zhu at the Bioinformatics Program of Boston University.
******************************************************************************/
#include "basic... |
649dd3a068cae009cdc223a7722ce9852bfa31d4c48563fb8ee9e3d0a3584d61 | C | 4,303 | 161 | /*! \file
Geometric transformations using nearest neighbour interpolation.
This file contains functions for resampling
and 3D rotations. The transformation equation is:
y = A(x-x0) + b
where x,x0,b,y are 1x3 vectors and A is a 3x3 matrix.
The vector x0 can be used to specify a position that
remains unchanged b... |
2cd4dd22e20d71a69635c55cb7c693551e9b14a349af8bd333d6f6a754b193fd | C | 4,322 | 188 | /*
** LISA, 2nd level using design matrix
**
** G.Lohmann, July 2018
*/
#include <viaio/Vlib.h>
#include <viaio/VImage.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.