You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/case_study.md
+26-14Lines changed: 26 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
This section offers an overview of a case study based on real-world data.
2
2
3
+
/// Note
3
4
> 💡 **All code snippets** used in this case study are available in the [GitHub repository](https://github.com/siapy/siapy-lib/tree/main/docs/examples/src).
5
+
///
4
6
5
7
To follow along:
6
8
@@ -16,7 +18,9 @@ The hyperspectral dataset used in this case study was acquired using Hyspex push
> **Note**: All hyperspectral data is provided as calibrated reflectance values, ensuring accuracy and reliability for your analysis.
21
+
/// Note
22
+
All hyperspectral data is provided as calibrated reflectance values, ensuring accuracy and reliability for your analysis.
23
+
///
20
24
21
25
### 📁 File Naming Convention
22
26
@@ -47,12 +51,12 @@ Before diving into the examples, verify that your SiaPy installation and data ar
47
51
```
48
52
49
53
/// Warning
54
+
If you encounter issues:
50
55
51
-
If you encounter issues:
52
-
- Check that SiaPy is properly installed and your environment is activated
53
-
- Verify that you've downloaded the example data
54
-
- Ensure the `data_dir` variable points to the correct location of your dataset
55
-
- Make sure both `.img` and `.hdr` files are present in your data directory
56
+
- Check that SiaPy is properly installed and your environment is activated
57
+
- Verify that you've downloaded the example data
58
+
- Ensure the `data_dir` variable points to the correct location of your dataset
59
+
- Make sure both `.img` and `.hdr` files are present in your data directory
56
60
///
57
61
58
62
## 🧪 Source Code Examples
@@ -78,7 +82,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
78
82
- File metadata and path information
79
83
- Camera identification and associated geometric data
80
84
81
-
> 💡 **Implementation Note**: This script uses SiaPy's property decorators for read-only access to image attributes, following the library's design pattern for consistent data access.
85
+
??? note "Implementation Details"
86
+
This script uses decorators for read-only access to image attributes, following the library's design pattern for consistent data access.
82
87
83
88
**Example:**
84
89
@@ -96,7 +101,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
96
101
-**Data Extraction**: Methods for extracting spectral signatures and subarrays from specific image regions
97
102
-**Visualization**: Converting hyperspectral data to displayable RGB images with optional histogram equalization
98
103
99
-
> 💡 **Implementation Note**: Notice how methods follow SiaPy's naming convention: converters use `to_` prefix (e.g., `to_numpy()`, `to_signatures()`, `to_display()`), while calculation methods use descriptive verbs.
104
+
??? note "Implementation Details"
105
+
Notice how methods follow SiaPy's naming convention: converters use `to_` prefix (e.g., `to_numpy()`, `to_signatures()`, `to_display()`), while calculation methods use descriptive verbs.
100
106
101
107
### Managing Image Collections
102
108
@@ -116,7 +122,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
116
122
-**Iteration Patterns**: Iterating through the image collection with standard Python iteration
117
123
-**Filtering and Selection**: Selecting images by specific criteria (e.g., camera ID)
118
124
119
-
> 💡 **Implementation Note**: SpectralImageSet implements standard Python container interfaces, making it behave like a familiar collection type with additional hyperspectral-specific functionality.
125
+
??? note "Implementation Details"
126
+
`SpectralImageSet` implements standard Python container interfaces, making it behave like a familiar collection type with additional hyperspectral-specific functionality.
120
127
121
128
### Interactive Pixel and Area Selection
122
129
@@ -139,7 +146,8 @@ The selected pixels are highlighted in the image below.
139
146
-**User Interaction**: Simple keyboard-based interaction model (press Enter to finish selection)
140
147
-**Results Access**: Accessing the resulting Pixels object and its DataFrame representation
141
148
142
-
> 💡 **Implementation Note**: The `pixels_select_click` function handles the display, interaction, and collection of pixel coordinates in a single operation, simplifying user interaction code.
149
+
??? note "Implementation Details"
150
+
The `pixels_select_click` function handles the display, interaction, and collection of pixel coordinates in a single operation, simplifying user interaction code.
143
151
144
152
**Example:**
145
153
@@ -160,7 +168,8 @@ The selected areas are highlighted in the image below.
160
168
-**Polygon-Based Selection**: Defining complex shapes for region-based analysis
161
169
-**Selection Management**: Organized representation of selected areas for further processing
162
170
163
-
> 💡 **Implementation Note**: Selected areas are returned as a list of Pixels objects, each representing a distinct region that can be separately analyzed or processed.
171
+
??? note "Implementation Details"
172
+
Selected areas are returned as a list of `Pixels` objects, each representing a distinct region that can be separately analyzed or processed.
164
173
165
174
### Image Transformation and Processing
166
175
@@ -179,7 +188,8 @@ The selected areas are highlighted in the image below.
179
188
-**Transformation Calculation**: Computing the mathematical transformation between coordinate systems
180
189
-**Spatial Alignment**: Creating a foundation for aligning multi-sensor hyperspectral data
181
190
182
-
> 💡 **Implementation Note**: The `corregistrator.align()` function computes a transformation matrix that can transform coordinates from one image space to another, essential for multi-sensor data fusion.
191
+
??? note "Implementation Details"
192
+
The `corregistrator.align()` function computes a transformation matrix that can transform coordinates from one image space to another, essential for multi-sensor data fusion.
183
193
184
194
**Example:**
185
195
@@ -196,7 +206,8 @@ The selected areas are highlighted in the image below.
196
206
-**Cross-Spectral Analysis**: Enabling analysis of the same physical regions across different spectral data
197
207
-**Visual Verification**: Displaying both images with highlighted areas to verify correct transformation
198
208
199
-
> 💡 **Implementation Note**: The transformation is applied to the Pixels objects directly, allowing selected regions to be mapped between different spectral ranges while preserving their shape relationships.
209
+
??? note "Implementation Details"
210
+
The transformation is applied to the `Pixels` objects directly, allowing selected regions to be mapped between different spectral ranges while preserving their shape relationships.
200
211
201
212
**Example:**
202
213
@@ -213,7 +224,8 @@ The selected areas are highlighted in the image below.
213
224
-**Normalization**: Area-based normalization for standardizing image intensity distributions
214
225
-**Data Augmentation**: Creating modified versions of images for machine learning training
215
226
216
-
> 💡 **Implementation Note**: All transformation functions follow a consistent input/output pattern, taking NumPy arrays as input and returning the transformed arrays, making them easily composable for complex processing pipelines.
227
+
??? note "Implementation Details"
228
+
All transformation functions follow a consistent input/output pattern, taking NumPy arrays as input and returning the transformed arrays, making them easily composable for complex processing pipelines.
0 commit comments