Divides a cube object into multiple output cubes in the line direction.
This program takes an input cube and divides it into multiple output cubes in the line direction.
The total number of lines in these output cubes, as well as the number of lines these output cubes overlap, are be determined by user given parameters.
If the overlap parameter is greater than the total line number parameter, then a User Errror will be thrown.
If the final segment does not end on the same line that the input cube ends, then the final segment will be smaller than the other segments.
In other words, the final segment will simply be created to the end of the original cube, not being filled with null lines.
Note: The output cubes (which will here on be referred to as segments) will be created in the naming form of (InputCubeName).segment(#).cub
i.e. peaks.segment1.cub, peaks.segment2.cub, peaks.segment3.cub, peaks.segment4.cub, etc
This example shows how segment works on peaks.cub, a cube of Flagstaff's peaks. It also demonstrates the automatic resizing of the final segment.
segment FROM=peaks.cub NL=531 OVERLAP=88
Creates segments from peaks.cub which have a total of 531 lines each, and overlap by 88 lines.
The original image
This is the input image peaks.cub
The first segment.
This is the first segment created from peaks.cub
It has the same sample width and band depth as peaks.cub, and has a total number of lines equal to the NL parameter, which is 531 in this example.
The second segment.
This is the second segment created from peaks.cub
Like peaks.segment1.cub, it has 531 lines and the same sample width and band depth as peaks.cub.
The first 88 lines of this cube (peaks.segment2.cub) are identical to the last 88 lines of its previous cube (peaks.segment1.cub).
In the same manner, the last 88 lines of peaks.segment2.cub are identical to the first 88 lines of peaks.segment3.cub
The third segment.
This is the third segment created from peaks.cub
Notice how this segment is smaller than the other 2 segements. This is due to the fact that it reached the end of peaks.cub, nevertheless, it still has the same
sample width and band depth as peaks.cub
This shortening of the segment will only happen in the final segment created from the input cube.