18 #include <itkImageRegionIterator.h>
24 template<
class OutputImageType >
31 template<
class OutputImageType >
36 template<
class OutputImageType >
40 outImage->SetSpacing( m_Spacing );
41 outImage->SetOrigin( m_Origin );
42 outImage->SetDirection( m_DirectionMatrix );
43 outImage->SetLargestPossibleRegion( m_ImageRegion );
44 outImage->SetBufferedRegion( m_ImageRegion );
45 outImage->SetRequestedRegion( m_ImageRegion );
47 outImage->FillBuffer(0);
48 this->SetNthOutput(0, outImage);
51 template<
class OutputImageType >
55 ImageRegionIterator< OutputImageType > oit(outImage, outputRegionForThread);
57 while( !oit.IsAtEnd() )
61 for (
int i=0; i<3; i++)
62 value += idx[i]*m_Gradient[i] + m_Offset[i];
64 for (
unsigned int i=0; i<m_WorldPositions.size(); i++)
67 itk::Point<double, 3> vertex;
68 outImage->TransformIndexToPhysicalPoint(idx, vertex);
69 double dist = c.EuclideanDistanceTo(vertex);
70 value += m_Heights.at(i)*exp(-dist*dist/(2*m_Variances.at(i)));
76 MITK_INFO <<
"Thread " << threadId <<
"finished processing";
itk::SmartPointer< Self > Pointer
OutputImageType::IndexType IndexType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void BeforeThreadedGenerateData()
virtual ~FieldmapGeneratorFilter()
FieldmapGeneratorFilter()
itk::ImageRegion< 3 > OutputImageRegionType
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.