IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#144 closed defect (fixed)

psKernel - sample code in doc. is wrong

Reported by: robert.desonia@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: trivial Keywords:
Cc:

Description

In section 4.9.1.1 (SDRS v6), there is the following sample code:

kernelRows = psAlloc(myImage->nRows * sizeof(float));

but what you need is sizeof(float*) instead. Actually, I think the text
itself specifies the requirement without the code segment, so it could be
removed from the document altogether. The actual implementation will look
something like this anyway:

result->p_kernelRows = psAlloc(sizeof(psF32*)*numRows);


psF32 kernelRows = result->p_kernelRows;
psF32
imageRows = result->p_data->data.F32;
for (int i = 0; i < numRows; i++) {

kernelRows[i] = imageRows[i] - xMin;

}
result->kernel = kernelRows - yMin;

Change History (4)

comment:1 by eugene, 22 years ago

Owner: changed from eugene to Paul Price

comment:2 by Paul Price, 22 years ago

Resolution: fixed
Status: newclosed

Removed the code segment. Thanks for the feedback!

comment:3 by Paul Price, 22 years ago

Keywords: VERIFIED added

Should be fixed in SDRS-07 and ADD-06 (7 September 2004).

comment:4 by Paul Price, 22 years ago

Keywords: VERIFIED removed
Note: See TracTickets for help on using tickets.