SPATMOD::IMAGE::SPANS Class Reference

Container for defining spans. More...

#include <spatmod/imagespans.h>

List of all members.

Public Member Functions

 SPANS ()
ERRVALUE AdjustForRange (double Start, double Size)
void ApplyScale (double zoom)
double ComputeEnd (INT32 span) const
double ComputeSize (INT32 span) const
INT32 ComputeSpanPos (double value, bool &IsOnBoundary) const
double ComputeStart (INT32 span) const
MISTRING GetLogString () const
UINT32 GetNumSpans () const
double GetSpanSizeFirst () const
double GetSpanSizeInterior () const
double GetSpanSizeLast () const
double GetSpanSizeMaximum () const
double GetSpanSizeMinimum () const
double GetTotalSize () const
bool IsAligned (const SPANS &testspans, double testoffset) const
bool IsEqual (const SPANS &rhs) const
ERRVALUE SetSpanSizes (double SpanSize, double SpanSizeFirst=0, double SpanSizeLast=0)
ERRVALUE SetTotalSize (double TotalSize)

Detailed Description

Container for defining spans.


Constructor & Destructor Documentation

SPATMOD::IMAGE::SPANS::SPANS (  ) 

Constructor.


Member Function Documentation

ERRVALUE SPATMOD::IMAGE::SPANS::AdjustForRange ( double  Start,
double  Size 
)

Adjust span sizes for specified range.

This may result in number of spans and all sizes changing.

Parameters:
Start New range start relative to existing spans, must be >= 0
Size New size, must be > 0 and <= Start + previous Size
void SPATMOD::IMAGE::SPANS::ApplyScale ( double  zoom  ) 

Apply scale factor to all size values.

Does not change number of spans.

Parameters:
zoom Zoom factor to apply
double SPATMOD::IMAGE::SPANS::ComputeEnd ( INT32  span  )  const

Compute ending value for span.

Returns:
Ending value or error < 0
double SPATMOD::IMAGE::SPANS::ComputeSize ( INT32  span  )  const

Compute size of span.

Returns:
Span size or error < 0.
INT32 SPATMOD::IMAGE::SPANS::ComputeSpanPos ( double  value,
bool &  IsOnBoundary 
) const

Compute span position.

If value is on span boundary, the span number returned will be the span starting at that value.

Returns:
Span number, -1 if left of first span, "num spans" if right of last span
Parameters:
IsOnBoundary Value to compute for Return true if position on boundary, false if not
double SPATMOD::IMAGE::SPANS::ComputeStart ( INT32  span  )  const

Compute starting value for span.

Returns:
Starting value or error < 0
MISTRING SPATMOD::IMAGE::SPANS::GetLogString (  )  const

Get string for use in log.

UINT32 SPATMOD::IMAGE::SPANS::GetNumSpans (  )  const [inline]

Get number of spans.

double SPATMOD::IMAGE::SPANS::GetSpanSizeFirst (  )  const [inline]

Get size of first span.

Note that first and last spans may have different sizes than each other or interior spans.

double SPATMOD::IMAGE::SPANS::GetSpanSizeInterior (  )  const [inline]

Get size of interior span.

If GetNumSpans is less than 3 then will return 0.

double SPATMOD::IMAGE::SPANS::GetSpanSizeLast (  )  const [inline]

Get size of last span.

Note that first and last spans may have different sizes than each other or interior spans. If GetNumSpans is less than 2 then the "last" span will have same size as "first" span.

double SPATMOD::IMAGE::SPANS::GetSpanSizeMaximum (  )  const

Get maximum span size.

double SPATMOD::IMAGE::SPANS::GetSpanSizeMinimum (  )  const

Get minimum span size.

double SPATMOD::IMAGE::SPANS::GetTotalSize (  )  const [inline]

Get total size of all spans.

bool SPATMOD::IMAGE::SPANS::IsAligned ( const SPANS testspans,
double  testoffset 
) const

Determine if another set of spans with offset and limited size is aligned with this one.

Partial spans are considered "aligned".

Returns:
true if aligned, false if not.
bool SPATMOD::IMAGE::SPANS::IsEqual ( const SPANS rhs  )  const

Test if two sets of SPANS are equal.

ERRVALUE SPATMOD::IMAGE::SPANS::SetSpanSizes ( double  SpanSize,
double  SpanSizeFirst = 0,
double  SpanSizeLast = 0 
)

Set span sizes.

ERRVALUE SPATMOD::IMAGE::SPANS::SetTotalSize ( double  TotalSize  ) 

Set total size.

Will reset span dimensions to match total size (result in single span).


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:40:11 2012 for TNTsdk 2012 by  doxygen 1.6.1