ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkMRASlabIdentifier_h 00019 #define __itkMRASlabIdentifier_h 00020 00021 #include "itkObject.h" 00022 #include "itkImage.h" 00023 #include <vector> 00024 00025 namespace itk 00026 { 00064 template< class TInputImage > 00065 class ITK_EXPORT MRASlabIdentifier:public Object 00066 { 00067 public: 00069 typedef MRASlabIdentifier Self; 00070 typedef Object Superclass; 00071 typedef SmartPointer< Self > Pointer; 00072 typedef SmartPointer< const Self > ConstPointer; 00073 00075 itkTypeMacro(MRASlabIdentifier, Object); 00076 00078 itkNewMacro(Self); 00079 00081 typedef TInputImage ImageType; 00082 00084 typedef typename TInputImage::Pointer ImagePointer; 00085 00087 typedef typename TInputImage::ConstPointer ImageConstPointer; 00088 00090 typedef typename TInputImage::PixelType ImagePixelType; 00091 typedef typename TInputImage::IndexType ImageIndexType; 00092 typedef typename TInputImage::SizeType ImageSizeType; 00093 typedef typename TInputImage::RegionType ImageRegionType; 00094 typedef std::vector< ImageRegionType > SlabRegionVectorType; 00095 00097 itkSetConstObjectMacro(Image, ImageType); 00098 itkGetConstObjectMacro(Image, ImageType); 00100 00102 itkSetMacro(NumberOfSamples, unsigned int); 00103 itkGetConstReferenceMacro(NumberOfSamples, unsigned int); 00105 00107 itkSetMacro(BackgroundMinimumThreshold, ImagePixelType); 00108 itkGetConstReferenceMacro(BackgroundMinimumThreshold, ImagePixelType); 00110 00112 itkSetMacro(Tolerance, double); 00113 itkGetConstReferenceMacro(Tolerance, double); 00115 00118 itkSetMacro(SlicingDirection, int); 00119 itkGetConstReferenceMacro(SlicingDirection, int); 00121 00124 void GenerateSlabRegions(void); 00125 00127 SlabRegionVectorType GetSlabRegionVector(void); 00128 00129 protected: 00130 MRASlabIdentifier(); 00131 virtual ~MRASlabIdentifier() {} 00132 void PrintSelf(std::ostream & os, Indent indent) const; 00133 00134 private: 00135 MRASlabIdentifier(const Self &); //purposely not implemented 00136 void operator=(const Self &); //purposely not implemented 00137 00139 ImageConstPointer m_Image; 00140 00143 unsigned int m_NumberOfSamples; 00144 00145 int m_SlicingDirection; 00146 ImagePixelType m_BackgroundMinimumThreshold; 00147 double m_Tolerance; 00148 SlabRegionVectorType m_Slabs; 00149 }; 00150 } // end namespace itk 00151 00152 #ifndef ITK_MANUAL_INSTANTIATION 00153 #include "itkMRASlabIdentifier.hxx" 00154 #endif 00155 00156 #endif /* __itkMRASlabIdentifier_h */ 00157