VTK
dox/Imaging/Morphological/vtkImageConnector.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageConnector.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef __vtkImageConnector_h
00029 #define __vtkImageConnector_h
00030 
00031 #include "vtkImagingMorphologicalModule.h" // For export macro
00032 #include "vtkObject.h"
00033 
00034 class vtkImageData;
00035 
00036 //
00037 // Special classes for manipulating data
00038 //
00039 //BTX - begin tcl exclude
00040 //
00041 // For the breadth first search
00042 class vtkImageConnectorSeed { //;prevent man page generation
00043 public:
00044   static vtkImageConnectorSeed *New() { return new vtkImageConnectorSeed;}
00045   void *Pointer;
00046   int  Index[3];
00047   vtkImageConnectorSeed *Next;
00048 };
00049 //ETX - end tcl exclude
00050 //
00051 
00052 
00053 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageConnector : public vtkObject
00054 {
00055 public:
00056   static vtkImageConnector *New();
00057 
00058   vtkTypeMacro(vtkImageConnector,vtkObject);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00061   //BTX
00062   vtkImageConnectorSeed *NewSeed(int index[3], void *ptr);
00063   void AddSeed(vtkImageConnectorSeed *seed);
00064   void AddSeedToEnd(vtkImageConnectorSeed *seed);
00065   //ETX
00066   void RemoveAllSeeds();
00067 
00069 
00070   vtkSetMacro(ConnectedValue, unsigned char);
00071   vtkGetMacro(ConnectedValue, unsigned char);
00072   vtkSetMacro(UnconnectedValue, unsigned char);
00073   vtkGetMacro(UnconnectedValue, unsigned char);
00075 
00076 
00080   void MarkData(vtkImageData *data, int dimensionality, int ext[6]);
00081 
00082 
00083 protected:
00084   vtkImageConnector();
00085   ~vtkImageConnector();
00086 
00087   unsigned char ConnectedValue;
00088   unsigned char UnconnectedValue;
00089 
00090   vtkImageConnectorSeed *PopSeed();
00091 
00092   vtkImageConnectorSeed *Seeds;
00093   vtkImageConnectorSeed *LastSeed;
00094 private:
00095   vtkImageConnector(const vtkImageConnector&);  // Not implemented.
00096   void operator=(const vtkImageConnector&);  // Not implemented.
00097 };
00098 
00099 
00100 
00101 #endif
00102 
00103