| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkRegion.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:46 $ |
| 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 |
|
Portions of this code are covered under the VTK copyright. |
| 13 |
|
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. |
| 14 |
|
|
| 15 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 16 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 17 |
IND |
*****PURPOSE. See the above copyright notices for more information. |
| 18 |
|
|
| 19 |
|
=========================================================================*/ |
| 20 |
|
#ifndef __itkRegion_h |
| 21 |
|
#define __itkRegion_h |
| 22 |
|
|
| 23 |
|
#include "itkObject.h" |
| 24 |
|
|
| 25 |
|
namespace itk |
| 26 |
|
{ |
| 27 |
|
|
| 28 |
|
/** \class Region |
| 29 |
|
* \brief A region represents some portion or piece of data. |
| 30 |
|
* |
| 31 |
|
* Region is an abstract class that represents some portion or |
| 32 |
|
* piece of a DataObject. A region is used by the pipeline when |
| 33 |
|
* processing just a portion of the data, either because 1) memory |
| 34 |
|
* limits dictate that the pipeline cannot fit the entire dataset |
| 35 |
|
* into memory; 2) the user has requested that only a piece of the |
| 36 |
|
* dataset is to be processed; or 3) parallel (multi-threaded) |
| 37 |
|
* processing of the data is required. |
| 38 |
|
* |
| 39 |
|
* There are two types of regions in itk: a structured region that |
| 40 |
|
* specifies a rectangular piece of an image (ImageRegion), and a |
| 41 |
|
* unstructured region that specifies piece i of N total pieces |
| 42 |
|
* (MeshRegion). Depending on the filter (its input and output |
| 43 |
|
* types, and its position in the pipeline), ImageRegion or MeshRegion |
| 44 |
|
* will be used to describe the region. |
| 45 |
|
* |
| 46 |
|
* Region is a light-weight object and not reference counted. This |
| 47 |
|
* means that is behaves differently than ITK classes that are |
| 48 |
|
* reference counted. For example, smart pointer access is not |
| 49 |
|
* provided, and the (subclasses') constructor, destructor, |
| 50 |
|
* copy constructor and operator= are all public. |
| 51 |
|
* |
| 52 |
|
* \sa ImageRegion |
| 53 |
|
* \sa MeshRegion |
| 54 |
|
* \ingroup DataRepresentation |
| 55 |
|
*/ |
| 56 |
|
class ITKCommon_EXPORT Region |
| 57 |
|
{ |
| 58 |
|
public: |
| 59 |
|
/** Standard class typedefs. */ |
| 60 |
|
typedef Region Self; |
| 61 |
|
|
| 62 |
|
/** Enums used to describe the extent types. */ |
| 63 |
|
enum RegionType {ITK_UNSTRUCTURED_REGION,ITK_STRUCTURED_REGION}; |
| 64 |
|
|
| 65 |
|
/** Standard part of all itk objects. */ |
| 66 |
|
itkTypeMacro(Region, None); |
| 67 |
|
|
| 68 |
|
/** Subclasses must return a region type describing whether the region |
| 69 |
|
* is structured or unstructured. */ |
| 70 |
|
virtual RegionType GetRegionType() const = 0; |
| 71 |
|
|
| 72 |
|
/** Print the region. */ |
| 73 |
|
virtual void Print(std::ostream& os, Indent indent=0) const; |
| 74 |
|
virtual ~Region() {} |
| 75 |
|
protected: |
| 76 |
|
/** Methods invoked by Print() to print information about the object |
| 77 |
|
* including superclasses. Typically not called by the user (use Print() |
| 78 |
|
* instead) but used in the hierarchical print process to combine the |
| 79 |
|
* output of several classes. */ |
| 80 |
|
virtual void PrintSelf(std::ostream& os, Indent indent) const; |
| 81 |
|
virtual void PrintHeader(std::ostream& os, Indent indent) const; |
| 82 |
|
virtual void PrintTrailer(std::ostream& os, Indent indent) const; |
| 83 |
|
|
| 84 |
|
private: |
| 85 |
|
|
| 86 |
|
}; |
| 87 |
|
|
| 88 |
|
} // end namespace itk |
| 89 |
|
|
| 90 |
|
#endif |
| 91 |
|
|
| 92 |
EOF |
|