[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1VEWYP2G1RJJ445NPDQ1H":3,"skill-same:01M7F1VEWYP2G1RJJ445NPDQ1H":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7F1VEWYP2G1RJJ445NPDQ1H","image-data-utilities",null,"Prepare, validate, convert, and display chest X-ray image inputs while preserving DICOM originals and reporting utility metadata.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: image-data-utilities\ndescription: \"Prepare, validate, convert, and display chest X-ray image inputs\n  while preserving DICOM originals and reporting utility metadata.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# Image-data utilities\n\nUse this skill when a chest X-ray input must be checked, made viewable, or\nhanded between the upload\u002FUI layer and an image-capable tool. It covers the two\nutility tools:\n\n- `DicomProcessorTool` converts a DICOM pixel array to a temporary PNG and\n  returns conversion metadata.\n- `ImageVisualizerTool` validates a JPG\u002FPNG path and returns the path plus\n  display metadata. Its normal `_run` path reports a display result; it does\n  not call the matplotlib rendering method in the current implementation.\n\nThis skill does **not** perform model inference. Route interpretation,\nclassification, segmentation, grounding, or report generation to\n[chest-xray-analysis](..\u002Fchest-xray-analysis\u002FSKILL.md). Route LangGraph\nconstruction to [agent-orchestration](..\u002Fagent-orchestration\u002FSKILL.md), upload\nwidgets, chat history, and Gradio state to\n[web-interface](..\u002Fweb-interface\u002FSKILL.md), and benchmark data preparation to\n[benchmark-evaluation](..\u002Fbenchmark-evaluation\u002FSKILL.md).\n\n## Operating contract\n\n1. Keep the input path and its role explicit: `original_path` is the preserved\n   source used for archival or a tool that explicitly supports that format;\n   `display_path` is a viewable PNG\u002FJPG path for the UI or an image-only tool.\n2. Validate a path before invoking a utility. Use the bundled\n   `scripts\u002Fvalidate_image_input.py` for existence, supported suffix, lightweight\n   file-signature, and optional output-directory checks.\n3. For DICOM, preserve the original file first. Convert a working\u002Fdisplay copy\n   with `DicomProcessorTool`; never replace the original with the generated PNG.\n4. Treat DICOM-derived fields such as `PatientID` and `StudyDate` as sensitive.\n   Pass only the metadata needed by the next step, avoid logging it, and do not\n   claim that conversion anonymizes the source.\n5. Inspect the returned tuple for an `error` key before using `image_path`.\n   Utility failures are data-preparation failures, not evidence about the\n   patient's image.\n\nSee [api-reference.md](references\u002Fapi-reference.md) for exact inputs and\noutputs, [data-formats.md](references\u002Fdata-formats.md) for format and privacy\nrules, [workflows.md](references\u002Fworkflows.md) for path handoffs, and\n[troubleshooting.md](references\u002Ftroubleshooting.md) for recovery actions.\n\n## Choose the path\n\n### Existing PNG\u002FJPG\u002FJPEG\n\n- Validate the file and optional destination directory.\n- Pass the existing image path to `ImageVisualizerTool._run` when a display\n  record is required.\n- Pass that same path to a downstream model tool only when its contract accepts\n  the format. Keep this utility step separate from model-specific preprocessing.\n\n`ImageVisualizerInput` documents JPG and PNG. JPEG is commonly represented by\n`.jpg` or `.jpeg`; do not silently accept an arbitrary suffix merely because a\nreader might open it.\n\n### DICOM\n\n- Validate the original file as DICOM-like input without dumping tags.\n- Call `DicomProcessorTool._run(dicom_path, window_center, window_width)`.\n- If both window parameters are absent, the tool first uses the first value of\n  DICOM `WindowCenter`\u002F`WindowWidth` when present. If either is still absent,\n  it uses a min\u002Fmax scale. If both are present, it clips and scales to uint8.\n- If `RescaleSlope` and `RescaleIntercept` are both present, apply them before\n  windowing or min\u002Fmax scaling (as the tool does).\n- Use returned `image_path` as the display path and retain the original DICOM\n  path as the source path. The metadata also records `original_path` and\n  `output_path` on success.\n- Use the PNG for a model tool that only reads JPG\u002FPNG\u002FPIL\u002Fskimage inputs. A\n  DICOM conversion is not a promise that every model tool can read DICOM.\n\nA caller may supply a positive window width and a clinically appropriate center\nwhen the source values are known. Do not invent window settings to compensate\nfor a malformed file; fix or reroute the input instead.\n\n## Display parameters\n\n`ImageVisualizerTool._run` accepts `image_path`, optional `title`, optional\n`description`, `figsize=(width, height)`, and `cmap=\"rgb\"`. For a grayscale CXR,\nuse a grayscale colormap such as `\"gray\"` when actual rendering is requested.\nThe implementation treats `\"rgb\"` specially and passes other colormap names to\nmatplotlib. If a non-`rgb` colormap is selected for a multi-channel array, its\nrenderer keeps only the first channel.\n\nThe success result is a two-item tuple: `output={\"image_path\": image_path}` and\nmetadata containing whether title\u002Fdescription were supplied, the requested\n`figsize` and `cmap`, and `analysis_status=\"completed\"`. A missing file returns\nan error tuple; do not treat that as a successful visualization.\n\n## UI path distinction\n\nThe interface stores uploaded data in managed temporary storage. It keeps an\n`original_file_path` for the uploaded file and a separate `display_file_path`.\nFor a `.dcm` upload it converts only for display; for a regular image the two\npaths can be the same. UI rendering should use `display_file_path`, while a\nmessage\u002Ftool handoff must choose the path according to the receiving tool's\nformat contract. In particular, do not encode raw DICOM bytes as if they were a\nJPEG data URL. If an image API needs base64, encode the PNG display derivative\nand use its actual image MIME type, while retaining the original for archival\nor explicitly DICOM-aware processing.\n\nThe utility result from `image_visualizer` contains the path to show in the UI;\nit is not a model answer. See [web-interface](..\u002Fweb-interface\u002FSKILL.md) for\nstate and event handling.\n\n## Safety and cleanup\n\n- Do not print full DICOM metadata or embed sensitive tags in titles,\n  descriptions, chat messages, or benchmark records.\n- Use a caller-owned temporary\u002Foutput directory with appropriate permissions.\n  The DICOM tool creates a unique `processed_dicom_\u003Ctoken>.png`; it does not\n  anonymize or automatically delete that file.\n- Clean generated derivatives only through an explicit, narrowly scoped cleanup\n  policy owned by the caller. Never delete the original input as part of this\n  skill.\n- Stop on a missing path, unsupported suffix, invalid pixel data, or unwritable\n  destination and report the actionable error. Do not fall back to a random\n  file or silently reinterpret a DICOM as an ordinary image.\n","# Image-data utilities\n\nUse this skill when a chest X-ray input must be checked, made viewable, or\nhanded between the upload\u002FUI layer and an image-capable tool. It covers the two\nutility tools:\n\n- `DicomProcessorTool` converts a DICOM pixel array to a temporary PNG and\n  returns conversion metadata.\n- `ImageVisualizerTool` validates a JPG\u002FPNG path and returns the path plus\n  display metadata. Its normal `_run` path reports a display result; it does\n  not call the matplotlib rendering method in the current implementation.\n\nThis skill does **not** perform model inference. Route interpretation,\nclassification, segmentation, grounding, or report generation to\n[chest-xray-analysis](..\u002Fchest-xray-analysis\u002FSKILL.md). Route LangGraph\nconstruction to [agent-orchestration](..\u002Fagent-orchestration\u002FSKILL.md), upload\nwidgets, chat history, and Gradio state to\n[web-interface](..\u002Fweb-interface\u002FSKILL.md), and benchmark data preparation to\n[benchmark-evaluation](..\u002Fbenchmark-evaluation\u002FSKILL.md).\n\n## Operating contract\n\n1. Keep the input path and its role explicit: `original_path` is the preserved\n   source used for archival or a tool that explicitly supports that format;\n   `display_path` is a viewable PNG\u002FJPG path for the UI or an image-only tool.\n2. Validate a path before invoking a utility. Use the bundled\n   `scripts\u002Fvalidate_image_input.py` for existence, supported suffix, lightweight\n   file-signature, and optional output-directory checks.\n3. For DICOM, preserve the original file first. Convert a working\u002Fdisplay copy\n   with `DicomProcessorTool`; never replace the original with the generated PNG.\n4. Treat DICOM-derived fields such as `PatientID` and `StudyDate` as sensitive.\n   Pass only the metadata needed by the next step, avoid logging it, and do not\n   claim that conversion anonymizes the source.\n5. Inspect the returned tuple for an `error` key before using `image_path`.\n   Utility failures are data-preparation failures, not evidence about the\n   patient's image.\n\nSee [api-reference.md](references\u002Fapi-reference.md) for exact inputs and\noutputs, [data-formats.md](references\u002Fdata-formats.md) for format and privacy\nrules, [workflows.md](references\u002Fworkflows.md) for path handoffs, and\n[troubleshooting.md](references\u002Ftroubleshooting.md) for recovery actions.\n\n## Choose the path\n\n### Existing PNG\u002FJPG\u002FJPEG\n\n- Validate the file and optional destination directory.\n- Pass the existing image path to `ImageVisualizerTool._run` when a display\n  record is required.\n- Pass that same path to a downstream model tool only when its contract accepts\n  the format. Keep this utility step separate from model-specific preprocessing.\n\n`ImageVisualizerInput` documents JPG and PNG. JPEG is commonly represented by\n`.jpg` or `.jpeg`; do not silently accept an arbitrary suffix merely because a\nreader might open it.\n\n### DICOM\n\n- Validate the original file as DICOM-like input without dumping tags.\n- Call `DicomProcessorTool._run(dicom_path, window_center, window_width)`.\n- If both window parameters are absent, the tool first uses the first value of\n  DICOM `WindowCenter`\u002F`WindowWidth` when present. If either is still absent,\n  it uses a min\u002Fmax scale. If both are present, it clips and scales to uint8.\n- If `RescaleSlope` and `RescaleIntercept` are both present, apply them before\n  windowing or min\u002Fmax scaling (as the tool does).\n- Use returned `image_path` as the display path and retain the original DICOM\n  path as the source path. The metadata also records `original_path` and\n  `output_path` on success.\n- Use the PNG for a model tool that only reads JPG\u002FPNG\u002FPIL\u002Fskimage inputs. A\n  DICOM conversion is not a promise that every model tool can read DICOM.\n\nA caller may supply a positive window width and a clinically appropriate center\nwhen the source values are known. Do not invent window settings to compensate\nfor a malformed file; fix or reroute the input instead.\n\n## Display parameters\n\n`ImageVisualizerTool._run` accepts `image_path`, optional `title`, optional\n`description`, `figsize=(width, height)`, and `cmap=\"rgb\"`. For a grayscale CXR,\nuse a grayscale colormap such as `\"gray\"` when actual rendering is requested.\nThe implementation treats `\"rgb\"` specially and passes other colormap names to\nmatplotlib. If a non-`rgb` colormap is selected for a multi-channel array, its\nrenderer keeps only the first channel.\n\nThe success result is a two-item tuple: `output={\"image_path\": image_path}` and\nmetadata containing whether title\u002Fdescription were supplied, the requested\n`figsize` and `cmap`, and `analysis_status=\"completed\"`. A missing file returns\nan error tuple; do not treat that as a successful visualization.\n\n## UI path distinction\n\nThe interface stores uploaded data in managed temporary storage. It keeps an\n`original_file_path` for the uploaded file and a separate `display_file_path`.\nFor a `.dcm` upload it converts only for display; for a regular image the two\npaths can be the same. UI rendering should use `display_file_path`, while a\nmessage\u002Ftool handoff must choose the path according to the receiving tool's\nformat contract. In particular, do not encode raw DICOM bytes as if they were a\nJPEG data URL. If an image API needs base64, encode the PNG display derivative\nand use its actual image MIME type, while retaining the original for archival\nor explicitly DICOM-aware processing.\n\nThe utility result from `image_visualizer` contains the path to show in the UI;\nit is not a model answer. See [web-interface](..\u002Fweb-interface\u002FSKILL.md) for\nstate and event handling.\n\n## Safety and cleanup\n\n- Do not print full DICOM metadata or embed sensitive tags in titles,\n  descriptions, chat messages, or benchmark records.\n- Use a caller-owned temporary\u002Foutput directory with appropriate permissions.\n  The DICOM tool creates a unique `processed_dicom_\u003Ctoken>.png`; it does not\n  anonymize or automatically delete that file.\n- Clean generated derivatives only through an explicit, narrowly scoped cleanup\n  policy owned by the caller. Never delete the original input as part of this\n  skill.\n- Stop on a missing path, unsupported suffix, invalid pixel data, or unwritable\n  destination and report the actionable error. Do not fall back to a random\n  file or silently reinterpret a DICOM as an ordinary image.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill image-data-utilities",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill image-data-utilities",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill image-data-utilities","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",5124,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fdata-formats.md",4582,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002Freferences\u002Fdata-formats.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ftroubleshooting.md",5106,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002Freferences\u002Ftroubleshooting.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fworkflows.md",5141,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmedrax\u002Fsub-skills\u002Fimage-data-utilities\u002Freferences\u002Fworkflows.md",[68,76,81,88,95,102],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":77,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]