Skip to content

Commit 602494b

Browse files
committed
docs: enhance case study documentation with additional notes and formatting improvements
1 parent 8929a4c commit 602494b

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

docs/examples/case_study.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
This section offers an overview of a case study based on real-world data.
22

3+
/// Note
34
> 💡 **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+
///
46

57
To follow along:
68

@@ -16,7 +18,9 @@ The hyperspectral dataset used in this case study was acquired using Hyspex push
1618
| VNIR-1600 | Visible to near-infrared (400–988 nm) | 160 | 3.6 nm |
1719
| SWIR-384 | Short-wave infrared (950–2500 nm) | 288 | 5.4 nm |
1820

19-
> **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+
///
2024

2125
### 📁 File Naming Convention
2226

@@ -47,12 +51,12 @@ Before diving into the examples, verify that your SiaPy installation and data ar
4751
```
4852

4953
/// Warning
54+
If you encounter issues:
5055

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
5660
///
5761

5862
## 🧪 Source Code Examples
@@ -78,7 +82,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
7882
- File metadata and path information
7983
- Camera identification and associated geometric data
8084

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.
8287

8388
**Example:**
8489

@@ -96,7 +101,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
96101
- **Data Extraction**: Methods for extracting spectral signatures and subarrays from specific image regions
97102
- **Visualization**: Converting hyperspectral data to displayable RGB images with optional histogram equalization
98103

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.
100106

101107
### Managing Image Collections
102108

@@ -116,7 +122,8 @@ Before diving into the examples, verify that your SiaPy installation and data ar
116122
- **Iteration Patterns**: Iterating through the image collection with standard Python iteration
117123
- **Filtering and Selection**: Selecting images by specific criteria (e.g., camera ID)
118124

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.
120127

121128
### Interactive Pixel and Area Selection
122129

@@ -139,7 +146,8 @@ The selected pixels are highlighted in the image below.
139146
- **User Interaction**: Simple keyboard-based interaction model (press Enter to finish selection)
140147
- **Results Access**: Accessing the resulting Pixels object and its DataFrame representation
141148

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.
143151

144152
**Example:**
145153

@@ -160,7 +168,8 @@ The selected areas are highlighted in the image below.
160168
- **Polygon-Based Selection**: Defining complex shapes for region-based analysis
161169
- **Selection Management**: Organized representation of selected areas for further processing
162170

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.
164173

165174
### Image Transformation and Processing
166175

@@ -179,7 +188,8 @@ The selected areas are highlighted in the image below.
179188
- **Transformation Calculation**: Computing the mathematical transformation between coordinate systems
180189
- **Spatial Alignment**: Creating a foundation for aligning multi-sensor hyperspectral data
181190

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.
183193

184194
**Example:**
185195

@@ -196,7 +206,8 @@ The selected areas are highlighted in the image below.
196206
- **Cross-Spectral Analysis**: Enabling analysis of the same physical regions across different spectral data
197207
- **Visual Verification**: Displaying both images with highlighted areas to verify correct transformation
198208

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.
200211

201212
**Example:**
202213

@@ -213,7 +224,8 @@ The selected areas are highlighted in the image below.
213224
- **Normalization**: Area-based normalization for standardizing image intensity distributions
214225
- **Data Augmentation**: Creating modified versions of images for machine learning training
215226

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.
217229

218230
---
219231

0 commit comments

Comments
 (0)