| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkNodeList.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:42 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 13 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 |
|
PURPOSE. See the above copyright notices for more information. |
| 15 |
|
|
| 16 |
|
=========================================================================*/ |
| 17 |
|
#ifndef __itkNodeList_h |
| 18 |
|
#define __itkNodeList_h |
| 19 |
|
|
| 20 |
|
#include <list> |
| 21 |
|
|
| 22 |
|
namespace itk |
| 23 |
|
{ |
| 24 |
|
|
| 25 |
|
/** |
| 26 |
|
* \class NodeList |
| 27 |
|
* \brief Stores secondary lists of nodes with pointers to |
| 28 |
|
* the contained items. |
| 29 |
|
* |
| 30 |
|
* \ingroup ImageObjects |
| 31 |
|
**/ |
| 32 |
|
|
| 33 |
|
template <typename TItemType> |
| 34 |
|
class NodeList : public std::list< TItemType > |
| 35 |
|
{ |
| 36 |
|
public: |
| 37 |
|
|
| 38 |
|
/** Pointer to the item. */ |
| 39 |
IVP,IVR |
TItemType * ItemPointer; |
| 40 |
|
|
| 41 |
|
/** Store a pointer to the iteme in the list. */ |
| 42 |
|
void SetItemPointer(TItemType* itemPointer) {ItemPointer = itemPointer;} |
| 43 |
|
|
| 44 |
|
/** Get the number of items stored in the list. */ |
| 45 |
|
unsigned long int GetSize() |
| 46 |
|
{return this->size(); } |
| 47 |
|
|
| 48 |
|
NodeList(); |
| 49 |
|
~NodeList(); |
| 50 |
|
|
| 51 |
|
private: |
| 52 |
|
|
| 53 |
|
}; |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
} // end namespace itk |
| 57 |
|
|
| 58 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 59 |
|
#include "itkNodeList.txx" |
| 60 |
|
#endif |
| 61 |
|
|
| 62 |
|
#endif |
| 63 |
|
|