00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageConnector.h,v $ 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 =========================================================================*/ 00041 #ifndef __vtkImageConnector_h 00042 #define __vtkImageConnector_h 00043 00044 #include "vtkObject.h" 00045 00046 class vtkImageData; 00047 00048 // 00049 // Special classes for manipulating data 00050 // 00051 //BTX - begin tcl exclude 00052 // 00053 // For the breadth first search 00054 class vtkImageConnectorSeed { //;prevent man page generation 00055 public: 00056 static vtkImageConnectorSeed *New() { return new vtkImageConnectorSeed;} 00057 void *Pointer; 00058 int Index[3]; 00059 vtkImageConnectorSeed *Next; 00060 }; 00061 //ETX - end tcl exclude 00062 // 00063 00064 00065 class VTK_IMAGING_EXPORT vtkImageConnector : public vtkObject 00066 { 00067 public: 00068 static vtkImageConnector *New(); 00069 00070 vtkTypeRevisionMacro(vtkImageConnector,vtkObject); 00071 void PrintSelf(ostream& os, vtkIndent indent); 00072 00073 //BTX 00074 vtkImageConnectorSeed *NewSeed(int index[3], void *ptr); 00075 void AddSeed(vtkImageConnectorSeed *seed); 00076 void AddSeedToEnd(vtkImageConnectorSeed *seed); 00077 //ETX 00078 void RemoveAllSeeds(); 00079 00081 00082 vtkSetMacro(ConnectedValue, unsigned char); 00083 vtkGetMacro(ConnectedValue, unsigned char); 00084 vtkSetMacro(UnconnectedValue, unsigned char); 00085 vtkGetMacro(UnconnectedValue, unsigned char); 00087 00088 00092 void MarkData(vtkImageData *data, int dimensionality, int ext[6]); 00093 00094 00095 protected: 00096 vtkImageConnector(); 00097 ~vtkImageConnector(); 00098 00099 unsigned char ConnectedValue; 00100 unsigned char UnconnectedValue; 00101 00102 vtkImageConnectorSeed *PopSeed(); 00103 00104 vtkImageConnectorSeed *Seeds; 00105 vtkImageConnectorSeed *LastSeed; 00106 private: 00107 vtkImageConnector(const vtkImageConnector&); // Not implemented. 00108 void operator=(const vtkImageConnector&); // Not implemented. 00109 }; 00110 00111 00112 00113 #endif 00114 00115