MCPcopy Create free account
hub / github.com/ImageEngine/cortex / ImageDiffOp

Method ImageDiffOp

src/IECoreImage/ImageDiffOp.cpp:65–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63IE_CORE_DEFINERUNTIMETYPED( ImageDiffOp );
64
65ImageDiffOp::ImageDiffOp()
66 : Op(
67 "Evaluates the root-mean-squared error between two images and returns true if it "
68 "exceeds a specified threshold. Unless the \"skip missing channels\" parameter is "
69 "enabled, it will also return true if either image contains a channel which "
70 "the other doesn't.",
71 new BoolParameter(
72 "result",
73 "True if the image differ, false if they're considered the same",
74 true
75 )
76 )
77{
78
79 m_imageAParameter = new ImagePrimitiveParameter(
80 "imageA",
81 "First image for comparison",
82 new ImagePrimitive()
83 );
84
85 m_imageBParameter = new ImagePrimitiveParameter(
86 "imageB",
87 "Second image for comparison",
88 new ImagePrimitive()
89 );
90
91 m_maxErrorParameter = new FloatParameter(
92 "maxError",
93 "Maximum permissible RMS error between the two images",
94 0.01f
95 );
96
97 m_skipMissingChannelsParameter = new BoolParameter(
98 "skipMissingChannels",
99 "If true then channels present in one image but missing in the other are ignored. If false, then missing channels mean the images are different.",
100 false
101 );
102
103 m_alignDisplayWindowsParameter = new BoolParameter(
104 "alignDisplayWindows",
105 "If true then display windows that are offset from the origin are moved to the origin before being compared.",
106 false
107 );
108
109 parameters()->addParameter( m_imageAParameter );
110 parameters()->addParameter( m_imageBParameter );
111 parameters()->addParameter( m_maxErrorParameter );
112 parameters()->addParameter( m_skipMissingChannelsParameter );
113 parameters()->addParameter( m_alignDisplayWindowsParameter );
114}
115
116ImageDiffOp::~ImageDiffOp()
117{

Callers 10

__verifyImageRGBMethod · 0.80
testSimpleMethod · 0.80
testMissingChannelsMethod · 0.80
__verifyImageRGBMethod · 0.80
testMethod · 0.80
testMethod · 0.80
testFromImageMethod · 0.80
testFromCompoundDataMethod · 0.80

Calls 1

addParameterMethod · 0.45

Tested by 8

__verifyImageRGBMethod · 0.64
testSimpleMethod · 0.64
testMissingChannelsMethod · 0.64
__verifyImageRGBMethod · 0.64
testMethod · 0.64
testMethod · 0.64