vtkImageConnectivity.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkImageConnectivity.h,v $
00010   Date:      $Date: 2010-02-20 15:39:37 -0500 (Sat, 20 Feb 2010) $
00011   Version:   $Revision: 12195 $
00012 
00013 =========================================================================auto=*/
00019 
00020 #ifndef __vtkImageConnectivity_h
00021 #define __vtkImageConnectivity_h
00022 
00023 #include "vtkImageToImageFilter.h"
00024 #include "vtkSlicerBaseLogic.h"
00025 
00026 #define CONNECTIVITY_IDENTIFY 1
00027 #define CONNECTIVITY_REMOVE 2
00028 #define CONNECTIVITY_CHANGE 3
00029 #define CONNECTIVITY_MEASURE 4
00030 #define CONNECTIVITY_SAVE 5
00031 
00032 class VTK_SLICER_BASE_LOGIC_EXPORT vtkImageConnectivity : public vtkImageToImageFilter
00033 {
00034 public:
00035   static vtkImageConnectivity *New();
00036   vtkTypeRevisionMacro(vtkImageConnectivity,vtkImageToImageFilter);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040   void SetFunction(int func) {
00041     this->Function = func;};
00042   void SetFunctionToIdentifyIslands() {
00043     this->SetFunction(CONNECTIVITY_IDENTIFY);};
00044   void SetFunctionToRemoveIslands() {
00045     this->SetFunction(CONNECTIVITY_REMOVE);};
00046   void SetFunctionToChangeIsland() {
00047     this->SetFunction(CONNECTIVITY_CHANGE);};
00048   void SetFunctionToMeasureIsland() {
00049     this->SetFunction(CONNECTIVITY_MEASURE);};
00050   void SetFunctionToSaveIsland() {
00051     this->SetFunction(CONNECTIVITY_SAVE);};
00052   int GetFunction() {return this->Function;}
00053   const char* GetFunctionString();
00054 
00056   vtkGetMacro(IslandSize, int);
00057   vtkSetMacro(IslandSize, int);
00058   vtkGetMacro(LargestIslandSize, int);
00059   vtkSetMacro(LargestIslandSize, int);
00060 
00062   vtkGetMacro(SliceBySlice, int);
00063   vtkSetMacro(SliceBySlice, int);
00064   vtkBooleanMacro(SliceBySlice, int);
00065 
00066   vtkSetVector3Macro(Seed, int);
00067   vtkGetVector3Macro(Seed, int);
00068 
00069   vtkSetMacro(OutputLabel, int);
00070   vtkGetMacro(OutputLabel, int);
00071   vtkSetMacro(MinSize, int);
00072   vtkGetMacro(MinSize, int);
00073   vtkSetMacro(Background, short);
00074   vtkGetMacro(Background, short);
00075   vtkSetMacro(MinForeground, short);
00076   vtkGetMacro(MinForeground, short);
00077   vtkSetMacro(MaxForeground, short);
00078   vtkGetMacro(MaxForeground, short);
00079 
00080 protected:
00081   vtkImageConnectivity();
00082   ~vtkImageConnectivity(){};
00083 
00084   short Background;
00085   short MinForeground;
00086   short MaxForeground;
00087   int LargestIslandSize;
00088   int IslandSize;
00089   int MinSize;
00090   int OutputLabel;
00091   int Seed[3];
00092   int Function;
00093   int SliceBySlice;
00094 
00095   void ExecuteData(vtkDataObject *);
00096 
00097 private:
00098   vtkImageConnectivity(const vtkImageConnectivity&);
00099   void operator=(const vtkImageConnectivity&);
00100 };
00101 
00102 #endif
00103 
00104 
00105 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1