Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:7c8903c96b0054d3f515bd1c06609a86e2d22264

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
#ifndef __CoherentVolume_h
#define __CoherentVolume_h

#include "MyStandardIncludes.h"



class VolumeData;

class   CoherentVolume 
{
public:
	class BlockArray;

	//CoherentVolume();
	CoherentVolume(int x, int y, int z);
	virtual ~CoherentVolume();

	virtual void Initialize();

	void SetBlockSize(const int bs[3])
	{
		m_BlockSize[0]=bs[0];
		m_BlockSize[1]=bs[1];
		m_BlockSize[2]=bs[2];
	}
	void GetBlcokSize(int bs[3])
	{
		bs[0]=m_BlockSize[0];
		bs[1]=m_BlockSize[1];
		bs[2]=m_BlockSize[2];
	}

	void SetDimensions(const int dims[3])
	{
		m_Dimensions[0] = dims[0];
		m_Dimensions[1] = dims[1];
		m_Dimensions[2] = dims[2];
		m_BlockNum[0]= (m_Dimensions[0]-1)/m_BlockSize[0]+1;
		m_BlockNum[1]= (m_Dimensions[1]-1)/m_BlockSize[1]+1;
		m_BlockNum[2]= (m_Dimensions[2]-1)/m_BlockSize[2]+1;
	}

	void GetDimensions(int dims[3]) const 
	{
		dims[0] = m_Dimensions[0];
		dims[1] = m_Dimensions[1];
		dims[2] = m_Dimensions[2];
	}

	void SetSpacings(const float s[3])
	{
		m_Spacings[0] = s[0];
		m_Spacings[1] = s[1];
		m_Spacings[2] = s[2];
	}

	void GetSpacings(float s[3]) const 
	{
		s[0] = m_Spacings[0];
		s[1] = m_Spacings[1];
		s[2] = m_Spacings[2];
	}

	void GetBlockNum(int bn[3]) 
	{
		bn[0]=m_BlockNum[0];
		bn[1]=m_BlockNum[1];
		bn[2]=m_BlockNum[2];
	}

	//DataType GetDataType() const;
	//void SetDataType(DataType type); 

	void AllocateBlocks();

	void SetBlockSlice(void *sliceData,int sliceID,int dimz=-1);

	void SetData(float *data);

	//void SetData(VolumeData *vol);

	float GetValue(int x,int y,int z);

	void GetMinMaxValue(double &minValue,double &maxValue);

private:

	BlockArray *m_BlockArray;

	int m_BlockSize[3];
	int m_Dimensions[3];
	float m_Spacings[3];
	int m_BlockNum[3];
	//DataType m_DataType;

};

#endif

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API