Hi,

I’m trying to use the plugin Modulation Transfer Function from here:

https://imagej.nih.gov/ij/plugins/mtf.html

I don’t understand how it’s supposed to work…

When I activate it I get this window:

Now what I understand is that I need to select an area in my image, then click **Retrieve > Measure White > Measure Black > Create ROI > Measure MTF**.

So I do that:

But the problem is that the measured **White Level** and **Black Level** are the same (see window above). So in the formula for calculating MTF, a division by zero occurs (because we divide by White - Black). And I get Infinity for MTF:

Now I looked at the code of this plugin and I see that they calculate the black and white levels in the exact same way, and thus they are equal:

```
//Measure White
if (e.getSource() == buttonMeasureWhite) {
ImageStatistics stat = imp.getStatistics();
dWhiteLevel = stat.mean; //=> They just take the mean of the selected area
int iInt = (int)dWhiteLevel;
int iFrac = (int)((dWhiteLevel - iInt)*10);
labelWhiteLevel.setText(Integer.toString(iInt)+"."+Integer.toString(iFrac));
recalculate();
return;
}
//Measure Black
if (e.getSource() == buttonMeasureBlack) {
ImageStatistics stat = imp.getStatistics();
dBlackLevel = stat.mean; //=> They just take the mean of the selected area
int iInt = (int)dBlackLevel;
int iFrac = (int)((dBlackLevel - iInt)*10);
labelBlackLevel.setText(Integer.toString(iInt)+"."+Integer.toString(iFrac));
recalculate();
return;
}
```

So black and white will always be the same.

Does this mean that I have to select a white-only area at first, click **Measure White**, and then do the same for black?

This way I don’t get infinity MTF, which seems good, but it doesn’t sound right to me. The reason is that I can’t guarantee that the black and white areas I select individually contain the same amount of black and white pixels in the final created ROI. And I’m afraid this might result in wrong calculations.

Can anyone confirm this is the way this plugin should be used?

Thanks!