ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
itk::Octree< TPixel, ColorTableSize, MappingFunctionType > Class Template Reference

#include <itkOctree.h>

+ Inheritance diagram for itk::Octree< TPixel, ColorTableSize, MappingFunctionType >:
+ Collaboration diagram for itk::Octree< TPixel, ColorTableSize, MappingFunctionType >:

Public Types

using ImageType = Image< TPixel, 3 >
 
using ImageTypePointer = typename ImageType::Pointer
 
using Pointer = SmartPointer< Self >
 
using Self = Octree
 
using Superclass = OctreeBase
 
- Public Types inherited from itk::OctreeBase
using OctreeEnum = OctreeEnums::Octree
 
using Pointer = SmartPointer< Self >
 
using Self = OctreeBase
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

void BuildFromBuffer (const void *buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) override
 
void BuildFromImage (Image< TPixel, 3 > *fromImage)
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
const OctreeNodeBranchGetColorTable () const override
 
int GetColorTableSize () const override
 
unsigned int GetDepth () override
 
ImageTypePointer GetImage ()
 
virtual const char * GetNameOfClass () const
 
OctreeNodeGetTree () override
 
int GetValue (const unsigned int Dim0, const unsigned int Dim1, const unsigned int Dim2)
 
unsigned int GetWidth () override
 
 Octree ()
 
void SetColor (unsigned int color)
 
void SetDepth (unsigned int depth) override
 
void SetTree (OctreeNodeBranch *branch)
 
void SetTrueDims (const unsigned int Dim0, const unsigned int Dim1, const unsigned int Dim2)
 
void SetWidth (unsigned int width) override
 
 ~Octree () override
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Private Member Functions

OctreeNodeBranchmaskToOctree (const TPixel *Mask, unsigned width, unsigned x, unsigned y, unsigned z, unsigned xsize, unsigned ysize, unsigned zsize)
 

Private Attributes

OctreeNodeBranch m_ColorTable [ColorTableSize]
 
unsigned int m_Depth { 0 }
 
MappingFunctionType m_MappingFunction
 
OctreeEnum m_Plane { OctreeEnum::UNKNOWN_PLANE }
 
OctreeNode m_Tree
 
unsigned int m_TrueDims [3]
 
unsigned int m_Width { 0 }
 

Additional Inherited Members

- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TPixel, unsigned int ColorTableSize, typename MappingFunctionType>
class itk::Octree< TPixel, ColorTableSize, MappingFunctionType >

Represent a 3D Image with an Octree data structure.

Parameterized on Pixel type of the image, number of colors in color table, and a Mapping function, derived from itk::FunctionBase

Definition at line 127 of file itkOctree.h.

Member Typedef Documentation

◆ ImageType

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
using itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::ImageType = Image<TPixel, 3>

Definition at line 136 of file itkOctree.h.

◆ ImageTypePointer

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
using itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::ImageTypePointer = typename ImageType::Pointer

Definition at line 137 of file itkOctree.h.

◆ Pointer

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
using itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Pointer = SmartPointer<Self>

Definition at line 135 of file itkOctree.h.

◆ Self

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
using itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Self = Octree

Standard class type aliases.

Definition at line 133 of file itkOctree.h.

◆ Superclass

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
using itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Superclass = OctreeBase

Definition at line 134 of file itkOctree.h.

Constructor & Destructor Documentation

◆ Octree()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Octree ( )

◆ ~Octree()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::~Octree ( )
override

Member Function Documentation

◆ BuildFromBuffer()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::BuildFromBuffer ( const void *  buffer,
const unsigned int  xsize,
const unsigned int  ysize,
const unsigned int  zsize 
)
overridevirtual

Build an Octree from an Image's pixel buffer.

Method needed for ImageIO class, which has no handle on image, just the pixel buffer.

Implements itk::OctreeBase.

◆ BuildFromImage()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::BuildFromImage ( Image< TPixel, 3 > *  fromImage)

◆ CreateAnother()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
virtual::itk::LightObject::Pointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ GetColorTable()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
const OctreeNodeBranch* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetColorTable ( ) const
overridevirtual

Get the ColorTable Pointer

Returns color table pointer for this tree.

Each Octree has an array of OctreeNodeBranch whose size = the number of color table entries. Each Node in the Octree points either to 8 sub-nodes, or into the ColorTable; The color table isn't actually used to hold data; it simply provides a range of unique addresses that are distinct from the address of any valid subtree.

Implements itk::OctreeBase.

◆ GetColorTableSize()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetColorTableSize ( ) const
overridevirtual

Get the size of the Color Table

Implements itk::OctreeBase.

◆ GetDepth()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetDepth ( )
overridevirtual

Get tree depth.

Depth represents x, for the smallest 2^x >= largest image dimension

Implements itk::OctreeBase.

◆ GetImage()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
ImageTypePointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetImage ( )

◆ GetNameOfClass()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
virtual const char* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ GetTree()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
OctreeNode* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetTree ( )
overridevirtual

Get the actual tree base

Returns the tree, or 0 if the Octree isn't built yet

Implements itk::OctreeBase.

◆ GetValue()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetValue ( const unsigned int  Dim0,
const unsigned int  Dim1,
const unsigned int  Dim2 
)

◆ GetWidth()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetWidth ( )
overridevirtual

Get tree width.

Width == smallest 2^x >= largest image dimension i.e. 2^Depth == Width

Implements itk::OctreeBase.

◆ maskToOctree()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
OctreeNodeBranch* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::maskToOctree ( const TPixel *  Mask,
unsigned  width,
unsigned  x,
unsigned  y,
unsigned  z,
unsigned  xsize,
unsigned  ysize,
unsigned  zsize 
)
private

◆ New()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
static Pointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::New ( )
static

Method for creation through the object factory.

◆ SetColor()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetColor ( unsigned int  color)
inline

Definition at line 159 of file itkOctree.h.

◆ SetDepth()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetDepth ( unsigned int  depth)
overridevirtual

Set the depth, e.g. when reading tree from a file.

Implements itk::OctreeBase.

◆ SetTree()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTree ( OctreeNodeBranch branch)
inline

Definition at line 164 of file itkOctree.h.

◆ SetTrueDims()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTrueDims ( const unsigned int  Dim0,
const unsigned int  Dim1,
const unsigned int  Dim2 
)

◆ SetWidth()

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetWidth ( unsigned int  width)
overridevirtual

Set width, e.g. when reading from a file.

Implements itk::OctreeBase.

Member Data Documentation

◆ m_ColorTable

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
OctreeNodeBranch itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_ColorTable[ColorTableSize]
private

Definition at line 223 of file itkOctree.h.

◆ m_Depth

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Depth { 0 }
private

Definition at line 221 of file itkOctree.h.

◆ m_MappingFunction

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
MappingFunctionType itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_MappingFunction
private

Definition at line 225 of file itkOctree.h.

◆ m_Plane

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
OctreeEnum itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Plane { OctreeEnum::UNKNOWN_PLANE }
private

Definition at line 215 of file itkOctree.h.

◆ m_Tree

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
OctreeNode itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Tree
private

Definition at line 224 of file itkOctree.h.

◆ m_TrueDims

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_TrueDims[3]
private

Definition at line 222 of file itkOctree.h.

◆ m_Width

template<typename TPixel , unsigned int ColorTableSize, typename MappingFunctionType >
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Width { 0 }
private

Definition at line 219 of file itkOctree.h.


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