BMP Exporter BMP Inflator BMP Calculator
The BMP Inflator Calculator is very useful when you are using the BMP Inflator with images that you have created yourself. It allows you to calculate the correct scale factor for the BMP Inflator based on either then height range you'd like the terrain to have, for example a difference in height from top to bottom of 57 TG Units, or the distance between adjacent elevation levels, say 1.5 TG Units between elevations. Don't forget that a BMP file only allows for a maximum of 256 different height levels, from top to bottom.
The Interface
Mac version Windows version The BMP Calculator is easy to use. Here's a guide to it's settings :
- Units radio buttons
These two radio buttons let you choose between using Metres or TG Units for measurements, where appropriate.
- Quick Height Range settings
These settings let you calculate the height range used in the final calculations by specifying the minimum and maximum heights you want in the terrain. Basically this is a convenience to reduce the need for mental arithmetic or searching through the paper on your desk for a calculator. For example, you might have got the BMP file being inflated from a DEM, and you know that the lowest point in the terrain is -27.8m and the highest point is 342.5m. Enter those values in the appropriate fields, click the "Update Height Range" button and the height range setting in the final calculations will be setup with 370.3m with no effort on your part. The step size and scale factor will also be updated to match the new height range.
- Min height
This setting lets you enter the height of the lowest point in the terrain. The units used depend on the setting of the Units radio buttons. When you click the "Update Height Range" button, aside from the other things it does it will also make this value the new base height ( as used in the BMP Inflator ) of the terrain.
- Max height
This setting lets you enter the height of the highest point in the terrain. The units used depend on the setting of the Units radio buttons.
- Update Height Range button
Clicking this button updates the height range setting in the final calculations section according to the values in the preceding two sections. It also updates the step size and scae factor settings appropriately. The minimimum height you enter also becomes the base height used by the BMP Inflator.
If you make the minimum height greater or equal to the maximum height you will get an alert notifying you of this and nothing will be updated.
- Pixel Values settings
These settings give you some information about the pixel values in the image, and also allow you to convert them to a more normal range.
- Smallest value
This shows you the value of the pixels in the image with the smallest value. In many cases this will be 0, or black.
- Smallest value
This shows you the value of the pixels in the image with the greatest value.
- Normalise button
This button normalises the pixel values. In other words, it changes the pixel values so that the value of the pixels with the smallest value are 0. As an example, say you had an image where the smallest pixel value was 12 and the greatest pixel value was 236. When you press the normalise button, the pixel values will be changed so that smallest value is 0 and the greatest value is 224 ( 236 - 12 ).
You don't have to normalise the pixel values if the smallest value is greater than 0, but it can help in some situations. As an example, say the range of pixel values were 12 to 236, the step size between elevations ( see below for more on this ) was 1 TG unit, and the base height setting in the BMP Inflator was 0. In this situation, the lowest point of the terrain would be 12 and the highest point would be 236. Chances are that you would prefer it if the lowest point of the terrain was 0, to match the base height. If you press the Normalise button, the pixel values will be changed so that the lowest point of the resulting terrain will be at the base height ( in this case 0 ) and the highest point will be at 224 ( because 236 less the distance from the lowest pixel value to 0, in this case 12, is 224 ). Here's a diagram that illustrates this :
![]()
- Final Calculations settings
These settings are where the final calculations for the scale factor are done.
Please note : For the next two settings, you should press the Return or Enter keys after you have a changed a setting. This is the calculator part. For example, if you change the Height Range you should press Return or Enter and the Step Size and Scale Factor will be updated.
- Height range
This setting allows you to choose what you would like the height range of the resulting terrain to be. The height range is the difference between the highest and lowest point ( e.g. the highest elevation minus the lowest elevation ). The units used depend on the settings of the Units radio buttons.
- Step size
This setting allows you choose the difference in height between adjacent elevation levels. The units used depend on the settings of the Units radio buttons.
- Scale factor
This shows you the scale factor that is calculated based on the height range or step size and the pixel values. This updates when you press Return or Enter in either the Height Range or Step Size edit fields. This value is automatically copied to the "Scale factor" setting of the BMP Inflator when you press the OK button.
- Cancel button
This button closes the calculator window without changing the scale factor of the BMP Inflator.
- OK button
This button closes the calculator window, and sets the scale factor of the BMP Inflator to the result of the calculator.
Requirements
For Export Only needs the TGPGuiLib to run. This file provides cross platform interface functionality. To find out more about the TGPGuiLib and download the latest version, visit it's website.
BMP Exporter BMP Inflator BMP Calculator
© Jo Meder 2001, all rights reserved