File: ncFilter.cpp

package info (click to toggle)
netcdf-cxx 4.3.1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,456 kB
  • sloc: cpp: 8,506; sh: 4,548; ansic: 4,251; xml: 173; makefile: 145
file content (29 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <string>
#include <iostream>
#include <sstream>

#include "ncFilter.h"
#include "ncCheck.h"
#include "netcdf.h"

using namespace std;
using namespace netCDF;

// Constructor for filtering object
NcFilter::~NcFilter() {

};

/* Define a new variable filter for either compression or decompression. The below
method allows for setting of the filter which is to be used wen writing a variable. */
void NcFilter::setFilter(unsigned int ncid, unsigned int varid, unsigned int filterId, size_t nparams, const unsigned int* parms)
{
  ncCheck(nc_def_var_filter(ncid,varid,filterId,nparams,parms),__FILE__,__LINE__);
}

/* This second API method makes it possible to query a varible to obtain information about
any associated filter using this signature */
void NcFilter::getFilter(unsigned int ncid, unsigned int varid, unsigned int* idp, size_t* nparamsp, unsigned int* params)
{
  ncCheck(nc_inq_var_filter(ncid, varid, idp, nparamsp, params),__FILE__,__LINE__);
}