19 #ifndef rtkVarianObiRawImageFilter_h 20 #define rtkVarianObiRawImageFilter_h 22 #include <itkUnaryFunctorImageFilter.h> 23 #include <itkConceptChecking.h> 24 #include <itkNumericTraits.h> 44 template <
class TInput,
class TOutput>
58 return !(*
this != other);
63 return (!A) ? 0. : TOutput(std::log((m_I0 - m_IDark) / (A - m_IDark)));
91 template <
class TInputImage,
class TOutputImage>
93 :
public itk::UnaryFunctorImageFilter<
96 Function::ObiAttenuation<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
103 using Superclass = itk::UnaryFunctorImageFilter<
116 itkGetMacro(I0,
double);
119 itkGetMacro(IDark,
double);
123 BeforeThreadedGenerateData()
override;
130 double m_I0{ 139000. };
131 double m_IDark{ 0. };
136 #ifndef ITK_MANUAL_INSTANTIATION 137 # include "rtkVarianObiRawImageFilter.hxx" itk::SmartPointer< Self > Pointer
Converts a raw value measured by the Varian OBI system to attenuation.
TOutput operator()(const TInput &A) const
bool operator==(const ObiAttenuation &other) const
#define itkSetMacro(name, type)
bool operator!=(const ObiAttenuation &) const
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, Function::ObiAttenuation< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
itk::SmartPointer< const Self > ConstPointer
Converts raw images measured by the Varian OBI system to attenuation.
void SetIDark(double idark)