Commit bff68258 authored by kulvait's avatar kulvait

DenFileInfo provides getFileName()

parent cfbc4f6b
......@@ -18,6 +18,7 @@ namespace io {
{
public:
DenFileInfo(std::string fileName);
std::string getFileName() const;
uint32_t dimx() const;
uint32_t dimy() const;
uint32_t dimz() const;
......@@ -291,7 +292,7 @@ namespace io {
uint64_t dim_z = dimz();
uint64_t totalSize = dim_x * dim_y * dim_z;
uint64_t currentPosition;
uint32_t elementSize = elementByteSize();
uint32_t elementSize = elementByteSize();
double sum = 0.0;
double val;
uint8_t* buffer = new uint8_t[dim_x * dim_y * elementByteSize()];
......@@ -313,7 +314,7 @@ namespace io {
double DenFileInfo::getVariance() const
{
DenSupportedType dataType = getDataType();
uint32_t elementSize = elementByteSize();
uint32_t elementSize = elementByteSize();
uint64_t dim_x = dimx();
uint64_t dim_y = dimy();
uint64_t dim_z = dimz();
......
......@@ -20,6 +20,8 @@ namespace io {
}
}
std::string DenFileInfo::getFileName() const { return this->fileName; }
uint64_t DenFileInfo::getOffset() const { return offset; }
bool DenFileInfo::isExtended() const { return extended; }
bool DenFileInfo::isValid() const
......@@ -31,7 +33,7 @@ namespace io {
dataSize = this->getSize() - offset;
} else
{
return false;
return false;
}
uint64_t numPixels = this->getNumPixels();
if(dataSize == 0 && numPixels == 0)
......@@ -40,16 +42,16 @@ namespace io {
}
if(dataSize < numPixels || dataSize % numPixels != 0)
{
return false;
return false;
}
uint64_t elmSize = dataSize / numPixels;
if(elmSize == 2 || elmSize == 4 || elmSize == 8)
{
return true;
} else
{
return false;
}
uint64_t elmSize = dataSize / numPixels;
if(elmSize == 2 || elmSize == 4 || elmSize == 8)
{
return true;
}else
{
return false;
}
}
/**X dimension*/
uint32_t DenFileInfo::dimx() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment