Jiangtherapee网站:https://y-g-jiang.github.io/JO.html
The guide is based on the current open-source codebase and focuses on real behavior implemented in App.tsx, components/*, services/*, utils/*, and bundled local subtrees.
本指南基于当前公开代码库,重点说明 App.tsx、components/*、services/*、utils/* 以及仓库内捆绑子目录里实际实现的行为。
The application is best understood as a browser-based RAW analysis workstation, measurement lab, and experimental image-processing sandbox built around sessions.
这个应用最适合被理解为一个基于浏览器的 RAW 分析工作站、测量实验室,以及围绕 session 组织的实验性图像处理沙盒。
components/SfrLabWorkspace.tsx, with components/SfrModal.tsx serving as the embedded expert measurement core.components/SfrLabWorkspace.tsx 为核心的专用工作区,而 components/SfrModal.tsx 则作为嵌入式专家测量核心存在。Unmix / BW, RGGB Raw, and Three-plane.Unmix / BW、RGGB Raw 和 Three-plane。RGGB Raw now defaults to Linear and supports green-phase modes Default, 1, and 2.RGGB Raw 现在默认按 Linear 处理,并支持 Default、1、2 三种绿色相位模式。Three-plane, the manual expert panel now defaults to None, so the user must explicitly choose Luma, R, G, or B before adding a manual ROI. In Auto Block and explain, three-plane analysis defaults to luma.Three-plane 模式下,手动专家面板现在默认是 None,因此用户必须先明确选择 Luma、R、G 或 B 之后才能添加手动 ROI;而在 Auto Block 和 explain 中,三平面的分析默认使用 luma。Deshading is now a shared switch: changing it in the left SFR workflow panel also refreshes the embedded analysis core, Auto Detect / Explain, auto-overlay MTF labels, and auto-plot/export data.Deshading 现在是共享开关:在左侧 SFR 工作流面板里切换它,也会同步刷新嵌入式分析核心、Auto Detect / Explain、自动叠加层上的 MTF 标签,以及自动绘图/导出数据。Official NR switch; normal batch work in SFR Lab treats that path as off.Official NR 开关;SFR Lab 的常规批处理工作流会把那条路径视为关闭。Auto Detect, Explain Selected ROI, canvas right-click deletion for detected edges, and Output Polar Point Sets.Auto Detect、Explain Selected ROI、画布右键删除已检出边,以及 Output Polar Point Sets。Polar, Image X, and Image Y; Polar further supports both MTF50 and Line Pair, plus JPG export.Polar、Image X 和 Image Y;其中 Polar 还进一步支持 MTF50 与 Line Pair 两种模式,并可导出 JPG。100% zoom so single-pixel inspection does not blur.100% 缩放时会切换为点对点 / 像素级显示,以避免单像素观察时发糊。Ctrl+S now quick-saves the current rendered result into JDNG: scalar or mosaic-style states export as single-plane JDNG plus CFA index, while full-color or true three-plane states export as three-plane JDNG.Ctrl+S 现在会把“当前界面渲染结果”快速保存为 JDNG:标量或马赛克风格状态导出为带 CFA 索引的单平面 JDNG,而全彩或真正三平面状态导出为三平面 JDNG。PTF disabled at the button level even though the lower-level math still exists in services/sfrProcessor.ts.PTF 保持为不可选状态,尽管底层 services/sfrProcessor.ts 里仍然保留相关数学流程。index.tsx, which mounts App.tsx; almost every user-facing workflow eventually flows through App.tsx.index.tsx,它挂载 App.tsx;几乎所有用户可见流程最后都会经过 App.tsx。components/ contains the React UI, including the main canvas, header, sidebars, floating analysis windows, and all major lab modals.components/ 存放 React 界面,包括主画布、顶部栏、侧边栏、浮动分析窗口和所有主要实验室弹窗。services/ contains the imaging core, RAW processing, rendering backends, stacking engine, color science helpers, worker pools, DNG and TIFF writers, and persistence helpers.services/ 存放成像核心、RAW 处理、渲染后端、堆栈引擎、色彩科学辅助模块、worker 池、DNG/TIFF 写出器以及持久化辅助代码。utils/ contains reusable math, selection sizing, rotated-view mapping, projective-view math, and channel model helpers.utils/ 存放通用数学、选区尺寸、旋转视图映射、投影视图数学以及通道模型辅助函数。hooks/ currently contains useJiangBridge.ts, which monitors the external local helper bridge on http://localhost:5428/health.hooks/ 目前包含 useJiangBridge.ts,它负责监测位于 http://localhost:5428/health 的本地外部辅助桥接服务。lensfun/ stores bundled XML lens metadata used by the PS distortion-correction workflow.lensfun/ 存放捆绑的 XML 镜头元数据,供 PS 畸变校正流程使用。vendor/, LibRaw-Wasm-main/, drizzle-main/, Handheld-Multi-Frame-Super-Resolution-main/, ImageStackAlignator-master/, and code/ are bundled reference or dependency subtrees rather than the normal React application surface.vendor/、LibRaw-Wasm-main/、drizzle-main/、Handheld-Multi-Frame-Super-Resolution-main/、ImageStackAlignator-master/ 和 code/ 更偏向捆绑参考实现或依赖子树,而不是常规 React 应用界面层。dist/ is build output and node_modules/ is installed dependency content; they matter operationally but are not the primary handwritten source modules.dist/ 是构建产物,node_modules/ 是已安装依赖内容;它们在运行层面有意义,但并不是主要的手写源码模块。image-noise-snr-analyzer, and the normal scripts are npm run dev, npm run build, and npm run preview.image-noise-snr-analyzer,常规脚本是 npm run dev、npm run build 和 npm run preview。npm run dev starts the Vite development server and is the normal mode for interactive exploration and UI changes.npm run dev 会启动 Vite 开发服务器,是交互探索和界面开发时的常规模式。npm run build performs a production build and is the fastest broad regression check after UI or logic edits.npm run build 会执行生产构建,是修改界面或逻辑后最直接的广义回归检查。App.tsx keeps an array of sessions plus a currentIndex, so switching images is conceptually switching the active session.App.tsx 内部维护一个 session 数组和一个 currentIndex,因此切换图片本质上就是切换当前活动 session。App.tsx As The OrchestratorApp.tsx 作为总控中心App.tsx imports nearly every visible tool in the application and is the central place where data loading, render setting updates, modal visibility, ROI windows, and PS state are coordinated.App.tsx 几乎导入了应用里所有可见工具,是统一协调数据加载、渲染设置更新、弹窗显示、ROI 窗口以及 PS 状态的总控位置。App.tsx is the correct first file to read in depth.App.tsx。services/workspaceStore.ts, using localStorage for the workspace index and IndexedDB for raw file buffers and PS workflows.services/workspaceStore.ts 持久化工作区结构,使用 localStorage 保存工作区索引,使用 IndexedDB 保存原始文件 buffer 和 PS 工作流。components/Header.tsx is the main command bar for loading files, opening labs, toggling sidebar visibility, entering PS mode, and exposing app-level actions such as EXIF, database, and DNG-related workflows.components/Header.tsx 是主命令栏,负责加载文件、打开实验室、切换侧栏显示、进入 PS 模式,并暴露 EXIF、数据库和 DNG 相关流程等应用级操作。components/ImageCanvas.tsx is where image display, pan and zoom interaction, ROI drawing, marker interaction, PS mask overlay drawing, guide drawing, ellipse drafting, and brush painting all converge.components/ImageCanvas.tsx 是图像显示、平移缩放交互、ROI 绘制、标记交互、PS 蒙版叠加绘制、参考线绘制、椭圆草绘和笔刷涂抹的汇合点。components/ZoomControls.tsx gives explicit zoom control, but the deeper selection math lives in utils/viewRotation.ts and utils/selectionSizing.ts.components/ZoomControls.tsx 提供显式缩放控制,但更底层的选区数学逻辑位于 utils/viewRotation.ts 和 utils/selectionSizing.ts。100% deliberately disable smoothing and switch to point-to-point display so one image pixel maps to a crisp block instead of a soft interpolated patch.100% 的缩放会刻意关闭平滑插值并切换到点对点显示,因此单个图像像素会变成清晰的方块,而不是柔化后的插值斑块。viewRotation.ts handles normalized angle logic and coordinate conversion between image space and rotated view space.viewRotation.ts 负责标准化角度逻辑,以及图像坐标和旋转后视图坐标之间的转换。selectionSizing.ts provides power-of-two clamping and snapping helpers, which matter for FFT-style analysis that benefits from power-of-two ROI dimensions.selectionSizing.ts 提供二次幂约束与吸附辅助函数,这对偏好二次幂 ROI 尺寸的 FFT 类分析尤其重要。components/ControlPointSliders.tsx is the wrapper that switches between GUI mode and terminal mode, delegating to GuiSidebar.tsx and TerminalSidebar.tsx.components/ControlPointSliders.tsx 是侧栏总包装器,它在 GUI 模式和终端模式之间切换,并把工作分别委托给 GuiSidebar.tsx 和 TerminalSidebar.tsx。ControlPointSliders.tsx.ControlPointSliders.tsx 中的自动应用逻辑。components/GuiSidebar.tsx is one of the biggest files in the project because it centralizes display settings, lab controls, chart calibration, batch tools, PS controls, and lens-related parameter entry.components/GuiSidebar.tsx 是整个项目里最大的文件之一,因为它把显示设置、实验室控制、色卡校准、批处理工具、PS 控制以及镜头相关参数输入都集中到了同一个界面。import.meta.glob('../lensfun/*.xml'), which matters for PS lens distortion correction.import.meta.glob('../lensfun/*.xml') 接好,这对 PS 镜头畸变校正功能很关键。GuiSidebar.tsx exposes controls for DR ROI size, grid rows and columns, start-marking actions, test-pattern generation, and batch processing of single files or pairs.GuiSidebar.tsx 提供了 DR ROI 尺寸、网格行列数、开始标记、测试图生成以及单文件或成对文件批处理等控件。rawProcessor.ts also exports convertXTransToDNG, which shows that X-Trans handling is not only for display but also for conversion workflows.rawProcessor.ts 还导出了 convertXTransToDNG,这说明 X-Trans 处理不仅用于显示,也用于转换工作流。components/TerminalSidebar.tsx provides a CLI-like interface for users who prefer exact commands instead of many UI controls.components/TerminalSidebar.tsx 为喜欢精确命令而不是大量图形控件的用户提供了类 CLI 界面。help, ev, wb, bl, demo, matrix, xtrans, render, sel, mark, gen test, fft load, fft run, crosscalc, and cls.help、ev、wb、bl、demo、matrix、xtrans、render、sel、mark、gen test、fft load、fft run、crosscalc 和 cls。render or apply.render 或 apply 一次性推送到主应用。components/DraggablePanel.tsx provides the shared drag shell for many windows, including touch and mouse dragging, focus changes, and boundary clamping.components/DraggablePanel.tsx 为许多窗口提供了统一的可拖拽外壳,支持触摸与鼠标拖动、焦点切换和边界限制。components/HistogramModal.tsx analyzes the current ROI and can also work in stack mode when multiple files are supplied.components/HistogramModal.tsx 用于分析当前 ROI,在传入多个文件时也支持堆栈模式。calculateHistogram logic or leverage stackAnalysisWebgpu for stack-aware processing depending on context and available backend support.calculateHistogram 逻辑和支持堆栈的 stackAnalysisWebgpu 之间切换。components/PowerSpectrumModal.tsx is one of the most sophisticated analysis windows in the codebase and supports multiple processing strategies.components/PowerSpectrumModal.tsx 是整个代码库里最复杂的分析窗口之一,并支持多种处理策略。calculatePowerSpectrum, stackAnalysisWebgpu, decoded stack-frame helpers, and the powerSpectrumWorkerPool depending on whether you analyze a single ROI, a batch stack, or a heavy multi-file workflow.calculatePowerSpectrum、stackAnalysisWebgpu、已解码堆栈帧辅助工具和 powerSpectrumWorkerPool 之间切换。components/TwoDSpectrumModal.tsx complements the main power spectrum view by showing two-dimensional spectrum structure instead of only reduced curves.components/TwoDSpectrumModal.tsx 是主功率谱视图的补充,它展示的是二维频谱结构,而不仅仅是降维后的曲线。components/QuantizationModal.tsx focuses on quantization-related statistics rather than general noise distribution or spectral content.components/QuantizationModal.tsx 聚焦的是量化相关统计,而不是一般噪声分布或频谱内容。calculateQuantizationStats in services/rawProcessor.ts, so the modal is tightly coupled to raw-domain sample interpretation.services/rawProcessor.ts 里的 calculateQuantizationStats,因此这个窗口与 RAW 域样本解释紧密耦合。components/PearsonModal.tsx is for correlation-style analysis, powered by Pearson accumulators and finalization logic exported from rawProcessor.ts.components/PearsonModal.tsx 用于相关性分析,底层由 rawProcessor.ts 导出的 Pearson 累积器和最终计算逻辑提供支持。AboutModal.tsx is a resource hub that links to related external tools and also displays obfuscated view statistics pulled from hidden DOM counters.AboutModal.tsx 更像一个资源中心,它链接到若干外部相关工具,并显示从隐藏 DOM 计数器读取的混淆访问统计。ExifModal.tsx exposes file metadata for inspection and is the place to verify camera model, black-level tags, or other decode-relevant metadata.ExifModal.tsx 用来查看文件元数据,是核对相机型号、黑电平标签或其他解码相关元数据的主要位置。DatabaseModal.tsx is a searchable black-level database UI backed by services/cameraData.ts, with SearchBar.tsx and CameraCard.tsx providing filtering and presentation.DatabaseModal.tsx 是一个可搜索的黑电平数据库界面,底层依赖 services/cameraData.ts,并由 SearchBar.tsx 与 CameraCard.tsx 负责筛选和呈现。CrossCalcModal.tsx is a compact calculator that estimates original white-noise sigma from horizontal and vertical measurement inputs.CrossCalcModal.tsx 是一个小型计算器,用于根据水平和垂直测量输入估算原始白噪声 sigma。components/ColorLabModal.tsx expects 24 patch statistics and computes a color matrix using services/colorLab.ts.components/ColorLabModal.tsx 预期接收 24 个色块统计值,并通过 services/colorLab.ts 计算颜色矩阵。RGGB and BGGR, adjust patch sampling size, enter or revise four black-level values, and copy the resulting matrix string for use as a custom matrix.RGGB 和 BGGR 之间切换、调整色块采样尺寸、输入或修正四通道黑电平,并把结果矩阵字符串复制出去作为自定义矩阵使用。components/SfrLabWorkspace.tsx provides the dedicated workspace shell, while components/SfrModal.tsx remains the embedded expert measurement panel.components/SfrLabWorkspace.tsx 提供专用工作区外壳,而 components/SfrModal.tsx 继续承担嵌入式专家测量面板的职责。Unmix / BW, RGGB Raw, and Three-plane.Unmix / BW、RGGB Raw 和 Three-plane。RGGB Raw is the Bayer-green measurement path. It now defaults to Linear, and its phase selector offers Default, 1, and 2.RGGB Raw 是 Bayer 绿通道测量路径。它现在默认按 Linear 处理,并提供 Default、1、2 三种绿相位选择。Three-plane is the direct color-input path. In the expert panel it now starts from None, so the user must explicitly choose Luma, R, G, or B before adding a manual ROI. In Auto Block, three-plane analysis defaults to luma.Three-plane 是直接彩色输入路径。在专家面板里它现在从 None 开始,因此用户必须先明确选择 Luma、R、G 或 B 之后才能添加手动 ROI;而在 Auto Block 中,三平面的分析默认使用 luma。Unmix / BW is treated as a single-channel source. If raw-domain unmix data exists, SFR uses that linear signal; otherwise it falls back to the BW-style single-channel preview path.Unmix / BW 会被视为单通道输入;如果 raw 域 unmix 数据存在,SFR 会优先使用那条线性信号,否则回退到 BW 风格的单通道预览路径。Polar, Image X, and Image Y plots. Polar supports both MTF50 and Line Pair, supports center picking and confirmation, and can export JPG.Polar、Image X、Image Y 三类图;其中 Polar 同时支持 MTF50 和 Line Pair,支持场中心选择与确认,并可导出 JPG。Deshading is now shared across the left workflow panel and the embedded expert core, so changing it refreshes current SFR numbers, plot data, auto-overlay labels, and auto-derived export values together.Deshading 现在在左侧工作流面板与嵌入式专家核心之间共享,因此切换它会同时刷新当前 SFR 数值、绘图数据、自动叠加标签以及自动导出数值。Official NR toggle. In normal SFR Lab batch work that path is treated as off.Official NR 开关;在当前 SFR Lab 的常规批处理工作流里,这条路径按关闭处理。Auto Detection Tuning panel still exists, but it should mainly be understood as a candidate-screening and measurement-region panel rather than the main place to learn SFR math.Auto Detection Tuning 面板仍然存在,但更适合把它理解为候选筛选与测量区域控制面板,而不是理解 SFR 数学本体的主要入口。components/PTCModal.tsx is a large, specialized workflow for photon transfer curve style fitting and visualization.components/PTCModal.tsx 是一个大型专用工作流,用于光子转移曲线风格的拟合与可视化。components/DngExportModal.tsx is a browser-side DNG writer built around Pyodide and an embedded Python script.components/DngExportModal.tsx 是一个运行在浏览器端的 DNG 写出器,核心依赖 Pyodide 和内嵌 Python 脚本。processRawDataOnly, so it is closer to a technical export path than a generic “save image” dialog.processRawDataOnly 使用已解码的 RAW 域数据,因此它更像一个技术型导出通道,而不是普通的“保存图片”对话框。components/SaveZ8Modal.tsx is a highly specialized rescue/export workflow aimed at Nikon Z8 style data repair and DNG generation.components/SaveZ8Modal.tsx 是一个高度专门化的修复与导出流程,目标是面向 Nikon Z8 风格数据的处理与 DNG 生成。1006, 1007, and 1008, applies corrective logic, and then runs a custom Python DNG writer.1006、1007、1008 等特定码值、应用修正逻辑,然后运行自定义 Python DNG 写出器。Z8_MATRIX, Z8_BLACK, and Z8_SHIFT are hard-coded, which tells you this is not a generic converter but a task-driven utility.Z8_MATRIX、Z8_BLACK 和 Z8_SHIFT 这类常量是硬编码的,这说明它不是通用转换器,而是面向特定任务的专用工具。components/StackingModal.tsx is the user-facing control panel for burst stacking and multi-frame processing.components/StackingModal.tsx 是连拍堆栈和多帧处理的用户控制面板。dng16 or jdngf32, and alignment settings.++ 帧范围、输出模式选择(如 dng16 或 jdngf32)以及对齐设置。services/stackingProcessor.ts is huge and supports ECC motion models, OpenCV-assisted paths, optional APAP-style logic, and output serialization.services/stackingProcessor.ts 体量很大,支持 ECC 运动模型、OpenCV 辅助路径、可选的 APAP 风格逻辑以及输出序列化。PsDocument.PsDocument 的形式存放在 session 内部。services/psDocument.ts, while UI surfaces are spread across ImageCanvas.tsx, PsEditorPanel.tsx, GuiSidebar.tsx, and App.tsx.services/psDocument.ts,而界面层则分散在 ImageCanvas.tsx、PsEditorPanel.tsx、GuiSidebar.tsx 和 App.tsx 中。psDocument.ts can create initial documents, ensure a global adjustment layer, add masks, add ellipse masks, append brush strokes, and bind masks to layers.psDocument.ts 可以创建初始文档、确保全局调整图层、添加蒙版、添加椭圆蒙版、追加笔刷笔触,并把蒙版绑定到图层。psDocument.ts supports crop, rotate, horizontal flip, vertical flip, Lensfun distortion correction, upright-from-guides, and generic projective-view transforms.psDocument.ts 支持裁切、旋转、水平翻转、垂直翻转、Lensfun 畸变校正、基于参考线的拉直,以及通用投影视图变换。composePsDocumentPreview and composePsDocumentPreviewDirty, which enables full recomposition or dirty-rect updates.composePsDocumentPreview 和 composePsDocumentPreviewDirty 负责,从而支持完整重算或脏矩形局部更新。psWebgpuRenderer.ts and psWebglRenderer.ts, but the document model itself stays renderer-agnostic.psWebgpuRenderer.ts 和 psWebglRenderer.ts 提供,但文档模型本身仍保持与渲染器解耦。services/rawProcessor.ts is the imaging backbone of the project and contains decoding-adjacent helpers, render modes, measurement routines, and export-oriented transforms.services/rawProcessor.ts 是整个项目的成像骨架,内部集成了解码相关辅助、渲染模式、测量例程和面向导出的变换逻辑。renderZeroDependency, renderBasicColorZeroDep, renderAdvancedZeroDep, renderRawWithOfficial16, renderFor16BitExport, and PS-oriented float RGB conversion.renderZeroDependency、renderBasicColorZeroDep、renderAdvancedZeroDep、renderRawWithOfficial16、renderFor16BitExport 以及面向 PS 的 float RGB 转换。services/webgpuRenderer.ts or services/webglRenderer.ts, exported as singletons webgpuRenderer and webglRenderer.services/webgpuRenderer.ts 或 services/webglRenderer.ts,并以单例 webgpuRenderer 和 webglRenderer 对外提供。psWebgpuRenderer.ts and psWebglRenderer.ts, which suggests the editor preview needs different shader or composition behavior.psWebgpuRenderer.ts 和 psWebglRenderer.ts 中拥有并行的专用渲染器,这说明编辑器预览需要不同的着色器或合成行为。rawProcessor.ts.rawProcessor.ts 导出的 CPU 渲染路径。services/stackFrameCache.ts caches decoded frames with a memory budget and provides getDecodedStackFrame, getDecodedStackFrames, and prefetchStackFrames.services/stackFrameCache.ts 在内存预算下缓存已解码帧,并提供 getDecodedStackFrame、getDecodedStackFrames 和 prefetchStackFrames。services/powerSpectrumWorkerPool.ts distributes heavy spectral jobs across workers and can restart workers when they crash.services/powerSpectrumWorkerPool.ts 会把较重的频谱任务分发到多个 worker 上,并能在 worker 崩溃时重启。services/powerSpectrumWorker.ts, services/histogramWorker.ts, services/rawDecodeWorker.ts, and services/renderWorker.ts are narrow worker modules for parallel or off-main-thread tasks.services/powerSpectrumWorker.ts、services/histogramWorker.ts、services/rawDecodeWorker.ts 和 services/renderWorker.ts 都是面向并行或主线程外任务的窄职责 worker 模块。services/stackAnalysisWebgpu.ts is a dedicated heavy module for GPU-accelerated stack analysis and is one reason the app scales to more demanding measurement workflows.services/stackAnalysisWebgpu.ts 是一个专门用于 GPU 加速堆栈分析的重模块,也是应用能扩展到更高负载测量流程的重要原因之一。hooks/useJiangBridge.ts polls a local bridge health endpoint and reports whether a helper service is connected, which can affect available workflows and auto-application logic.hooks/useJiangBridge.ts 会轮询本地 bridge 健康检查端点并汇报辅助服务是否连接,这会影响某些工作流和自动应用逻辑是否可用。services/chartCalibration.ts defines reference chart corners and ROIs and exports homography helpers used to turn user-marked chart points into structured sampling rectangles.services/chartCalibration.ts 定义参考色卡角点和 ROI,并导出单应矩阵辅助函数,用于把用户标记的图表点转换成结构化采样矩形。services/colorLab.ts contains CC24_REF_LINEAR, color-grid generation, and color-result calculation used by the Color Lab modal.services/colorLab.ts 包含 CC24_REF_LINEAR、颜色网格生成以及 Color Lab 弹窗所用的色彩结果计算逻辑。services/colorScience.ts provides precomputed scientific data, lens-curve generation, and camera-data calculations from matrices and illuminants.services/colorScience.ts 提供预计算科学数据、镜头曲线生成,以及基于矩阵和光源的相机数据计算。services/colorData.ts, services/cameraMatrices.ts, and services/cameraData.ts are static or semi-static data sources that feed UI databases and technical calculations.services/colorData.ts、services/cameraMatrices.ts 和 services/cameraData.ts 是静态或半静态数据源,供界面数据库和技术计算使用。services/jdng.ts defines a custom float32 JDNG container, parsing and rendering helpers, and is used in stacking and float export workflows.services/jdng.ts 定义了自定义的 float32 JDNG 容器、解析与渲染辅助逻辑,并被用于堆栈和浮点导出流程。services/dngGenerator.ts exports createFakeDNG, which is useful when the app needs a DNG-like wrapper around processed data.services/dngGenerator.ts 导出 createFakeDNG,适用于应用需要为处理后数据包上一层 DNG 风格封装的场景。services/tiffGenerator.ts exports 16-bit and 32-bit TIFF writers plus a float32 DNG-like helper.services/tiffGenerator.ts 导出 16 位和 32 位 TIFF 写出器,以及一个 float32 的 DNG-like 辅助函数。utils/math.ts contains matrix operations, spline generation, LUT generation, and FFT-related helpers that support both rendering and analysis.utils/math.ts 包含矩阵运算、样条生成、LUT 生成和 FFT 相关辅助函数,同时支撑渲染与分析。utils/projectiveView.ts contains projective transform composition, warping, and upright-view helpers used by PS geometry tools.utils/projectiveView.ts 包含投影变换组合、图像扭曲以及拉正视图辅助函数,供 PS 几何工具使用。utils/viewRotation.ts converts between image coordinates and rotated display coordinates.utils/viewRotation.ts 负责图像坐标与旋转显示坐标之间的转换。utils/selectionSizing.ts constrains or snaps ROI geometry, especially for power-of-two workflows.utils/selectionSizing.ts 负责约束或吸附 ROI 几何,尤其服务于二次幂工作流。utils/channelModel.ts gives consistent channel naming and availability logic for Bayer and three-plane data.utils/channelModel.ts 为 Bayer 数据和三平面数据提供统一的通道命名与可用性逻辑。Header.tsx, ImageCanvas.tsx, ControlPointSliders.tsx, GuiSidebar.tsx, and TerminalSidebar.tsx form the main interactive shell of the application.Header.tsx、ImageCanvas.tsx、ControlPointSliders.tsx、GuiSidebar.tsx 和 TerminalSidebar.tsx 共同构成应用的主交互外壳。HistogramModal.tsx, PowerSpectrumModal.tsx, TwoDSpectrumModal.tsx, QuantizationModal.tsx, PearsonModal.tsx, SfrLabWorkspace.tsx, SfrModal.tsx, PTCModal.tsx, ColorLabModal.tsx, DngExportModal.tsx, StackingModal.tsx, and SaveZ8Modal.tsx are the major lab or analysis surfaces.HistogramModal.tsx、PowerSpectrumModal.tsx、TwoDSpectrumModal.tsx、QuantizationModal.tsx、PearsonModal.tsx、SfrLabWorkspace.tsx、SfrModal.tsx、PTCModal.tsx、ColorLabModal.tsx、DngExportModal.tsx、StackingModal.tsx 和 SaveZ8Modal.tsx 是主要实验室或分析界面。SfrLabWorkspace.tsx is the dedicated SFR workspace shell, while SfrModal.tsx now acts more like the inner expert panel used inside that workspace.SfrLabWorkspace.tsx 是专用的 SFR 工作区外壳,而 SfrModal.tsx 现在更像是在该工作区内部使用的专家面板。AboutModal.tsx, ExifModal.tsx, DatabaseModal.tsx, CrossCalcModal.tsx, and ConfirmationModal.tsx are supporting dialogs for metadata, references, database lookup, calculation, and guarded actions.AboutModal.tsx、ExifModal.tsx、DatabaseModal.tsx、CrossCalcModal.tsx 和 ConfirmationModal.tsx 是辅助对话框,分别服务于元数据、参考资源、数据库查询、计算和受保护操作。PsEditorPanel.tsx is the dedicated PS editing side panel, and DraggablePanel.tsx is the shared floating-window shell.PsEditorPanel.tsx 是专门的 PS 编辑侧面板,而 DraggablePanel.tsx 是共享的浮动窗口外壳。ZoomControls.tsx, ThemeSwitcher.tsx, MatrixControls.tsx, LensCurveChart.tsx, LensDataInput.tsx, BlackLevelChart.tsx, CameraCard.tsx, and SearchBar.tsx are focused helper UI pieces that support larger flows.ZoomControls.tsx、ThemeSwitcher.tsx、MatrixControls.tsx、LensCurveChart.tsx、LensDataInput.tsx、BlackLevelChart.tsx、CameraCard.tsx 和 SearchBar.tsx 都是支撑大型流程的定向辅助 UI 组件。ChromaticityChart.tsx is currently a minimal placeholder, and Controls.tsx is empty in the current tree.ChromaticityChart.tsx 目前只是极简占位文件,而 Controls.tsx 在当前代码树中是空文件。rawProcessor.ts, webgpuRenderer.ts, webglRenderer.ts, psWebgpuRenderer.ts, and psWebglRenderer.ts are the display and imaging core.rawProcessor.ts、webgpuRenderer.ts、webglRenderer.ts、psWebgpuRenderer.ts 和 psWebglRenderer.ts 构成显示与成像核心。psDocument.ts is the local-adjustment document engine, while workspaceStore.ts is the persistence engine.psDocument.ts 是局部调整文档引擎,而 workspaceStore.ts 是持久化引擎。stackingProcessor.ts, stackFrameCache.ts, stackAnalysisWebgpu.ts, and powerSpectrumWorkerPool.ts provide the heavy infrastructure for stack and batch analysis.stackingProcessor.ts、stackFrameCache.ts、stackAnalysisWebgpu.ts 和 powerSpectrumWorkerPool.ts 提供了堆栈与批量分析所需的重型基础设施。sfrProcessor.ts, chartCalibration.ts, colorLab.ts, colorScience.ts, colorData.ts, cameraMatrices.ts, and cameraData.ts supply the scientific and calibration logic.sfrProcessor.ts、chartCalibration.ts、colorLab.ts、colorScience.ts、colorData.ts、cameraMatrices.ts 和 cameraData.ts 提供科学计算与标定逻辑。jdng.ts, dngGenerator.ts, and tiffGenerator.ts cover technical export formats.jdng.ts、dngGenerator.ts 和 tiffGenerator.ts 负责技术型导出格式。histogramWorker.ts, powerSpectrumWorker.ts, rawDecodeWorker.ts, and renderWorker.ts are narrow worker entry modules.histogramWorker.ts、powerSpectrumWorker.ts、rawDecodeWorker.ts 和 renderWorker.ts 是职责单一的 worker 入口模块。joraw.js and joraw.wasm are bundled decode/runtime assets that the RAW pipeline relies on.joraw.js 和 joraw.wasm 是 RAW 管线依赖的捆绑解码运行时资源。LibRaw-Wasm-main/ is a bundled WebAssembly-oriented RAW decoding subtree and helps explain some of the project’s decode assumptions and worker patterns.LibRaw-Wasm-main/ 是一个面向 WebAssembly 的捆绑 RAW 解码子树,有助于理解项目的一些解码假设和 worker 模式。Handheld-Multi-Frame-Super-Resolution-main/, ImageStackAlignator-master/, drizzle-main/, and code/ indicate that the project has been built in dialogue with burst, alignment, drizzle, and HDR-style reference implementations.Handheld-Multi-Frame-Super-Resolution-main/、ImageStackAlignator-master/、drizzle-main/ 和 code/ 说明这个项目在构建过程中持续参考了连拍、对齐、drizzle 和 HDR 风格的实现。lensfun/ is a functional bundled data directory, not just documentation, because PS lens correction loads from it.lensfun/ 是功能性数据目录,而不只是文档资源,因为 PS 镜头校正会直接从这里加载数据。vendor/libraw-wasm/ stores dependency-style WASM assets, media/ stores media resources, and dist/ stores built output.vendor/libraw-wasm/ 存放依赖风格的 WASM 资源,media/ 存放媒体资源,而 dist/ 存放构建输出。node_modules/ is large and operationally necessary, but it should be treated as installed dependency material rather than part of the authorial architecture description.node_modules/ 体量巨大且在运行上必不可少,但在架构说明中应把它视为已安装依赖,而不是作者手写设计的一部分。App.tsx first to understand session flow, modal ownership, and shared state.App.tsx,理解 session 流、弹窗归属和共享状态。types.ts second so the data contracts for sessions, RAW images, regions, PS masks, and documents become concrete.types.ts,这样 session、RAW 图像、区域、PS 蒙版和文档的数据契约会变得清晰。ImageCanvas.tsx, Header.tsx, and ControlPointSliders.tsx to understand user interaction entry points.ImageCanvas.tsx、Header.tsx 和 ControlPointSliders.tsx,理解用户交互入口。rawProcessor.ts, psDocument.ts, and stackingProcessor.ts, because those three files explain most of the nontrivial computational behavior.rawProcessor.ts、psDocument.ts 和 stackingProcessor.ts,因为这三个文件解释了大多数非平凡计算行为。App.tsx, rawProcessor.ts, psDocument.ts, and the specific modal or worker closest to your feature.App.tsx、rawProcessor.ts、psDocument.ts,以及离你目标功能最近的那个 modal 或 worker 上。components/SfrLabWorkspace.tsx, components/SfrModal.tsx, services/sfrProcessor.ts, plus ROI extraction and session glue inside App.tsx.components/SfrLabWorkspace.tsx、components/SfrModal.tsx、services/sfrProcessor.ts,以及 App.tsx 里的 ROI 提取与会话衔接逻辑上。SfrLabWorkspace.tsx owns the lab shell, source and encoding controls, the batch/template panels, the Auto Block section, and the launcher for the point-set / plot export modal.SfrLabWorkspace.tsx 负责实验室外壳、source 与 encoding 控件、batch/template 面板、Auto Block 区,以及点集 / 绘图导出弹窗的入口。SfrModal.tsx still contains the expert measurement panel: manual ROI accumulation, manual binning, deshading options, three-plane source selection, CSV export, model fitting, and manual edge-line hooks.SfrModal.tsx 仍然包含专家测量面板本体:手动 ROI 累积、手动 bin、deshading 选项、三平面源选择、CSV 导出、模型拟合,以及手动画边相关钩子。App.tsx owns the SFR session glue: current ROI, shared deshading state, auto-measurement labels, explain cards, the auto-plot modal, and canvas interactions such as right-click deletion of detected edges.App.tsx 负责 SFR 的会话衔接层:当前 ROI、共享 deshading 状态、自动测量标签、explain 结果卡、自动绘图弹窗,以及画布上的右键删边等交互。services/sfrProcessor.ts remains the computational core: edge extraction, line fitting/refinement, ESF/LSF generation, MTF computation, auto-block measurement, and explain diagnostics all converge there.services/sfrProcessor.ts 仍然是计算核心:找边、直线拟合/精修、ESF/LSF 生成、MTF 计算、自动块测量以及 explain 诊断最终都会汇聚到这里。Unmix / BW, RGGB Raw, and Three-plane, rather than the older Rendered RGB versus Scalar Unmix split.Unmix / BW、RGGB Raw 和 Three-plane,而不再是旧文档里的 Rendered RGB 对 Scalar Unmix 二分法。Unmix / BW is treated as a single-channel measurement source. If scalar-unmix data exists, SFR uses the unmixed linear ROI; otherwise it falls back to the BW-style single-channel path.Unmix / BW 会被视为单通道测量源;如果已经有 scalar-unmix 数据,SFR 会优先使用 unmix 后的线性 ROI,否则回退到 BW 风格的单通道路径。RGGB Raw is treated as single-plane Bayer data. It now defaults to Linear, and its final projection uses only real green samples from the selected phase.RGGB Raw 会被视为单平面 Bayer 数据。它现在默认按 Linear 处理,最终投影只使用所选相位里的真实绿采样点。RGGB Raw, Default follows the RAW CFA pattern, 1 forces the top-left / bottom-right green phase, and 2 forces the top-right / bottom-left green phase.RGGB Raw 模式中,Default 跟随 RAW 自带 CFA pattern,1 强制使用左上 / 右下绿相位,2 强制使用右上 / 左下绿相位。Three-plane operates directly on true three-plane input when available. In the manual expert panel it starts from None, and the user must choose Luma, R, G, or B before a manual ROI can be added.Three-plane 在有真实三平面输入时会直接以其为源。在手动专家面板里它从 None 开始,用户必须先选择 Luma、R、G 或 B 之后才能添加手动 ROI。luma, so automatic workflows do not silently fall back to the old green-channel assumption.luma,因此自动工作流不会再悄悄回退到旧的绿通道假设。Encoding selector (Auto, Linear, sRGB) controls whether rendered or three-plane input should be linearized before edge analysis. RGGB Raw itself already has a dedicated raw-style path and therefore defaults to Linear.Encoding 选择器(Auto、Linear、sRGB)用于决定在边缘分析前是否要对 rendered 或 three-plane 输入做线性化;而 RGGB Raw 本身已经有专用的 raw 风格路径,因此默认就是 Linear。handleAddROI() in SfrModal.tsx is the main manual-ingestion point: it checks the current source family, crops the appropriate data, and then funnels that crop into calculateEdgeData(...) or calculateEdgeDataWithManualLine(...).SfrModal.tsx 里的 handleAddROI() 是主要的手动接收入口:它会先判断当前输入源类型,裁出对应数据,然后统一把裁剪结果送进 calculateEdgeData(...) 或 calculateEdgeDataWithManualLine(...)。Pick Edge Line, geometry comes from the two selected canvas points; otherwise the processor estimates the edge from image content.Pick Edge Line,几何信息就来自画布上手动点出的两点;否则处理器会从图像内容里自行估计边缘。0.2126 R + 0.7152 G + 0.0722 B.0.2126 R + 0.7152 G + 0.0722 B 计算亮度。EdgeData; the difference is only that those ROIs come from the detection pipeline rather than from manually drawn rectangles.EdgeData;区别只在于这些 ROI 来自检测流程,而不是手动画出的矩形。calculateEdgeData() first estimates whether the edge is more horizontal or more vertical by comparing accumulated gradients, and then normalizes the ROI into a common working orientation.calculateEdgeData() 会先通过累计梯度判断边缘更偏水平还是更偏垂直,然后把 ROI 归一到统一的工作朝向。Bin still supports Manual entry; when enabled, the value is clamped into [0.01, 0.5].Bin 仍然支持 Manual 输入;启用后,该数值会被夹到 [0.01, 0.5] 区间内。center ± 0.25 * ROI short-side pixels, but never go finer than 0.125.中心 ± 0.25 * ROI 短边像素数 的范围内,选择“不会产生空箱”的最细 bin,但不会细于 0.125。lsfFull using a centered finite difference.lsfFull。EdgeData object contains the ESF/LSF pair, bin size, orientation, and fitted edge geometry, which is enough for later averaging and frequency-domain analysis.EdgeData 对象包含 ESF/LSF、bin size、方向以及拟合好的边缘几何,这已经足够供后续做平均与频域分析。computeSFR() WorkscomputeSFR() 的具体工作方式computeSFR() accepts one or more EdgeData samples, so the modal can accumulate multiple ROIs and average them into one result.computeSFR() 接受一个或多个 EdgeData 样本,因此这个面板可以累积多个 ROI 并把它们平均成一个结果。4096 and a common output frequency grid with 501 points.4096 的 FFT,并建立一个含 501 个点的统一输出频率轴。lp/mm; otherwise they remain in cy/px.lp/mm;否则就保持在 cy/px。2x Nyquist internally, while the UI can later choose whether to show the normal range or the extended range.2x Nyquist,而界面层之后再决定是只显示常规范围还是扩展范围。computeSFR().computeSFR()。Line Pair view in the plot modal is not a separate measurement pipeline; it samples the current MTF curve at fixed spatial frequencies such as 10 / 20 / 40 / 80 lp/mm once pixel size is known.Line Pair 视图并不是一条独立测量流水线;它是在已知像元尺寸之后,从当前 MTF 曲线上读取 10 / 20 / 40 / 80 lp/mm 等固定空间频率处的数值。computeSFR() locates the LSF peak and estimates a width using the points where LSF falls below 20% of that peak.computeSFR() 会先找到 LSF 峰值,然后通过 LSF 下降到峰值 20% 以下的位置估计一个宽度。Deshading is enabled, the function performs a linear detrend on the LSF tails outside an exclusion band around the peak.Deshading,函数就会在峰值附近排除一段区域,然后对两侧尾部做线性去趋势。Limit Fit is enabled in the UI, the tail detrend uses only a bounded fitting width; otherwise it uses all eligible tail samples.Limit Fit,尾部去趋势就只会使用有限宽度的拟合区;否则会使用所有符合条件的尾部样本。Jiang's official NR, which is the current auto-radius mode. Turning it off switches to manual radius control.Jiang's official NR,它就是当前的自动半径模式;关闭后则切换到手动半径控制。Official NR toggle, and the normal batch-workflow path treats NR as off.Official NR 开关,常规批处理流程会把 NR 按关闭处理。Deshading is now shared between the left workflow panel and the embedded core. Toggling it also refreshes auto-measurement labels, explain runs, and the point-set / plot export data.Deshading 现在在左侧工作流面板和嵌入式核心之间共享;切换它时,也会同步刷新自动测量标签、explain 结果以及点集 / 绘图导出数据。0.0。Hann On is enabled, a Hann window is multiplied into the cropped LSF before the FFT.Hann On,则会在 FFT 之前先把 Hann 窗乘到裁剪后的 LSF 上。PTF toggle is intentionally disabled because that presentation path is considered not final yet even though the lower-level computation still exists.PTF 开关被有意设为不可用,因为这条展示路径目前被视为尚未定稿,尽管底层计算仍然存在。computeSFR() searches for the first crossing where the MTF falls from above 0.5 to below 0.5.computeSFR() 会寻找第一处从高于 0.5 掉到低于 0.5 的交点。MTF50 value is then linearly interpolated between those two neighboring samples.MTF50。Pixel Pitch changes the x-axis unit from cy/px to lp/mm, and Image Height enables an additional LW/PH style derivation from the measured MTF50.Pixel Pitch 会把横轴单位从 cy/px 转成 lp/mm,而 Image Height 则允许在 MTF50 基础上进一步推导出 LW/PH 风格指标。Bin box shows the current oversampling step and warns when the automatic bin reaches its upper limit, which the UI interprets as a hint that the ROI may be too small.Bin 区块会显示当前的过采样步长;如果自动 bin 已经顶到上限,界面会把它解释为“ROI 可能过小”的提示。G-Only is shown only for Bayer-like scalar data; in three-plane mode that control is replaced by explicit source selection.G-Only 只会在 Bayer 风格的标量数据上出现;一旦进入三平面模式,这个开关就会被明确的数据源选择控件替代。Add Current ROI appends another edge sample to the current SFR stack instead of replacing the existing result.Add Current ROI 不是覆盖当前结果,而是把新边缘样本继续追加到当前 SFR 样本堆里。Export CSV writes Frequency, MTF, Phase columns, while Copy Pos/MTF50 copies the ROI center and current MTF50 in a compact tuple form.Export CSV 会写出 Frequency, MTF, Phase 三列,而 Copy Pos/MTF50 会把 ROI 中心和当前 MTF50 以紧凑 tuple 形式复制出去。SfrModal.tsx contains a forward optical MTF model with parameters such as aperture, olpfSeparationPx, fillFactor, coreSigmaPx, haloSigmaPx, haloWeight, wavelengthUm, and rolloff.SfrModal.tsx 内置了一套正向光学 MTF 模型,参数包括 aperture、olpfSeparationPx、fillFactor、coreSigmaPx、haloSigmaPx、haloWeight、wavelengthUm 和 rolloff。7 restarts and 320 iterations per restart, seeded by the current UI parameter values plus random jitter for restart diversity.7 次重启、每次 320 轮迭代;其初值来自当前界面参数,并在重启时加入随机抖动以提升搜索多样性。fitMinFreq and fitMaxFreq, and the modal refuses fitting if fewer than 10 MTF samples remain inside the chosen interval.fitMinFreq 和 fitMaxFreq 约束;如果所选区间里剩下的 MTF 采样点少于 10 个,弹窗会拒绝执行拟合。autoDetectAndComputeSFR() in sfrProcessor.ts is the batch-style auto-detection path.sfrProcessor.ts 里的 autoDetectAndComputeSFR() 就是批量风格的自动检测路径。10x10 blocks, computes a Sobel-like local gradient from the RGBA preview, and keeps only blocks whose gradient magnitude and angle fall inside user-provided thresholds.10x10 的 block 扫描渲染后的图像,用类似 Sobel 的局部梯度从 RGBA 预览中求边缘,并只保留那些梯度强度和角度落在用户阈值范围内的 block。0 to 90 effective-angle measure so that near-horizontal and near-vertical edge families can be filtered symmetrically.0 到 90 的有效角度空间里,这样接近水平和接近垂直的边缘就能被对称地筛选。15 degrees or the wraparound equivalent.15 度或满足绕回等价条件。calculateEdgeData() plus computeSFR() pipeline on each candidate ROI and returns only those groups that successfully produce a numeric mtf50.calculateEdgeData() 加 computeSFR() 流程,并只保留那些成功得到数值型 mtf50 的 group。PTCModal.tsx is a large self-contained analysis workstation for photon-transfer style data, not just a chart widget.PTCModal.tsx 是一个大型的自包含分析工作站,用于处理光子转移风格数据,而不只是一个画图控件。PTCPoint, which stores channel, mean, std, and optional file or grid provenance fields.PTCPoint,里面保存了 channel、mean、std,以及可选的文件来源或网格来源字段。Noise, SNR, and Linear, which means one imported dataset can be reinterpreted through multiple plotting lenses.Noise、SNR 和 Linear,也就是说同一批导入数据可以被用多种绘图视角重新解释。default, top3, raw), visible-channel gating, manual black-level overrides, saturation picking, fit-range selection, and export styling on top of the same base points.default、top3、raw)、通道可见性、手动黑电平覆盖、饱和点选择、拟合区间选择和导出样式。baseData, downsampled display groups, and a fittingDataset separately, which is an important design choice.baseData、用于显示的降采样分组,以及 fittingDataset,这是一个很关键的设计选择。dominantChannel concept is used throughout the fitting and derived-statistic pipeline, because many downstream values such as gain and DR are defined against the channel judged most representative or saturating.dominantChannel 这个概念贯穿整个拟合与派生统计流程,因为后续很多值,比如增益和动态范围,都是相对于被认为最有代表性或最先饱和的那个通道来定义的。baseData, which makes the system more robust to sparse channel-specific datasets.baseData,这让系统在某个通道数据过稀时仍能工作。variance = a + b * signal + c * signal^2.variance = a + b * signal + c * signal^2。a maps to read-noise variance, b maps inversely to gain, and c maps to PRNU energy.a 对应读出噪声方差,b 与增益成反比,而 c 对应 PRNU 能量。a, b, and c to be fixed by parameter locks.a、b、c 中的任意子集固定住。StackingModal.tsx is the operator console for a formula-driven multi-frame processing engine.StackingModal.tsx 是一个面向公式驱动多帧处理引擎的操作台。A, B, C, and then a textual formula decides how they are combined.A、B、C 这样的符号标识,再由一条文本公式决定它们如何组合。processStacking(...).processStacking(...)。dng16 or RGB-oriented jdngf32, and that choice changes not only file format but also the legal internal data path.dng16,也可以是面向 RGB 的 jdngf32;这个选择改变的不只是文件格式,还会改变内部允许的数据路径。processStacking() begins by tokenizing the user formula, converting it to RPN, and collecting the exact image identifiers actually referenced by the expression.processStacking() 会先对用户公式做词法切分,再转成逆波兰表达式,并提取出这个表达式真正引用到的图像标识符。RawSlot with dimensions, channel count, CFA pattern, original mask, and float work buffer.RawSlot,其中包含尺寸、通道数、CFA 模式、原始掩码和浮点工作缓冲区。processRawDataOnly, while ordinary images can go through processStandardImage, so the stacker can operate on more than one input class.processRawDataOnly,而普通图像则可以走 processStandardImage,因此这个堆栈器并不只面向单一输入类型。align1, align2, or align3.align1、align2 或 align3。align1 is described as strict HDR+ style block matching.align1 被描述为严格的 HDR+ 风格块匹配。align2 is the dense-flow style path with a robustness threshold.align2 是带有稳健阈值的密集光流风格路径。align3 is the most advanced path and can be either ecc or apap, both of which depend on OpenCV.align3 是最高级的路径,可以选择 ecc 或 apap,两者都依赖 OpenCV。findTransformECC.findTransformECC 估计变换矩阵。evalRPN(...) computes the user expression in the float domain and returns both the merged data and a source map.evalRPN(...) 会在浮点域里计算用户表达式,并同时返回合并后的数据以及一张 source map。jdngf32, the result is first converted through a drizzle-style RGB kernel approximation, then output black level is added, and finally the data is packed into a custom Float32 JDNG container.jdngf32,结果会先经过一种 drizzle 风格的 RGB kernel 近似,再加上输出黑电平,最后被打包进自定义的 Float32 JDNG 容器。dng16, the result must remain single-channel mosaic data; otherwise the processor throws and asks the user to use Float32 JDNG instead.dng16,结果就必须保持单通道马赛克数据;否则处理器会直接报错,并要求用户改用 Float32 JDNG。dng16 packing is done through Pyodide with a Python DNG packer, which mirrors the project’s broader pattern of mixing browser-side JS with targeted Python serialization helpers.dng16 封装是通过 Pyodide 调用 Python DNG 打包器完成的,这延续了整个项目“浏览器端 JS 加定向 Python 序列化辅助”的总体风格。App.tsx, where the current session can lazily acquire or restore a PsDocument.App.tsx 统一调度,当前 session 会在这里按需创建或恢复一个 PsDocument。App.tsx also owns PS-specific history state, transient painting state, preview caches, GPU renderer fallbacks, and the event handlers that bridge UI gestures into document mutations.App.tsx 同时还掌管 PS 专属历史状态、临时绘画状态、预览缓存、GPU 渲染回退策略,以及把 UI 手势桥接成文档变更的那些事件处理器。psDocument.ts is the pure document engine, but App.tsx is the runtime shell that makes the engine interactive.psDocument.ts 是纯文档引擎,而 App.tsx 则是让这个引擎真正可交互的运行时外壳。createInitialPsDocument() creates a document with dimensions, a global adjustment layer, empty masks, empty guides, and a seeded history entry.createInitialPsDocument() 会创建一个带尺寸、全局调整图层、空蒙版、空参考线以及初始历史条目的文档。PS_GLOBAL_LAYER_MASK_ID and is conceptually applied before all mask-bound layers.PS_GLOBAL_LAYER_MASK_ID 标识,在概念上它会先于所有绑定到蒙版的图层生效。addMaskWithLayer() and ensureLayerForMask() keep the common one-mask-one-layer pattern easy to maintain.addMaskWithLayer() 和 ensureLayerForMask() 这类辅助函数会把常见的一蒙版一图层模式维持得很顺手。paintSelectedMask() directly modifies the selected mask alpha in a local dab region, while appendBrushStrokeItemToSelectedMask() records brush strokes as reusable mask items.paintSelectedMask() 会在局部笔刷范围内直接修改当前选中蒙版的 alpha,而 appendBrushStrokeItemToSelectedMask() 则会把笔刷轨迹记录成可复用的 mask item。addEllipseMaskWithLayer() creates or reuses the selected mask and appends an ellipse item with center, radii, rotation, feather, and add/subtract mode.addEllipseMaskWithLayer() 会创建或复用当前蒙版,并追加一个包含中心、半径、旋转、羽化以及 add/subtract 模式的椭圆 item。PsEditorPanel.tsx exposes all of this through expandable mask lists, item lists, overlay toggles, layer controls, mixer-band pickers, and per-channel curve editors.PsEditorPanel.tsx 通过可展开的蒙版列表、item 列表、叠加层开关、图层控制、混色器频段选择器和分通道曲线编辑器把这些能力全部暴露给用户。App.tsx maintains a separate history stack per session, and each history entry stores a deep-cloned document plus transform-operation metadata.App.tsx 会为每个 session 维护独立的历史栈,而且每个历史条目都会保存一份深拷贝文档以及对应的变换操作元数据。updateCurrentPsDocument(...) is the central mutation gateway; if history tracking is enabled, it appends a new history entry, applies limits, and injects history metadata back into the live document.updateCurrentPsDocument(...) 是中心化的文档变更入口;当启用历史追踪时,它会追加新历史条目、执行长度限制,并把历史元数据重新写回当前文档。composePsDocumentPreviewDirty() can update only the dirty rect instead of recomposing the whole image.composePsDocumentPreviewDirty() 就能只更新脏矩形,而不必整张图完全重算。materializePsViewDocument() in App.tsx shows the intended order: upright transform, flips, then view rotation.App.tsx 里的 materializePsViewDocument() 很清楚地展示了预期顺序:先 upright 变换,再翻转,最后才是视图旋转。rawProcessor.ts contains several render families, and the most important distinction is between standard LibRaw-like rendering and the project’s own zero-dependency render families.rawProcessor.ts 内部有多条渲染家族,最重要的区别在于 standard 的类 LibRaw 渲染路径,与项目自己实现的 zero-dependency 渲染家族之间的差异。App.tsx, this split matters operationally because GPU preview/export paths are used mainly for zero-dependency modes, while standard mode is treated as a distinct decode logic.App.tsx 里,这种分裂在运行上非常重要,因为 GPU 预览和导出主要服务于 zero-dependency 模式,而 standard 模式则被视为一套独立的解码逻辑。renderRawWithOfficial16() uses joraw.js or joraw.wasm through the JoRaw class and asks that runtime to perform a 16-bit decode.renderRawWithOfficial16() 会通过 JoRaw 类调用 joraw.js 或 joraw.wasm,让这套运行时执行 16 位解码。customMatrix.customMatrix 时启用的自定义颜色矩阵路径。standard mode can preserve a LibRaw-like look that is intentionally distinct from the project’s custom renderers.standard 模式能够保留一种接近 LibRaw 的外观风格,并与项目自定义渲染器保持有意区分。renderZeroDependencyFromRawImage() is the simplest path: it interprets each mosaic site independently, subtracts black level, applies exposure and simple Bayer-position white balance, and displays the result as grayscale.renderZeroDependencyFromRawImage() 是最简单的路径:它逐个解释马赛克采样点,减去黑电平,应用曝光和基于 Bayer 位置的简单白平衡,然后把结果以灰度形式显示出来。renderBasicColorZeroDepFromRawImage() is the project’s own full-color path, including normalization, white balance, optional RGGB or BGGR interpretation, a bilinear or AMAZE-like demosaic choice, and a camera-to-sRGB matrix stage.renderBasicColorZeroDepFromRawImage() 是项目自带的全彩路径,包含归一化、白平衡、可选的 RGGB 或 BGGR 解释、双线性或类 AMAZE 的 demosaic 选择,以及相机到 sRGB 的矩阵阶段。renderAdvancedZeroDepFromRawImage() is the scalar-unmix path, which uses user-provided bl, bg, and fg references to remap each mosaic sample into a common reference brightness domain.renderAdvancedZeroDepFromRawImage() 是 scalar-unmix 路径,它利用用户提供的 bl、bg 和 fg 参考,把每个马赛克采样重映射到统一参考亮度域中。alpha between background and foreground references and then extrapolating outside the calibrated range when needed.alpha,并在需要时对标定范围外进行外推。standard, zero-dependency, zero-dep-color, and advanced-zero-dep.standard、zero-dependency、zero-dep-color 和 advanced-zero-dep 之间会呈现出非常不同的结果。Ctrl+S is now a quick-save path for the current rendered result and exits through JDNG rather than only invoking the older generic save-modal flow.Ctrl+S 会把当前渲染结果走一条 JDNG 快速保存路径,而不是只唤起旧的通用保存弹窗流程。Ctrl+S does today.Ctrl+S 行为的最佳心智模型。standard when you want the closest thing this app has to an official RAW developer look and do not mind depending on the JoRaw runtime.standard。zero-dependency when you want raw-site brightness inspection without committing to full demosaic color interpretation.zero-dependency。zero-dep-color when you want a full-color result but still want the project’s own demosaic and color pipeline instead of the JoRaw output look.zero-dep-color。advanced-zero-dep when the whole task is built around scalar unmixing, foreground and background references, or measurements that need that remapped signal domain.advanced-zero-dep。DngExportModal.tsx is one of the most direct places in the app for black-level micro-adjustment because it lets you write a fresh 16-bit DNG container with explicit manual black levels.DngExportModal.tsx 是整个应用里最直接的黑电平微调入口之一,因为它允许你用显式手动黑电平重新写出一个新的 16 位 DNG 容器。16bit Black Level (Manual Fill) field accepts either one number or four numbers.16bit Black Level (Manual Fill) 这个输入框既可以接受一个数,也可以接受四个数。BlackLevel tag together with BlackLevelRepeatDim = [2, 2], so they become metadata-level black offsets rather than just display-side offsets.BlackLevelRepeatDim = [2, 2] 一起被写入 BlackLevel 标签,因此它们是元数据层面的黑电平偏置,而不仅仅是显示层偏置。Bit Shift and Offset (+) are separate from black-level tuning and should not be confused with it.Bit Shift 和 Offset (+) 与黑电平微调是两回事,不应混为一谈。Bit Shift scales the raw code range upward into 16-bit container space, while Offset (+) adds a literal constant after that shift.Bit Shift 的作用是把原始码值范围放大到 16 位容器尺度,而 Offset (+) 则是在位移之后再直接加一个常数。Black Level changes the DNG metadata meaning, but Offset (+) changes the stored pixel values themselves.Black Level 改的是 DNG 元数据层的解释,而 Offset (+) 改的是实际写入的像素值本身。Black Level first, and only use Offset (+) when you intentionally want to move the entire stored signal up or down.Black Level;只有在你明确想把整张图的实际存储信号整体抬高或压低时,才去用 Offset (+)。Width (Read Only) and Height (Read Only) are inspection fields only; they help you confirm you are packaging the intended frame dimensions.Width (Read Only) 和 Height (Read Only) 只是只读检查项;它们帮助你确认当前打包的确实是你想要的那张尺寸。Bit Shift (<<) multiplies the raw codes by 2^shift before DNG packing.Bit Shift (<<) 会在打包前把原始码值乘以 2^shift。Offset (+) adds a constant after bit shifting and before clipping to the 16-bit range.Offset (+) 会在位移之后、裁切到 16 位范围之前再加上一个常数。Pattern chooses the CFA pattern written into the DNG metadata.Pattern 决定写入 DNG 元数据的 CFA pattern。16bit Black Level (Manual Fill) fills the exported DNG BlackLevel tag and is the main black-level micro-tuning control.16bit Black Level (Manual Fill) 用来填充导出 DNG 的 BlackLevel 标签,是最主要的黑电平微调控件。Color Matrix (XYZ to Raw - 9 Values) writes the exported color matrix, and the camera dropdown can preload known matrices from cameraMatrices.ts.Color Matrix (XYZ to Raw - 9 Values) 用于写入导出时的颜色矩阵,而相机下拉框则可以从 cameraMatrices.ts 中预载已知矩阵。Enable Watermark switches on the watermark path, which actually edits the pixel buffer by adding watermarkDepth where the text mask is white.Enable Watermark 会启用水印路径,这条路径会在文字遮罩为白的位置真正修改像素缓冲区,并加上 watermarkDepth。Size, Depth, Center X, and Center Y only affect the watermark path.Size、Depth、Center X 和 Center Y 只影响水印路径。Batch Export opens a hidden file input, then loops over selected files and applies the current modal settings to every one of them.Batch Export 会打开隐藏文件选择框,然后把当前弹窗里的设置批量应用到每一个选中文件。Generate DNG runs the current single-image export immediately for the currently loaded rawImageData.Generate DNG 会立刻对当前已加载的 rawImageData 执行单张导出。TOOLS opens the multi-lab dropdown and is the main launcher for PS Mode, DR Lab, Color Lab, SFR Lab, Stack Lab, Save Z8, pattern DNG generation, PTC generation, and external contour tools.TOOLS 会打开多实验室下拉菜单,是 PS Mode、DR Lab、Color Lab、SFR Lab、Stack Lab、Save Z8、测试图 DNG 生成、PTC 生成和外部 contour 工具的主发射器。PS Mode in that dropdown switches the app into the local-adjustment editor and turns off other mutually exclusive lab modes.PS Mode 会把应用切到局部调整编辑器,并关闭其他互斥实验室模式。DR Lab, Color Lab, SFR Lab, and Stack Lab are mode toggles, not one-shot actions.DR Lab、Color Lab、SFR Lab 和 Stack Lab 都是模式切换,不是一次性动作。Save Z8 opens the rescue-oriented Nikon Z8 workflow.Save Z8 会打开面向 Nikon Z8 修复的专用流程。Generate Pattern DNG creates a synthetic test-pattern DNG.Generate Pattern DNG 用来生成测试图案 DNG。Generate PTC opens the file input for CSV-based PTC generation.Generate PTC 会打开用于 PTC 的 CSV 输入入口。Load Image opens another dropdown with two choices.Load Image 还会再打开一个二级下拉菜单,其中有两种加载方式。Load Image (Direct) loads the chosen file directly.Load Image (Direct) 会直接加载所选文件。Convert to Adobe DNG & Load uses the converter-assisted path and therefore depends on JiangBridge plus Adobe DNG Converter being available.Convert to Adobe DNG & Load 走的是转换后再加载路径,因此依赖 JiangBridge 和 Adobe DNG Converter 可用。EXIF opens the metadata viewer for the current file.EXIF 会打开当前文件的元数据查看器。About/Tools opens the about-and-resources modal.About/Tools 会打开关于与资源入口弹窗。教程 opens the external tutorial page.教程 会打开外部教程页面。Hide Panel or Show Panel toggles the main control sidebar.Hide Panel 或 Show Panel 用于切换主控制侧栏显示。DR Lab On, Color Lab On, FFT Lab On, SFR Lab On, and PS Mode On are quick status indicators and, for most labs, quick off toggles.DR Lab On、Color Lab On、FFT Lab On、SFR Lab On 和 PS Mode On 的小状态条既是状态提示,也是多数实验室的快速关闭开关。Apply Settings / Render applies the current display settings through the zero-dependency path and is the main “commit my current display-control edits” button.Apply Settings / Render 会通过 zero-dependency 路径应用当前显示设置,是最主要的“提交我现在这些显示参数”的按钮。Try Official Render opens the standard-render options modal and then renders through the official-style path instead of the analysis-first custom path.Try Official Render 会打开 standard render 选项弹窗,然后改走官方风格渲染路径,而不是分析优先的自定义路径。Generate 16bit DNG opens the manual DNG export workstation.Generate 16bit DNG 会打开手动 DNG 导出工作站。Reset Defaults (Local) resets the local UI fields in the sidebar without promising to reset every persisted application state.Reset Defaults (Local) 会重置侧栏里的本地 UI 字段,但并不意味着会重置所有持久化应用状态。RGGB and BGGR choose Bayer interpretation.RGGB 和 BGGR 用来选择 Bayer 解释方式。Bilinear and AMaZE (Default) choose the color demosaic method for the basic-color zero-dependency renderer.Bilinear 和 AMaZE (Default) 用来选择 basic-color zero-dependency 渲染器的彩色 demosaic 方法。Raw Mosaic renders the checkerboard-like grayscale inspection view.Raw Mosaic 会渲染棋盘风格的灰度检查视图。Basic Color renders the project’s custom color pipeline.Basic Color 会渲染项目自带的彩色管线。Demosaic Method chooses the algorithm passed into the JoRaw/official path.Demosaic Method 决定传给 JoRaw/official 路径的算法。Spot WB computes white-balance gains from the current ROI while considering the current color matrix.Spot WB 会基于当前 ROI 计算白平衡增益,并把当前颜色矩阵考虑进去。[about] beside black level opens the black-level info modal and can redirect you to the camera black-level database.[about] 会打开黑电平说明弹窗,并可跳转到相机黑电平数据库。RUN UNMIXING (ADV ZERO-DEP) executes scalar unmixing with the current BL/BG/FG inputs.RUN UNMIXING (ADV ZERO-DEP) 会用当前的 BL/BG/FG 输入执行 scalar unmixing。Pick next to BG or FG fills those fields from the current ROI mean values.BG 或 FG 旁边的 Pick 会用当前 ROI 的均值自动填充这些输入框。Load Image A, Load Image B, and Generate Diff & Load form the pair-difference path.Load Image A、Load Image B 和 Generate Diff & Load 组成成对差分路径。Batch Diffs (Auto Download) runs multiple pair differences in batch.Batch Diffs (Auto Download) 用于批量执行多组成对差分。Select Sequence Files in Stack FFT (Avg PSD) starts the stack spectral workflow.Stack FFT (Avg PSD) 里的 Select Sequence Files 会启动堆栈频谱流程。Cross-Compensation Calc opens the sigma calculator.Cross-Compensation Calc 会打开 sigma 计算器。General Stack opens the general stacking workstation.General Stack 会打开通用堆栈工作站。Generate Test Pic creates the synthetic DR test pattern.Generate Test Pic 会生成合成动态范围测试图。Mark Corners begins the four-corner marking workflow for DR calibration.Mark Corners 会启动四角点标记流程,用于 DR 标定。Reuse Last & Batch opens the batch reuse menu built on the most recent marker layout.Reuse Last & Batch 会打开基于最近一次标记布局的批处理复用菜单。Convert Format (.txt -> .csv) is a utility converter for data format cleanup.Convert Format (.txt -> .csv) 是一个用于整理数据格式的辅助转换按钮。Start Marking begins the ColorChecker marking workflow.Start Marking 会启动 ColorChecker 标记流程。Source chooses among Unmix / BW, RGGB Raw, and Three-plane.Source 用于在 Unmix / BW、RGGB Raw 和 Three-plane 之间切换。Encoding chooses Auto, Linear, or sRGB. Auto is only selectable when the app can infer the source encoding with enough confidence.Encoding 用于选择 Auto、Linear 或 sRGB。只有当程序能较可靠判断当前源编码时,Auto 才可选。RGGB Raw, the green-phase selector offers Default, 1, and 2. Default follows the RAW CFA pattern, 1 means the top-left / bottom-right green phase, and 2 means the top-right / bottom-left green phase.RGGB Raw 模式下,绿色相位选择器提供 Default、1 和 2。Default 跟随 RAW 自带 CFA pattern,1 表示左上 / 右下绿相位,2 表示右上 / 左下绿相位。Output Polar Point Sets opens the dedicated point-set / plot modal for current auto-detected edges.Output Polar Point Sets 会为当前自动检测到的边打开专门的点集 / 绘图弹窗。Auto Detect runs block detection and generates auto-measured edges. Clear Auto removes the current auto-detection result.Auto Detect 会运行块检测并生成自动测量边;Clear Auto 会清掉当前自动检测结果。Auto Detection Tuning controls candidate screening and edge-measurement region settings. Lower thresholds usually increase recall and also increase false positives; Sample Half Width Ratio directly changes the per-edge measurement strip width.Auto Detection Tuning 用于控制候选筛选和边缘测量区域设置。阈值调低通常会提高检出率,但也会增加误检;Sample Half Width Ratio 会直接改变每条边的测量条带宽度。Explain Selected ROI explains why the currently selected ROI passed or failed. Clear Explain removes the current explanation overlay and card.Explain Selected ROI 用于解释当前选中 ROI 为什么通过或失败;Clear Explain 会清除当前 explain 叠加层和结果卡。Standard Chart starts the four-corner calibration flow for batch chart work. During calibration it changes to Corner 1/4, Corner 2/4, and so on.Standard Chart 会启动批量图卡工作里的四角校准流程;在校准过程中,它会依次显示为 Corner 1/4、Corner 2/4 等状态。Manual Marking turns repeated manual ROI marking on or off. When active, the canvas stays in batch-marking mode.Manual Marking 用于打开或关闭重复手动 ROI 标记;启用后,画布会停留在批量标记模式。Compute Batch measures all currently marked ROIs using the current SFR source settings. Clear ROIs clears the marked ROI set.Compute Batch 会使用当前 SFR 源设置去测量所有已标记 ROI;Clear ROIs 会清空这些标记。Deshading checkbox is now shared with the embedded expert core and the auto plot/export path. Toggling it updates all of those together.Deshading 复选框现在和嵌入式专家核心、自动绘图/导出路径共享;切换它时,这几处会一起更新。Green Only only matters for non-fixed paths; in RGGB Raw it is shown as fixed because that source family is already defined around green-sample measurement.Green Only 只在非固定路径里有实际意义;在 RGGB Raw 中它会显示为固定状态,因为这条输入路径本来就是围绕绿采样测量定义的。Templates, Export CSV saves the current ROI layout and Import CSV restores a previously saved layout.Templates 区里,Export CSV 会保存当前 ROI 布局,Import CSV 会恢复之前保存的布局。Bin sets the oversampling step. The adjacent Manual checkbox enables manual entry; otherwise the processor chooses bin size automatically for that manual ROI measurement.Bin 用于控制过采样步长;旁边的 Manual 复选框用于启用手动输入,否则处理器会为那次手动 ROI 测量自动选择 bin。Deshading checkbox controls LSF tail detrending for the expert measurement panel, and because deshading is now shared, it also follows the left-panel state.Deshading 复选框用于控制专家测量面板的 LSF 尾部去趋势;由于 deshading 现在是共享的,它也会跟随左侧面板状态。Limit Fit narrows the width used by that tail detrend fit.Limit Fit 会限制尾部去趋势拟合所使用的宽度。Three-plane, 3P Source now starts from None. You must choose Luma, R, G, or B before Add Current ROI becomes available.Three-plane 模式下,3P Source 现在从 None 开始;必须先选择 Luma、R、G 或 B,Add Current ROI 才会可用。Hann On applies a Hann window before FFT. 2x Freq extends the displayed frequency range. Show PTF (temp disabled) is currently intentionally unavailable in normal UI use.Hann On 会在 FFT 前乘上 Hann 窗;2x Freq 会扩展显示频率范围;Show PTF (temp disabled) 当前仍然是刻意不可用的普通 UI 入口。Jiang's official NR switches between adaptive radius selection and manual radius control inside the embedded expert panel.Jiang's official NR 用于在嵌入式专家面板里切换自适应半径选择与手动半径控制。Pick Edge Line arms two-point edge picking on the canvas. Once two points are chosen, the current manual ROI will use that line geometry instead of pure auto edge fitting.Pick Edge Line 会让画布进入两点选边模式;选完两点后,当前手动 ROI 会使用这条线的几何信息,而不是完全依赖自动拟合。Add Current ROI appends the current manual ROI sample. In three-plane mode, the same button becomes Choose 3P Source when no channel/luma choice has been made yet.Add Current ROI 会把当前手动 ROI 样本追加进去;在三平面模式下,如果还没有选 channel/luma,同一个按钮会显示为 Choose 3P Source。Copy Pos/MTF50 copies ROI center and MTF50. Export CSV exports the current frequency-domain result. Clear clears the accumulated ROI set and current result.Copy Pos/MTF50 会复制 ROI 中心坐标和 MTF50;Export CSV 会导出当前频域结果;Clear 会清空已累积的 ROI 集合和当前结果。Show Model Line overlays the optical forward model. The small dot locks beside model parameters decide whether Auto Fit is allowed to move those parameters.Show Model Line 会叠加显示光学正向模型;模型参数旁边的小圆点锁决定 Auto Fit 是否允许改动对应参数。Auto Fit runs the model fit on the selected frequency interval using the currently unlocked parameters.Auto Fit 会在选定频段上使用当前未锁定参数运行模型拟合。Polar, Image X, and Image Y switch the horizontal-axis definition.Polar、Image X 和 Image Y 用于切换横轴定义方式。Polar, the inner mode switch chooses between MTF50 and 线对. 线对 additionally requires Pixel Size (um) because it samples the MTF curve at fixed lp/mm frequencies.Polar 模式下,内部模式开关可以在 MTF50 和 线对 之间切换;其中 线对 还要求填写 Pixel Size (um),因为它需要在固定 lp/mm 频率处读取 MTF 曲线数值。Pick Center On Canvas starts center picking. Reset To Image Center returns the field center to the image center. 确认中心 confirms the currently chosen center and redraws the plot.Pick Center On Canvas 会启动中心点选取;Reset To Image Center 会把场中心重置回图像中心;确认中心 会确认当前中心并重新绘图。Tester and Lens are free-text fields stored locally and shown in the plot/export result.Tester 和 Lens 是会保存在本地的自由文本输入框,并会显示在绘图 / 导出结果上。Copy Visible Sets copies the currently visible point sets. In Polar + MTF50, the dialog also offers separate Radial / 法向 and Tangential / 切向 CSV text blocks.Copy Visible Sets 会复制当前可见点集;在 Polar + MTF50 模式下,弹窗还会额外提供分开的 Radial / 法向 与 Tangential / 切向 CSV 文本块。点列质量筛选 enables the quality filter used by the plot modal before binning/curve display. 画折线 controls whether the chart draws connecting lines on top of the points.点列质量筛选 用于开启绘图弹窗在分箱 / 画线之前使用的质量筛选;画折线 用于控制图表是否在点上方绘制连接折线。Export JPG exports the current plot view with the current mode, center, tester/lens labels, watermark, and line/scatter settings.Export JPG 会按当前模式、当前中心、tester/lens 标签、水印以及折线 / 散点设置来导出当前图表视图。Noise, SNR, and Linear (PTC) switch the chart between the three main interpretations of the same measurement dataset.Noise、SNR 和 Linear (PTC) 用来在同一批测量数据的三种主解释视图之间切换。Top3 style filtering keeps a lighter rendering subset, while Raw aims to show the rawest point cloud behavior.Top3 之类的过滤会保留更轻量的显示子集,而 Raw 则更倾向于显示最原始的点云行为。Select workflow lets you pick min and max fit bounds directly from the chart by clicking points.Select 流程允许你直接从图上点选拟合下界和上界。Recalculate reruns the constrained fit using current black level, locks, and range settings.Recalculate 会基于当前黑电平、锁定状态和区间设置重新执行受约束拟合。Export PTC JPG opens the export settings panel instead of immediately downloading.Export PTC JPG 不会立刻下载,而是先打开导出设置面板。Glow in that panel enables enlarged fluorescent point rendering in the exported JPG.Glow 会启用放大的荧光点导出样式。Min and Max blue fit handles on the chart are also part of the button-level interaction model, even though they are not HTML buttons.Min 和 Max 蓝色拟合手柄虽然不是 HTML 按钮,但同样属于按钮级交互的一部分。Load Files brings frames into the symbolic file map used by the formula engine.Load Files 会把帧载入供公式引擎使用的符号文件映射。Clear clears the current file map and status log.Clear 会清空当前文件映射和状态日志。Auto Formula generates an average-style formula from the currently loaded files.Auto Formula 会根据当前已加载文件自动生成一条平均风格公式。Align1, Align2, and Align3 are mutually exclusive alignment family toggles.Align1、Align2 和 Align3 是互斥的对齐家族开关。Align3, ecc and apap choose the high-end alignment backend.Align3 内部,ecc 和 apap 用于选择高阶对齐后端。Process & Save DNG runs the whole stack pipeline and writes dng16.Process & Save DNG 会跑完整条堆栈流水线并写出 dng16。Process & Save Float32 JDNG runs the same front half but exits through the float JDNG path instead.Process & Save Float32 JDNG 会走相同的前半段流程,但最后从浮点 JDNG 路径退出。Undo steps one history entry backward in the current session’s PS document.Undo 会把当前 session 的 PS 文档回退一个历史条目。Export Flow JSON writes the PS workflow state for reuse or inspection.Export Flow JSON 会导出 PS 工作流状态,供复用或检查。Import Flow restores a saved workflow description.Import Flow 会恢复保存过的工作流描述。Export PNG and Export JPEG export the current composed PS result.Export PNG 和 Export JPEG 会导出当前合成后的 PS 结果。+ Mask creates a new mask-plus-layer pair.+ Mask 会创建一对新的蒙版与图层。Brush Add/Subtract chooses whether new brush paint grows or removes the selected mask.Brush Add/Subtract 决定新的笔刷涂抹是增加还是减去当前蒙版。Ellipse Tool switches into ellipse-creation mode.Ellipse Tool 会切换到椭圆创建模式。Cancel Ellipse exits ellipse creation without committing a new item.Cancel Ellipse 会退出椭圆创建而不提交新 item。PS Upright / Crop, Flip Left-Right and Flip Up-Down apply horizontal or vertical flips.PS Upright / Crop 区域,Flip Left-Right 和 Flip Up-Down 会施加水平或垂直翻转。Crop To ROI crops to the currently visible PS ROI rather than raw-file coordinates.Crop To ROI 会裁到当前可见的 PS ROI,而不是 RAW 原始坐标。+ H Guide and + V Guide add horizontal or vertical guides.+ H Guide 和 + V Guide 会新增水平或垂直参考线。Pick P1, Pick P2, and Cancel Pick are guide endpoint-picking controls.Pick P1、Pick P2 和 Cancel Pick 是参考线端点拾取控制。Delete Guide removes the currently selected guide.Delete Guide 会删除当前选中的参考线。Rotate -90, Rotate +90, and Reset Rotation control the PS canvas rotation state.Rotate -90、Rotate +90 和 Reset Rotation 用来控制 PS 画布旋转状态。Apply Upright (4 Guides) computes and applies a guide-based upright correction when the guide geometry is ready.Apply Upright (4 Guides) 会在参考线几何条件满足时计算并应用基于参考线的拉直校正。Load Lensfun XML loads user-specified Lensfun data, while Apply Lens Correction applies the selected distortion profile.Load Lensfun XML 会载入用户指定的 Lensfun 数据,而 Apply Lens Correction 会把选中的畸变 profile 真正应用到文档上。Load, Convert & Load, and PS toggles change the working session, while most others open modals or labs around it.Load、Convert & Load 和 PS 切换会改变工作 session,而多数其他按钮只是围绕它打开 modal 或实验室。Exposure is the fast global brightness scaling control and is usually the first thing to adjust when the image is not in a readable range.Exposure 是最快的全局亮度缩放控制项,通常在图像亮度不在可读范围时应最先调整。WB Gains changes red and blue scaling relative to green and is mainly a diagnostic or neutralization tool rather than a final color-grading tool.WB Gains 会改变红蓝相对绿色的缩放,更适合做诊断或中性化,而不是最终调色。Black Level is one of the highest-impact controls in the whole app because it affects normalization, ROI statistics, SNR, and several downstream labs.Black Level 是整个应用里影响最大的控件之一,因为它会影响归一化、ROI 统计、SNR,以及多个后续实验室。Subtract Black Level From Stats only changes how ROI means are displayed and interpreted in stats, not the raw source file itself.Subtract Black Level From Stats 只会改变 ROI 均值在统计中的显示与解释方式,并不会改动原始文件本身。Custom Matrix is where camera-to-display color interpretation can be overridden and should be treated carefully because it changes color meaning, not just saturation.Custom Matrix 用于覆盖相机到显示空间的颜色解释,应当谨慎使用,因为它改变的是颜色含义,而不只是饱和度。Apply Settings / Render uses the current local values, so make a habit of finishing edits in this panel before opening measurement tools that depend on the displayed interpretation.Apply Settings / Render 使用的是当前面板里的本地值,因此建议在打开依赖显示解释的测量工具前,先把这一面板的编辑完成。Selection Size defines the default quick-select size and interacts directly with the power-of-two lock setting.Selection Size 定义默认快速选区尺寸,并且会直接受到二次幂锁定设置的影响。Power-of-Two Lock is especially important for FFT and spectral workflows, because it changes not only convenience but also the frequency-analysis geometry.Power-of-Two Lock 对 FFT 和频谱流程尤其重要,因为它改变的不只是操作便利性,还会影响频域分析的几何条件。Center Rect creates a centered ROI of the chosen size.Center Rect 会创建一个位于图像中心、尺寸为当前设定值的 ROI。Full Image turns the entire image into the active ROI.Full Image 会把整张图像直接设为活动 ROI。Bit Shift according to source bit depth first, because all later pixel-domain tuning happens after that scale choice.Bit Shift,因为后续一切像素域微调都是在这个尺度选择之后发生的。Offset (+) sparingly; it is best reserved for explicit container-space pedestal movement rather than normal black-level correction.Offset (+) 应当节制使用;它更适合拿来做容器空间里的整体 pedestal 平移,而不是常规黑电平校正。16bit Black Level when your goal is DNG metadata-level black calibration.16bit Black Level。Color Matrix when you want the exported DNG to carry a known matrix into downstream RAW software.Color Matrix。Input Black Level and Output Black Level are conceptually different.Input Black Level 和 Output Black Level 在概念上是两回事。Input Black Level affects how source slots are normalized for stacking.Input Black Level 会影响源 slot 在堆栈前如何被归一化。Output Black Level affects the pedestal written into the final result.Output Black Level 会影响最终结果写出的 pedestal。++ Range matters only if your formula uses ++.++ Range 只有在你的公式里用了 ++ 时才有意义。Stretch Highlights To Max is a final remapping convenience, not part of the core merge math.Stretch Highlights To Max 属于最终重映射便利项,而不是核心合并数学的一部分。Output Mode decides whether the result must remain mosaic-compatible or may become RGB float data.Output Mode 决定结果是否必须保持马赛克兼容,还是可以变成 RGB 浮点数据。Align3 advanced fields at their defaults and only vary one family of parameters at a time.Align3 的高级字段留在默认值,并且一次只改一类参数。Manual BL, Manual Sat, and target-SNR related fields all affect derived DR or fit interpretations.Manual BL、Manual Sat 以及与目标 SNR 相关的字段都会影响派生 DR 或拟合解释。EXIF first.EXIF。Generate 16bit DNG and export several variants with slightly different 16bit Black Level values.Generate 16bit DNG,导出几份黑电平略有差异的版本。Unmix / BW, RGGB Raw, or Three-plane according to the signal semantics you actually want to measure.Unmix / BW、RGGB Raw 或 Three-plane。RGGB Raw and leave green phase at Default unless you intentionally want to force phase 1 or 2.RGGB Raw 开始,并把绿色相位保持在 Default,除非你是有意想强制切到 1 或 2 相位。Encoding before measuring: use Auto when available, otherwise choose Linear or sRGB explicitly instead of trusting a stale assumption.Encoding:如果 Auto 可用就优先用它,否则请显式选择 Linear 或 sRGB,不要依赖可能已经过时的隐含假设。Pick Edge Line if automatic edge localization seems ambiguous.Pick Edge Line 手动画边。Noise mode.Noise 模式开始。Generate 16bit DNG.Generate 16bit DNG。jdngf32 when you want float-domain postprocessing headroom, and use dng16 when you need mosaic-style compatibility.jdngf32,当你需要马赛克式兼容性时使用 dng16。