-
Notifications
You must be signed in to change notification settings - Fork 57
Prezi 4 scale #2347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: prezi-4
Are you sure you want to change the base?
Prezi 4 scale #2347
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1478,43 +1478,15 @@ See above... | |||||
|
||||||
## Conveying Physical Dimensions | ||||||
|
||||||
(why is this important!?) | ||||||
In many cases, the dimensions of a Canvas, or the pixel density of a photograph, are not necessarily related to the real-world size of the object they show. A large wall painting and a tiny miniature may both be conveyed by 20 megapixel source images on a 4000 by 3000 unit Canvas. But it can be important to know how big something is or if there is a relationship between pixel density and physical length, especially when comparing objects together. An X-Ray image may have a tight expectation for the physical distance between two adjacent pixels, or a scanned 3D model may be constructed such that each 3D coordinate unit corresponds to one meter of physical distance. | ||||||
|
||||||
(move the props to vocab doc) | ||||||
The `spatialScale` property of a Canvas or Scene provides a corresponding real-world scale for a unit of the Canvas or Scene coordinate system, allowing clients to provide scale information to users, for example by an on-screen virtual ruler. In a 2-up viewer, a client could scale two views to convey the true relative sizes of two objects. | ||||||
|
||||||
The value of `spatialScale` is a `UnitValue` (ref) that always has the value "m", i.e., metres. If source size metadata is machine readable (or parse-able) in other measurement systems (e.g., feet and inches) then it should be converted to metres for use in `spatialScale`. Publishers may wish to present the original given measure (e.g., from catalogue metadata) in a `metadata` field for context. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Continental drift simulation example | ||||||
|
||||||
``` | ||||||
{ | ||||||
"type": "Scene", | ||||||
|
||||||
"spatialScale": { | ||||||
"type": "UnitValue", | ||||||
"value": 22.0, | ||||||
"unit": "m" | ||||||
}, | ||||||
|
||||||
// this would be rarely used | ||||||
"temporalScale": { | ||||||
"type": "UnitValue", | ||||||
"value": 0.00001, | ||||||
"unit": "s" | ||||||
} | ||||||
|
||||||
} | ||||||
``` | ||||||
|
||||||
`factor` Required A floating point ratio. | ||||||
`units` Required A real-world measuring unit. Always seconds for temporalScale. Possible values for spatialScale include: "m", "ft". (is that it?) | ||||||
|
||||||
For a Canvas, it's the physical "size" of each cartesian integer unit. | ||||||
For a Scene, it's the physical size of the unit vector. | ||||||
For a timeline it's the ratio of time in the recording to time in the real world. | ||||||
|
||||||
|
||||||
(define props in the Vocabulary doc) | ||||||
The Presentation API also offers a corresponding `temporalScale` property for the `duration` dimension of a Container, when 1 second in the Container does not correspond to 1 second of real time. This is useful for speeded-up or slowed-down audio or video. | ||||||
|
||||||
An extreme example of both physical dimension properties together is a Canvas showing an animation of continental drift over the course of Earth history, where the spatialScale could convey that each Canvas unit is several thousand metres, and each second of the Canvas `duration` is several million years. | ||||||
|
||||||
|
||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1849,6 +1849,29 @@ The value _MUST_ be an array of JSON objects. Each object _MUST_ be a service re | |||||||||||||||||||||||||||||||||||
{: #source} | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
### spatialScale | ||||||||||||||||||||||||||||||||||||
{: #spatialScale} | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
A single UnitValue that defines a real-world scale factor for the coordinate units of a Canvas or Scene. For a Canvas, this defines the physical distance between adjacent units horizontally and vertically. A Canvas with a `width` of 5000 and a `spatialScale` with `value` 0.00008 represents a physical space 0.4 metres wide. For a Scene, this defines the physical distance corresponding to the XYZ coordinate units, or in other words, the physical distance length of a unit vector in the 3D coordinate space. The value of `unit` _MUST_ always be `m`, i.e., metres. | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
{% include api/code_header.html %} | ||||||||||||||||||||||||||||||||||||
``` json-doc | ||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||
"type": "Scene", | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
"spatialScale": { | ||||||||||||||||||||||||||||||||||||
"type": "UnitValue", | ||||||||||||||||||||||||||||||||||||
"value": 22.0, | ||||||||||||||||||||||||||||||||||||
"unit": "m" | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
Comment on lines
+1860
to
+1868
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
* A Canvas _MAY_ have the `spatialScale` property.<br/> | ||||||||||||||||||||||||||||||||||||
Clients _SHOULD_ process `spatialScale` on a Canvas. | ||||||||||||||||||||||||||||||||||||
* A Scene _MAY_ have the `spatialScale` property.<br/> | ||||||||||||||||||||||||||||||||||||
Clients _SHOULD_ process `spatialScale` on a Scene. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
### start | ||||||||||||||||||||||||||||||||||||
|
@@ -1964,6 +1987,33 @@ The value _MUST_ be a JSON object, which _MUST_ have the `id` and `type` propert | |||||||||||||||||||||||||||||||||||
{ "supplementary": { "id": "https://example.org/iiif/1/annos/1", "type": "AnnotationCollection" } } | ||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
### temporalScale | ||||||||||||||||||||||||||||||||||||
{: #temporalScale} | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
A single UnitValue that defines a multiplier or scale factor for the `duration` property of a Container, indicating that one second in "Container time" represents some other real world duration. A Canvas with a `duration` of 450 seconds and a `temporalScale` with `value` 1000 represents a real-world duration of 450,000 seconds (5.2 days), for example a time-lapse video of a growing plant. The value of `unit` _MUST_ always be `s`, i.e., seconds. | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
{% include api/code_header.html %} | ||||||||||||||||||||||||||||||||||||
``` json-doc | ||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||
"type": "Canvas", | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
"temporalScale": { | ||||||||||||||||||||||||||||||||||||
"type": "UnitValue", | ||||||||||||||||||||||||||||||||||||
"value": 1000, | ||||||||||||||||||||||||||||||||||||
"unit": "s" | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
Comment on lines
+1999
to
+2006
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
* A Timeline _MAY_ have the `temporalScale` property.<br/> | ||||||||||||||||||||||||||||||||||||
Clients _MAY_ process `temporalScale` on a Timeline. | ||||||||||||||||||||||||||||||||||||
* A Canvas _MAY_ have the `temporalScale` property.<br/> | ||||||||||||||||||||||||||||||||||||
Clients _MAY_ process `temporalScale` on a Canvas. | ||||||||||||||||||||||||||||||||||||
* A Scene _MAY_ have the `temporalScale` property.<br/> | ||||||||||||||||||||||||||||||||||||
Clients _MAY_ process `temporalScale` on a Scene. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
### thumbnail | ||||||||||||||||||||||||||||||||||||
{: #thumbnail} | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"distance between": I think of pixels as an area, not a point. I might suggest: "expectation for the physical area represented by each individual pixel"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fair, and I wondered if someone might have different thoughts on that. I think I'm fine either way. My reasoning for using distance between is because I was modeling my approach off of computed tomography images (XRay-CT, MRI, etc.), which is the domain I'm most familiar with where physical distance and pixels are tightly linked. For CT, each pixel is treated as a coordinate location and the pixel color/value is an indication of the intensity of the signal(s) at that particular point in space. Because of that, in DICOM and other standards, physical distance is defined as being the length between the center of adjacent pixels. But I used that definition not just here in the overview as an example for X-Rays but also in the model explicitly, so I'm fine if we want to switch to a definition more based on pixels as area.