SoVolumeReader(3)

πŸ“¦ version 2.1.0, in fedora 43, fedora 44

✨ SoVolumeReader(3) ✨

Library Functions Manual Β· SoVolumeReader πŸ’–

okay bestie, welcome to the abstract superclass of the whole volume-reader family. this is the blueprint all the volume data reader classes inherit from, and yes she's giving main character energy even though she's abstract πŸŽ€


🌸 NAME 🌸

SoVolumeReader β€” abstract superclass for all volume data reader classes. no cap, that's literally her whole thing πŸ’…


✨ SYNOPSIS ✨

#include <VolumeViz/readers/SoVolumeReader.h>

Inherited by SoVRVolFileReader. πŸ¦‹

🫢 Public Types

  • enum CopyPolicy β€” { COPY, NO_COPY, NO_COPY_AND_DELETE }

πŸ’– Public Member Functions

  • virtual void setUserData (void *data)
  • virtual int getNumSignificantBits (void)
  • virtual void getDataChar (SbBox3f &size, SoVolumeData::DataType &type, SbVec3s &dim)=0
  • virtual void getSubSlice (SbBox2s &slice, int slicenumber, void *voxels)=0
  • virtual SbBool getSubVolume (SbBox3s &volume, void *voxels)
  • virtual SbBool getSubVolume (const SbBox3s &volume, const SbVec3s subsamplelevel, void *&voxels)
  • virtual SbBool getSubVolumeInfo (SbBox3s &volume, SbVec3s reqsubsamplelevel, SbVec3s &subsamplelevel, SoVolumeReader::CopyPolicy &policy)
  • SbVec3s getNumVoxels (SbVec3s realsize, SbVec3s subsamplinglevel) const
  • SbVec3s getSizeToAllocate (SbVec3s realsize, SbVec3s subsamplinglevel) const
  • int setFilename (const char *filename)

🧚 Protected Member Functions

  • void * getBuffer (int64_t offset, unsigned int size)
  • int bytesToInt (unsigned char *ptr, int sizeBytes)
  • void swapBytes (int *intPtr, int sizeBytes)
  • int64_t fileSize (void)

πŸ’œ Protected Attributes

  • void * m_data

⭐ Friends

  • class SoVolumeReaderP
  • class SoVolumeData

πŸ‘‘ Detailed Description πŸ‘‘

Abstract superclass for all volume data reader classes.

that's it. that's the vibe. she's the parent, she sets the rules, and the actual readers do the work πŸ™ˆ


πŸ’… Member Function Documentation πŸ’…

void SoVolumeReader::setUserData (void * data) [virtual]

Reimplemented in SoVRVolFileReader. 🫢

virtual void SoVolumeReader::getDataChar (SbBox3f & size, SoVolumeData::DataType & type, SbVec3s & dim) [pure virtual]

Returns information about the volume data contained in a volume reader. Sub-classes, i.e. the non-abstract readers, needs to implement this function. so like β€” if you're abstract, no shade, but somebody's gotta fill this in ✨

  • size is set to the "world size" of the volume, in unit coordinates.
  • type is set to either SoVolumeData::UNSIGNED_BYTE or SoVolumeData::UNSIGNED_SHORT, to signify that the voxel values are either 8-bit or 16-bit, respectively.
  • dim gives the volume dimensions in voxel coordinates, i.e. the number of rows, columns and stacks of voxels along the internal 3 coordinate axes of the volume.

Implemented in SoVRVolFileReader. 🌈

virtual void SoVolumeReader::getSubSlice (SbBox2s & subslice, int slicenumber, void * data) [pure virtual]

Extract a subslice from the volume (which may still reside solely on disk). Sub-classes, i.e. the non-abstract readers, needs to implement this function. yep, still virtual, still on you bestie πŸ’€

Implemented in SoVRVolFileReader. 🌸


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for SIMVoleon from the source code.


okay so real talk β€” she's abstract, so don't try to instantiate her directly, you'd just be sad 😭 the whole point is that the non-abstract subclasses implement getDataChar and getSubSlice for you. periodt.

this iconic little page is brought to you by SIMVoleon, Version 2.1.0 πŸ’– mwah, slay, go read some volumes πŸ¦‹βœ¨

πŸ“¦ where this page comes from