====== Enhancement – Pack ====== Pack adjusts the contrast of the input image and converts it to another data type, most often 8-bit integers, so that the image can be displayed or written out for display. {{ :basic_level:enhancement:hoku_basic_pack.png?nolink&400 |Pack in a job, with its argument dialog (Hoku 3.1 option names)}} ===== Stretch methods ===== ^ Method ^ What it does ^ | pack (default) | Uses the statistics of the image. Stretches linearly from 3 standard deviations (sigmas) below the mean to 3 above; values outside that range are clipped. Enter a "sigma" value to use a different number of sigmas | | linear | Stretches linearly between the minimum and maximum values of the image, or between the "min-max" values you enter | | equalize | Uses the histogram of the image, enhancing the most frequently occurring values the most (Hoku 3.2) | | none | Only converts to the output number of bits, with no contrast change | For pack, linear and equalize you can also: * enter a "window", so that Pack computes the statistics, extremes or histogram only from the data inside it * choose "scale bands" to adjust each band separately or all bands together In Hoku 3.1 and earlier, **pack** was called **statistics** and **linear** was called **extremes**, as in the picture above. Old saved jobs that use the old names still work the same way, but if you edit one, you will see the new names. ===== Output type ===== * **integer**: 8-bit (the default) or 16-bit * **floating**: 32-bit or 64-bit * **colormap** (Hoku 3.2): turns a single-band image into an 8-bit, 3-band color image, using the **Jet** or **Parula** color table ===== Pack, Show and WriteImage ===== By default, Show converts any non-8-bit input to 8-bit internally so that it can display it. The original data stays in memory and is passed on to any modules after Show. To write out an image that others will view, convert it to 8-bit integers with Pack before [[basic_level:writeimage|WriteImage]]. WriteImage can write non-8-bit images, but other viewers may not be able to display them.