ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkImageToRectilinearFEMObjectFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __itkImageToRectilinearFEMObjectFilter_h
20 #define __itkImageToRectilinearFEMObjectFilter_h
21 
22 #include "vnl/vnl_vector.h"
23 #include "itkFEMObject.h"
24 #include "itkProcessObject.h"
25 
26 namespace itk
27 {
28 namespace fem
29 {
42 template <class TInputImage>
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
57 
58  itkStaticConstMacro(NDimensions, unsigned int, TInputImage::ImageDimension);
59 
61  typedef TInputImage InputImageType;
62  typedef typename InputImageType::Pointer ImagePointer;
63  typedef typename InputImageType::ConstPointer ImageConstPointer;
64  typedef typename InputImageType::RegionType ImageRegionType;
65  typedef typename InputImageType::SizeType ImageSizeType;
66  typedef typename InputImageType::PointType ImagePointType;
67  typedef typename InputImageType::IndexType ImageIndexType;
68 
74 
78  // typedef itk::fem::Element2DC0LinearQuadrilateral QuadElementBaseType;
79  // typedef itk::fem::Element3DC0LinearHexahedron HexElementBaseType;
82 
83 #ifdef ITK_USE_CONCEPT_CHECKING
84 
85 // itkConceptMacro(SameDimensionOrMinusOne,
86 // (Concept::SameDimensionOrMinusOne<NDimensions, 3>));
87 
89 #endif
90 
94  itkGetMacro(PixelsPerElement, vnl_vector<unsigned int> );
95  itkSetMacro(PixelsPerElement, vnl_vector<unsigned int> );
96  void SetPixelsPerElement( unsigned int numPixels )
97  {
98  this->m_PixelsPerElement.fill( numPixels );
99  }
101 
103  itkGetMacro(NumberOfElements, vnl_vector<unsigned int> );
104 
106  itkGetMacro(Material, MaterialPointerType);
107  itkSetMacro(Material, MaterialPointerType);
109 
111  itkGetMacro(Element, ElementBasePointerType);
112  itkSetMacro(Element, ElementBasePointerType);
114 
116  using Superclass::SetInput;
117  void SetInput( InputImageType *image);
118 
119  void SetInput( unsigned int, InputImageType *image);
120 
121  InputImageType * GetInput(void);
122 
123  InputImageType * GetInput(unsigned int idx);
124 
128  using Superclass::MakeOutput;
129  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
130 
144  FEMObjectType * GetOutput(void);
145 
146  FEMObjectType * GetOutput(unsigned int idx);
147 
148 protected:
151  void PrintSelf(std::ostream& os, Indent indent) const;
152 
154  void GenerateData();
155 
156  void Generate2DRectilinearMesh(void);
157 
158  void Generate3DRectilinearMesh(void);
159 
160 private:
161  ImageToRectilinearFEMObjectFilter(const Self &); // purposely not implemented
162  void operator=(const Self &); // purposely not implemented
163 
168 };
169 
170 }
171 } // end namespace itk::fem
172 
173 #ifndef ITK_MANUAL_INSTANTIATION
174 #include "itkImageToRectilinearFEMObjectFilter.hxx"
175 #endif
176 
177 #endif // #ifndef __itkImageToRectilinearFEMObjectFilter_h
178