ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkOctree.h>
Public Types | |
typedef Image< TPixel, 3 > | ImageType |
typedef ImageType::Pointer | ImageTypePointer |
typedef SmartPointer< Self > | Pointer |
typedef Octree | Self |
typedef OctreeBase | Superclass |
Public Member Functions | |
virtual void | BuildFromBuffer (const void *buffer, const int xsize, const int ysize, const int zsize) |
void | BuildFromImage (Image< TPixel, 3 > *fromImage) |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetColorTable () const |
virtual int | GetColorTableSize () const |
virtual unsigned int | GetDepth () |
ImageTypePointer | GetImage () |
virtual const char * | GetNameOfClass () const |
virtual OctreeNode * | GetTree () |
unsigned int | GetValue (const unsigned int Dim0, const unsigned int Dim1, const unsigned int Dim2) |
virtual unsigned int | GetWidth () |
Octree (void) | |
void | SetColor (unsigned int color) |
virtual void | SetDepth (unsigned int depth) |
void | SetTree (OctreeNodeBranch *branch) |
void | SetTrueDims (const unsigned int Dim0, const unsigned int Dim1, const unsigned int Dim2) |
virtual void | SetWidth (unsigned int width) |
~Octree (void) | |
Static Public Member Functions | |
static Pointer | New () |
Private Member Functions | |
OctreeNodeBranch * | maskToOctree (const TPixel *Mask, unsigned width, unsigned x, unsigned y, unsigned z, unsigned xsize, unsigned ysize, unsigned zsize) |
Octree (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
char | m_ColorTable [ColorTableSize] |
unsigned int | m_Depth |
MappingFunctionType | m_MappingFunction |
enum OctreePlaneType | m_Plane |
OctreeNode | m_Tree |
unsigned int | m_TrueDims [3] |
unsigned int | m_Width |
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 120 of file itkOctree.h.
typedef Image< TPixel, 3 > itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::ImageType |
Definition at line 128 of file itkOctree.h.
typedef ImageType::Pointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::ImageTypePointer |
Definition at line 129 of file itkOctree.h.
typedef SmartPointer< Self > itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Pointer |
Reimplemented from itk::OctreeBase.
Definition at line 127 of file itkOctree.h.
typedef Octree itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Self |
Standard class typedefs.
Reimplemented from itk::OctreeBase.
Definition at line 125 of file itkOctree.h.
typedef OctreeBase itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Superclass |
Reimplemented from itk::Object.
Definition at line 126 of file itkOctree.h.
itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Octree | ( | void | ) |
itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::~Octree | ( | void | ) |
itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::Octree | ( | const Self & | ) | [private] |
virtual void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::BuildFromBuffer | ( | const void * | buffer, |
const int | xsize, | ||
const int | ysize, | ||
const int | zsize | ||
) | [virtual] |
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.
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::BuildFromImage | ( | Image< TPixel, 3 > * | fromImage | ) |
virtual::itk::LightObject::Pointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::CreateAnother | ( | void | ) | 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.
virtual const char* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetColorTable | ( | ) | const [virtual] |
Get the ColorTable Pointer
Returns color table pointer for this tree.
Each Octree has an array of char 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.
virtual int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetColorTableSize | ( | ) | const [virtual] |
Get the size of the Color Table
Implements itk::OctreeBase.
virtual unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetDepth | ( | ) | [virtual] |
Get tree depth.
Depth represents x, for the smallest 2^x >= largest image dimension
Implements itk::OctreeBase.
ImageTypePointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetImage | ( | ) |
virtual const char* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::Object.
virtual OctreeNode* itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetTree | ( | ) | [virtual] |
Get the actual tree base
Returns the tree, or 0 if the Octree isn't built yet
Implements itk::OctreeBase.
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetValue | ( | const unsigned int | Dim0, |
const unsigned int | Dim1, | ||
const unsigned int | Dim2 | ||
) |
virtual unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::GetWidth | ( | ) | [virtual] |
Get tree width.
Width == smallest 2^x >= largest image dimension i.e. 2^Depth == Width
Implements itk::OctreeBase.
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] |
static Pointer itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::operator= | ( | const Self & | ) | [private] |
Mutex lock to protect modification to the reference count
Reimplemented from itk::Object.
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetColor | ( | unsigned int | color | ) | [inline] |
Definition at line 145 of file itkOctree.h.
References itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Tree, and itk::OctreeNode::SetColor().
virtual void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetDepth | ( | unsigned int | depth | ) | [virtual] |
Set the depth, e.g. when reading tree from a file.
Implements itk::OctreeBase.
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTree | ( | OctreeNodeBranch * | branch | ) | [inline] |
Definition at line 146 of file itkOctree.h.
References itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Tree, and itk::OctreeNode::SetBranch().
void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTrueDims | ( | const unsigned int | Dim0, |
const unsigned int | Dim1, | ||
const unsigned int | Dim2 | ||
) |
virtual void itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetWidth | ( | unsigned int | width | ) | [virtual] |
Set width, e.g. when reading from a file.
Implements itk::OctreeBase.
char itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_ColorTable[ColorTableSize] [private] |
Definition at line 181 of file itkOctree.h.
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Depth [private] |
Definition at line 179 of file itkOctree.h.
MappingFunctionType itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_MappingFunction [private] |
Definition at line 184 of file itkOctree.h.
enum OctreePlaneType itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Plane [private] |
Definition at line 175 of file itkOctree.h.
OctreeNode itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Tree [private] |
Definition at line 182 of file itkOctree.h.
Referenced by itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetColor(), and itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTree().
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_TrueDims[3] [private] |
Definition at line 180 of file itkOctree.h.
unsigned int itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::m_Width [private] |
Definition at line 176 of file itkOctree.h.