ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkShiftScaleLabelMapFilter.h
Go to the documentation of this file.
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 __itkShiftScaleLabelMapFilter_h
00019 #define __itkShiftScaleLabelMapFilter_h
00020 
00021 #include "itkInPlaceLabelMapFilter.h"
00022 
00023 namespace itk
00024 {
00042 template< class TImage >
00043 class ITK_EXPORT ShiftScaleLabelMapFilter:
00044   public InPlaceLabelMapFilter< TImage >
00045 {
00046 public:
00048   typedef ShiftScaleLabelMapFilter        Self;
00049   typedef InPlaceLabelMapFilter< TImage > Superclass;
00050   typedef SmartPointer< Self >            Pointer;
00051   typedef SmartPointer< const Self >      ConstPointer;
00052 
00054   typedef TImage                                        ImageType;
00055   typedef typename ImageType::Pointer                   ImagePointer;
00056   typedef typename ImageType::ConstPointer              ImageConstPointer;
00057   typedef typename ImageType::PixelType                 PixelType;
00058   typedef typename ImageType::IndexType                 IndexType;
00059   typedef typename ImageType::LabelObjectType           LabelObjectType;
00060 
00062   itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(ShiftScaleLabelMapFilter, InPlaceLabelMapFilter);
00069 
00070 #ifdef ITK_USE_CONCEPT_CHECKING
00071 
00072 /*  itkConceptMacro(InputEqualityComparableCheck,
00073     (Concept::EqualityComparable<InputImagePixelType>));
00074   itkConceptMacro(IntConvertibleToInputCheck,
00075     (Concept::Convertible<int, InputImagePixelType>));
00076   itkConceptMacro(InputOStreamWritableCheck,
00077     (Concept::OStreamWritable<InputImagePixelType>));*/
00078 
00080 #endif
00081 
00082   itkSetMacro(Shift, double);
00083   itkGetConstReferenceMacro(Shift, double);
00084 
00085   itkSetMacro(Scale, double);
00086   itkGetConstReferenceMacro(Scale, double);
00087 
00088   itkSetMacro(ChangeBackgroundValue, bool);
00089   itkGetConstMacro(ChangeBackgroundValue, bool);
00090   itkBooleanMacro(ChangeBackgroundValue);
00091 protected:
00092   ShiftScaleLabelMapFilter();
00093   ~ShiftScaleLabelMapFilter() {}
00094 
00095   void GenerateData();
00096 
00097   void PrintSelf(std::ostream & os, Indent indent) const;
00098 
00099   double m_Shift;
00100   double m_Scale;
00101 
00102   bool m_ChangeBackgroundValue;
00103 private:
00104   ShiftScaleLabelMapFilter(const Self &); //purposely not implemented
00105   void operator=(const Self &);           //purposely not implemented
00106 };                                        // end of class
00107 } // end namespace itk
00108 
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "itkShiftScaleLabelMapFilter.hxx"
00111 #endif
00112 
00113 #endif
00114