dox/Imaging/vtkImageColocalizationFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   BioImageXD
00004   Module:    $RCSfile: vtkImageColocalizationFilter.h,v $
00005 
00006  Copyright (C) 2005  BioImageXD Project
00007  See CREDITS.txt for details
00008 
00009  This program is free software; you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation; either version 2 of the License, or
00012  (at your option) any later version.
00013 
00014  This program is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with this program; if not, write to the Free Software
00021  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023 =========================================================================*/
00039 #ifndef __vtkImageColocalizationFilter_h
00040 #define __vtkImageColocalizationFilter_h
00041 
00042 #include "vtkThreadedImageAlgorithm.h"
00043 
00044 // VTK_IMAGING_EXPORT declares that this class is part of the Imaging kit. If the code was placed
00045 // in the Filtering- directory, it would say VTK_FILTERING_EXPORT
00046 class VTK_IMAGING_EXPORT vtkImageColocalizationFilter : public vtkThreadedImageAlgorithm
00047 {
00048 public:
00049   // These are required for the object factory scheme VTK uses to construct the objects.
00050   static vtkImageColocalizationFilter *New();
00051   vtkTypeRevisionMacro(vtkImageColocalizationFilter,vtkThreadedImageAlgorithm);
00052   // Method used to print out the details of the object
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00061   vtkSetMacro(OutputDepth,int);
00062   vtkGetMacro(OutputDepth,int);
00063   void SetOutputDepthTo24Bit() { this->OutputDepth = 24; this->Modified(); }
00064   void SetOutputDepthTo8Bit() { this->OutputDepth = 8; this->Modified(); }
00065   void SetOutputDepthTo1Bit() { this->OutputDepth = 1; this->Modified(); }
00067 
00069 
00072   void SetColocalizationLowerThreshold(int dataset, int threshold);
00073   int GetColocalizationLowerThreshold(int dataset) {
00074       if (dataset < this->NumberOfDatasets) return ColocalizationLowerThresholds[dataset];
00075       return 0;
00076   }
00077   // Description:
00078   // Voxels in the specified dataset that have a scalar value below
00079   // this threshold and above the lower threshold are considered to be colocalizing
00080   void SetColocalizationUpperThreshold(int dataset, int threshold);
00081   int GetColocalizationUpperThreshold(int dataset) {
00082       if (dataset < this->NumberOfDatasets) return ColocalizationUpperThresholds[dataset];
00083       return 0;
00084   }
00085   int* GetColocalizationLowerThresholds() { return this->ColocalizationLowerThresholds; }
00086   int* GetColocalizationUpperThresholds() { return this->ColocalizationUpperThresholds; }
00088 
00090 
00092   vtkGetMacro(OutputScalarValue,double);
00093   vtkSetMacro(OutputScalarValue,double);
00095 
00096 protected:
00097   vtkImageColocalizationFilter();
00098   ~vtkImageColocalizationFilter();
00099 
00100   // Method that is used to retrieve information about the resulting output dataset
00101   virtual int RequestInformation (vtkInformation *, vtkInformationVector **,
00102                                   vtkInformationVector *);
00103 
00104   // Method that can be called by multiple threads that is given the input data and an input extent
00105   // and is responsible for producing the matching output data.
00106   void ThreadedRequestData (vtkInformation* request,
00107                             vtkInformationVector** inputVector,
00108                             vtkInformationVector* outputVector,
00109                             vtkImageData ***inData, vtkImageData **outData,
00110                             int ext[6], int id);
00111 
00112   // Implement methods required by vtkAlgorithm.
00113   virtual int FillInputPortInformation(int, vtkInformation*);
00114 
00115   void InitOutput(int outExt[6], vtkImageData *outData);
00116 private:
00117   vtkImageColocalizationFilter(const vtkImageColocalizationFilter&);  // Not implemented.
00118   void operator=(const vtkImageColocalizationFilter&);  // Not implemented.
00119 
00120   int OutputDepth;
00121   int *ColocalizationLowerThresholds;
00122   int *ColocalizationUpperThresholds;
00123   int NumberOfDatasets;
00124   double OutputScalarValue;
00125 
00126 };
00127 
00128 #endif
00129 
00130 
00131 
00132 

Generated on Sat Dec 30 06:06:56 2006 for VTK by  doxygen 1.5.1