Description
Zero-based raster crop-origin translation with half-open bounds, not a patient-coordinate transform.
An image grid has array indices as well as physical spacing, timing, and signal conventions. A calculation on supplied metadata describes one part of that grid or signal; it does not inspect an image, validate a complete file, or interpret anatomy.
Zero-based raster crop-origin translation with half-open bounds, not a patient-coordinate transform.
When to use this tool
Use it for radiology image crop origin shift when the required inputs and conventions are already available.
How to use the tool and how it works
- Enter row, column, cropTop, cropLeft, rows, columns. Use the stated units and boundary conventions.
- Run the calculation. Correct any input error before interpreting a result.
- Read croppedRow, croppedColumn, inside. Inspect any known, defined, inclusion, or boundary flags before interpreting numeric values.
Subtract cropTop from row and cropLeft from column. Report inside when the original coordinates lie in the half-open crop rectangle starting at cropTop/cropLeft with the supplied rows and columns.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| row | Row | Required. Safe integer; minimum 0. |
| column | Column | Required. Safe integer; minimum 0. |
| cropTop | Crop Top | Required. Safe integer; minimum 0. |
| cropLeft | Crop Left | Required. Safe integer; minimum 0. |
| rows | Number of rows in the crop rectangle. | Required. Safe integer; minimum 1. |
| columns | Number of columns in the crop rectangle. | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| croppedRow | Cropped Row | Required. Safe integer. |
| croppedColumn | Cropped Column | Required. Safe integer. |
| inside | Inside | Required. Boolean. |
{
"input": {
"row": 15,
"column": 25,
"cropTop": 10,
"cropLeft": 20,
"rows": 50,
"columns": 60
},
"output": {
"croppedRow": 5,
"croppedColumn": 5,
"inside": true
}
} Limitations and assumptions
- Rows and columns describe the crop dimensions. Translated coordinates may be negative outside the crop; source-image bounds, padding, and image data are not checked or modified.
- The field tables describe structural bounds; the mechanics also state cross-field requirements. Malformed input shapes, disallowed keys, and invalid domains cause input errors. Results must remain finite and within the declared output contract. A successful false flag or zero placeholder is distinct from an error.
- Numeric arithmetic uses binary floating point. Exact comparisons have no hidden tolerance or decimal rounding; negative zero is exported as zero. Decimal-text integer operations retain the exactness specifically stated above.
Alternative or Complementary methods
For radiology image crop origin shift, check the source records and the supplied rule before comparing the result with another method. Use a full image reader and geometry or signal analysis when the task requires interpreting image data.
References
Similar or alternative tools
- Radiology Image Matrix Field Of View Factor
Explicit full pixel-footprint versus first-to-last pixel-center field-of-view convention.
- DICOM Image Orientation Dot Orthogonality Gap
Check supplied DICOM row/column direction cosines for unit lengths and orthogonality using an explicit tolerance.