ITK  4.9.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 <typename 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  // Begin concept checking
85 // itkConceptMacro(SameDimensionOrMinusOne,
86 // (Concept::SameDimensionOrMinusOne<NDimensions, 3>));
87 // End concept checking
88 #endif
89 
93  itkGetMacro(PixelsPerElement, vnl_vector<unsigned int> );
94  itkSetMacro(PixelsPerElement, vnl_vector<unsigned int> );
95  void SetPixelsPerElement( unsigned int numPixels )
96  {
97  this->m_PixelsPerElement.fill( numPixels );
98  }
100 
102  itkGetMacro(NumberOfElements, vnl_vector<unsigned int> );
103 
105  itkGetMacro(Material, MaterialPointerType);
106  itkSetMacro(Material, MaterialPointerType);
108 
110  itkGetMacro(Element, ElementBasePointerType);
111  itkSetMacro(Element, ElementBasePointerType);
113 
115  using Superclass::SetInput;
116  void SetInput( InputImageType *image);
117 
118  void SetInput( unsigned int, InputImageType *image);
119 
121 
122  InputImageType * GetInput(unsigned int idx);
123 
129 
144 
145  FEMObjectType * GetOutput(unsigned int idx);
146 
147 protected:
150  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
151 
153  virtual void GenerateData() ITK_OVERRIDE;
154 
156 
158 
159 private:
160  ImageToRectilinearFEMObjectFilter(const Self &) ITK_DELETE_FUNCTION;
161  void operator=(const Self &) ITK_DELETE_FUNCTION;
162 
163  vnl_vector<unsigned int> m_NumberOfElements;
164  vnl_vector<unsigned int> m_PixelsPerElement;
167 };
168 
169 }
170 } // end namespace itk::fem
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkImageToRectilinearFEMObjectFilter.hxx"
174 #endif
175 
176 #endif // #ifndef itkImageToRectilinearFEMObjectFilter_h
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Light weight base class for most itk classes.
Implements N-dimensional Finite element (FE) models including elements, materials, and loads.
Definition: itkFEMObject.h:75
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Generate a rectilinar mesh from an image. The result is stored in a FEMObject.
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Linear elasticity material class.
Base class for storing all the implicit material and other properties required to fully define the el...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
void SetInput(InputImageType *image)
Abstract base element class.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.