Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Core::NrrdData Class Reference
Inheritance diagram for Core::NrrdData:

Public Types

typedef boost::recursive_mutex mutex_type
 
typedef boost::unique_lock< mutex_type > lock_type
 

Public Member Functions

 NrrdData (Nrrd *nrrd, bool own_data=true)
 
 NrrdData (DataBlockHandle data_block)
 
 NrrdData (DataBlockHandle data_block, GridTransform transform)
 
Nrrd * nrrd () const
 Return the nrrd structure.
 
void * get_data () const
 Get the pointer to the data block within the nrrd.
 
bool own_data () const
 Return whether the nrrd owns the data.
 
GridTransform get_grid_transform () const
 Extract the transform from the nrrd.
 
Transform get_transform () const
 Extract the cell-centered transform from the nrrd.
 
void set_transform (GridTransform &transform)
 Set the transfrom in the nrrd data.
 
Histogram get_histogram (bool trust_meta_data=false)
 
void set_histogram (const Histogram &histogram)
 Insert a histogram into a nrrd's meta data.
 
size_t get_nx () const
 Get the dimensions of the nrrd.
 
size_t get_ny () const
 
size_t get_nz () const
 
size_t get_size () const
 Get the total size of the nrrd in pixels.
 
DataType get_data_type () const
 Get the data type of the nrrd.
 
bool get_originally_node_centered () const
 

Static Public Member Functions

static bool LoadNrrd (const std::string &filename, NrrdDataHandle &nrrddata, std::string &error)
 Load a nrrd into the nrrd data structure.
 
static bool SaveNrrd (const std::string &filename, NrrdDataHandle nrrddata, std::string &error, bool compress, int level)
 
static mutex_type & GetMutex ()
 Get the mutex that protects the Teem library.
 

Constructor & Destructor Documentation

Core::NrrdData::NrrdData ( Nrrd *  nrrd,
bool  own_data = true 
)

Construct the NrrdData wrapper from a nrrd own_data tells whether the data should be destroyed when this object is deleted

Core::NrrdData::NrrdData ( DataBlockHandle  data_block)

Construct a NrrdData object from an existing DataBlock of data The datablock handle will be stored internally until the object is deleted and the memory with the data is shared between the object and the nrrd object.

Member Function Documentation

Histogram Core::NrrdData::get_histogram ( bool  trust_meta_data = false)

Get the histogram from the nrrd NOTE: If the data source can be trusted, the histogram is taken from the meta data, otherwise it is recomputed

bool Core::NrrdData::get_originally_node_centered ( ) const

Get whether the nrrd was originally node-centered Internally Seg3D converts the transform to be cell-centered, but we keep track of what the original centering was so that the transform can be converted back to be node-centered on export.

bool Core::NrrdData::SaveNrrd ( const std::string &  filename,
NrrdDataHandle  nrrddata,
std::string &  error,
bool  compress,
int  level 
)
static

Save a nrrd to file from nrrd data structure If compress is false, level will be overridden and set to 0, which corresponds to zlib setting for no compression


The documentation for this class was generated from the following files: