ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFEMLoadTest.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 
00019 #ifndef __itkFEMLoadTest_h
00020 #define __itkFEMLoadTest_h
00021 
00022 #include "itkFEMLoadElementBase.h"
00023 
00024 namespace itk
00025 {
00026 namespace fem
00027 {
00037 template <class TClass>
00038 class LoadTest : public LoadElement
00039 {
00040 public:
00041 
00043   typedef LoadTest                 Self;
00044   typedef LoadElement              Superclass;
00045   typedef SmartPointer<Self>       Pointer;
00046   typedef SmartPointer<const Self> ConstPointer;
00047 
00049   itkSimpleNewMacro(Self);
00050 
00052   itkTypeMacro(LoadTest, LoadElement);
00053 
00056   virtual::itk::LightObject::Pointer CreateAnother(void) const
00057   {
00058     ::itk::LightObject::Pointer smartPtr;
00059     Pointer copyPtr = Self::New();
00060     for( unsigned int i = 0; i < this->m_Element.size(); i++ )
00061       {
00062       copyPtr->AddNextElement( this->m_Element[i] );
00063       }
00064     copyPtr->SetGlobalNumber( this->GetGlobalNumber() );
00066 
00067     smartPtr = static_cast<Pointer>(copyPtr);
00068 
00069     return smartPtr;
00070   }
00071 
00075   LoadTest()
00076   {
00077   }
00078 
00082   TClass data;
00083 private:
00084 
00085 };
00086 
00087 }
00088 }  // end namespace itk::fem
00089 
00090 #endif // #ifndef __itkFEMLoadTest_h
00091