Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Apr 24, 2024
1 parent 1e147a9 commit 73e15e0
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 158 deletions.
4 changes: 4 additions & 0 deletions articles/2024/appDev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
## 鸿蒙系统
- [HUAWEI DevEco Studio面向HarmonyOS应用及元服务开发者提供的集成开发环境(IDE), 助力高效开发。](https://developer.huawei.com/consumer/cn/deveco-studio/)
- [官方案例](https://gitee.com/openharmony/applications_app_samples)

### 开发问题

在local.properties中填写sdk.dir
10 changes: 9 additions & 1 deletion cg/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,12 @@ ctx.translate(-center.x, -center.y);
## 参考

- [OffscreenCanvas-离屏canvas使用说明](https://zhuanlan.zhihu.com/p/100375855)
- [canvas-scale](https://dustinpfister.github.io/2019/03/06/canvas-scale/),这篇文章很详细的介绍了canvas关于scale的细节,配合[playground](https://playcode.io/1833399)查看结果
- [canvas-scale](https://dustinpfister.github.io/2019/03/06/canvas-scale/),这篇文章很详细的介绍了canvas关于scale的细节,配合[playground](https://playcode.io/1833399)查看结果

## 经验

### 2024-4-19
在使用CanvasRenderingContext2D.drawImage以canvas为参数时,关于图像的放大问题,会陷入使用图像的逻辑中,先以中心点放大,再截图。
在使用canvas实现这个逻辑时,小程序上的实现让我很郁闷。表现出了不是预期的情况。
最后就是简单的绘制一部分到另外一个canvas上,就产生了预期的结果。实在令人困扰。
这个可能与微信中canvas实现机制有关,那就好奇实现原理了。
1 change: 1 addition & 0 deletions cg/ct.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ WADO:Web Access to DICOM Objects
- PET(Positron Emission Tomography), 正电子发射断层成像,PET 对疾病诊断的灵敏度高,但分辨率低
- Ultrasound, 超声,可以清晰显示脏器及周围器官的各种断面像,接近解剖真实结构,因其价廉、简便、迅速、无创、无辐射性、准确、可连续动态及重复扫描等优势应用甚广
- VOI(volumes of interest), 感兴趣区域
- Slab Thickness(), 三维图像数据中的一个切片或体检元素Voxel
5 changes: 4 additions & 1 deletion cg/geometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ CAD的开花理论,

2005年,Tom Hughes博士提出了等几何分析的思想(isogeometric analysis),核心是采用统一的样条语言来表达几何形状和物理场:利用平面NURBS参数曲面或者体NURBS参数体积作为计算域,计算单元为节点区间对应的曲面单元或者体单元;以NURBS基函数作为物理场的基函数(形函数),以控制顶点的物理数学分量作为未知变量。这样,形状几何与分析几何在同一样条空间,避免了数据交换;在精确CAD几何上进行仿真计算,避免了几何离散误差;在同样自由度下,达到较高计算精度,或者在同样的精度下,需要较少的自由度。同时,物理仿真保持了光滑性。从工程角度而言,等几何分析与传统的有限元方法兼容,等几何分析可以集成到现有的有限元环境之中。

虽然等几何分析具有很多传统方法无法比拟的优点,但是等几何分析并没有被工业界广泛采纳,核心在于传统CAD工业中的样条曲面无法满足等几何分析的要求。传统NURBS大量应用裁剪样条,裁剪样条无法分解成规则单元,需要重新构造;传统NURBS缺乏水密性,存在大量缝隙,因此有很多弥补缝隙的碎片样条,需要融合成整片样条;最为致命的问题是传统CAD模型只表达了几何体的边界曲面,而等几何分析需要将整个实体的内部也表达成样条。
虽然等几何分析具有很多传统方法无法比拟的优点,但是等几何分析并没有被工业界广泛采纳,核心在于传统CAD工业中的样条曲面无法满足等几何分析的要求。传统NURBS大量应用裁剪样条,裁剪样条无法分解成规则单元,需要重新构造;传统NURBS缺乏水密性,存在大量缝隙,因此有很多弥补缝隙的碎片样条,需要融合成整片样条;最为致命的问题是传统CAD模型只表达了几何体的边界曲面,而等几何分析需要将整个实体的内部也表达成样条。

## 参考
- [代数几何小科普3:怎么知道方程(组)有解? ](https://blog.sciencenet.cn/blog-1646100-818073.html)
10 changes: 9 additions & 1 deletion cg/library/cornerstonejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ yarn run serve-static-examples
- volume,是三个

## 文档
- [一文(10图)了解Cornerstone3D核心概念(万字总结附导图) ](https://juejin.cn/post/7326432875955798027)
- [一文(10图)了解Cornerstone3D核心概念(万字总结附导图) ](https://juejin.cn/post/7326432875955798027)

## [OHIF Medical Imaging Viewer](https://github.com/lmj01/Viewers)

### DICOM
关于处理DICOM的部分,分了三部分
- DICOM RT(Radiation Therapy),是DICOM3.0的标准扩展,专门用于放射治疗
- DICOM Seg(Segmentation), 涉及图像分割,是一种将医学影像中的特定结构、感兴趣区域与周围组织分离的过程
- DICOM SR(Structured Reporting), 是DICOM标准的一部分,
12 changes: 12 additions & 0 deletions cg/library/itk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# [ITK](https://itk.org/)
> Gain insights into scientific images with the Insight Toolkit (ITK)
## 概念

### 宏Marco
ITK创建对象的一种机制,因为ITK中的constructor构造函数都是protect的,不能直接调用。这样的目的就是添加标准方法到所有的类当中。

### DICOM
ITK中的[DICOM Rescale Slope/Intercept](https://docs.itk.org/en/latest/learn/dicom.html)

## itk.js
8 changes: 6 additions & 2 deletions cg/shader.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const passSequence = {
{
subpasses: [],
},
],
],
};
// 渲染主循环
function doRender() {
Expand Down Expand Up @@ -97,7 +97,7 @@ shader的作用就是由数据生成图像

Render Pass定义为一个渲染步骤。如有一个很多不同材质的球体的场景需要渲染,就可以声明一个render pass给所有球使用,因为对每一个球体,渲染结果都会输出到同一个FrameBuffer的Attachment上,所以流程上是一样的。

如果说Buffer的数据可以供所有shader使用,那么在render pass中就是更加定制化的渲染,
如果说Buffer的数据可以供所有shader使用,那么在render pass中就是更加定制化的渲染,

每个pass通常对应的渲染流程中不同阶段【相同阶段通常会使用MRT,或硬件不支持,需要多个Pass;或渲染目标size不一样,也需要多个pass来渲染】。实际意义是对一个Mesh渲染多遍,是对材质抽象的一种解释,一个Technique里会包含一个或多个Pass,如DeferredLighting流程里面一个物体就需要2个Pass,一个用来计算Z,一个用来lighting;如果有阴影,又需要一个Pass;如果需要精细反射图,需要一个反射的Pass。引擎一般会把状态类似的不同Mesh的Pass一起渲染, 用Pass对材质进行排序。

Expand Down Expand Up @@ -141,6 +141,10 @@ mat3(
- [WebGPU Shading Language](https://gpuweb.github.io/gpuweb/wgsl/)
- [WebGPU深入探索](http://www.bimant.com/blog/webgpu-deep-dive/)

### [RenderDoc](https://renderdoc.org/)

[RenderDoc在线文档](https://renderdoc.org/docs/index.html)

## 参考

- [the books of shader详细解说shader的开源书籍](https://thebookofshaders.com/)
Expand Down
3 changes: 2 additions & 1 deletion dev-note/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ MSBuild.exe INSTALL.vcxproj /p:Configuration=release
- [cmake常用命令](https://zhuanlan.zhihu.com/p/315768216)
- [CMake-tutorial中文教程](https://www.cnblogs.com/lnlin/p/16576418.html)
- [CMake入门笔记系列(一):CMake编译过程详解 | Micro CMake for C++](https://zhuanlan.zhihu.com/p/620839692)
- [一个简单例子,完全入门CMake语法与CMakeList编写](https://zhuanlan.zhihu.com/p/630144233)
- [一个简单例子,完全入门CMake语法与CMakeList编写](https://zhuanlan.zhihu.com/p/630144233)
- [CMake的自动传递依赖Configuring Transitive Dependencies with Modern CMake](https://www.cppmore.com/2024/04/22/configuring-transitive-dependencies-with-modern-cmake/)
7 changes: 7 additions & 0 deletions dev-note/cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## bat
- copy
- echo %path%
### 环境变量
环境变量设置,这样只能在CMD窗口有效,永久有效的有两种方法:一是注册表,二是系统变量
- set // 查看所有
- set 变量名=变量内容 // 赋值
- set 变量名= // 置空
- set 变量名=%变量名%;变量内容 // 如set path=%path%;d:\nmake.exe

## powershell
拷贝目录到另一个目录
Expand Down
92 changes: 13 additions & 79 deletions dev-note/vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ vscode的配置有两种形式
```json
{
// 预览模式关闭,直接打开新的tab页面
"workbench.editor.enablePreview":false,
"workbench.editor.enablePreview":false,

// Customizes which terminal to run on Windows.
"terminal.external.windowsExec": "C:\\windows\\System32\\cmd.exe",
"terminal.external.windowsExec": "C:\\windows\\System32\\cmd.exe",

// The path of the shell that the terminal uses on Windows. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).
"terminal.integrated.shell.windows": "C:\\windows\\system32\\cmd.exe",

}
```

Expand Down Expand Up @@ -58,7 +58,7 @@ rem %USERPROFILE% 当前用户的配置文件目录
rem %HOMEPATH% 当前用户的配置文件目录
rem %APPDATA% 当前用户的配置文件目录
rem 设置绝对路径
call:set_absolute_path USERPROFILE .\.portable\User
call:set_absolute_path USERPROFILE .\.portable\User
call:set_absolute_path APPDATA .\.portable\User\AppData\Roaming
call:set_absolute_path mingwbin .\.portable\mingw64\bin
call:set_absolute_path msysbin E:\IDE\msys1.0\bin
Expand All @@ -74,7 +74,7 @@ rem %~fX 将%X扩充到一个完全合格的路径名
rem %~dX 将%X扩充到一个驱动号
:set_absolute_path
for /f %%p in ("%2") do (set %1=%%~fp)
goto:eof
goto:eof
```

VSCode的[extensions installed](<https://code.visualstudio.com/docs/editor/extension-gallery#_common-questions>)的路径
Expand Down Expand Up @@ -104,74 +104,6 @@ ${fileExtname}:当前打开文件的后缀名
${cwd}:当前执行目录
```

## msys

mingw只是编译的运行库,缺少相关的系统级的工具,就需要msys了。

[msys-1.0](<https://sourceforge.net/projects/mingw/>)下载这个系统级别工具,安装到指定目录

### 方案1

把msys工具配置给mingw64使用,这样没有home路径,只能算是运行库和运行环境

```bat
@echo off
set mingw=H:\\tools\\VSCode-win32-x64-1.38.0\\.portable\\mingw64
set msys=H:\\tools\\msys\\1.0\\bin
set PATH=%PATH%;%mingw%;%msys%
start C:\Windows\System32\cmd.exe
```

### 方案2

使用msys为入口,这样就存在home,和根目录root,就可以安装指定的软件,可以编译相关的软件来使用了。

在msys.bat文件里面添加mingw的路径

## clang-llvm

### 方案1

编译[llvm 8.0.0](http://releases.llvm.org/8.0.0/)版本

```shell
// llvm根目录
llvm
// 其他部分源码分两大类,tools和projects
llvm/tools/clang
llvm/tools/clang/tools/extra
llvm/tools/lld
llvm/tools/lldb
llvm/tools/polly
llvm/projects/compiler-rt
llvm/projects/libcxx
llvm/projects/libcxxabi
llvm/projects/libunwind
llvm/projects/openmp
//
```

[编译参考](https://llvm.org/docs/CMake.html)

```shell
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/llvm/install/8.0.0 ../../llvm-8.0.0
cmake --build .
cmake --build . --target install
```

mingw64-win32版本的mutex没有得到支持,编译不能通过,使用posix版通过至10%

出现glibc的引发的连锁问题,改用vs编译发现lldb面前不支持window。这样就没有必要去做任何的尝试了。

### 方案2

mingw的环境编译存在些许问题,相关的依赖库很难配齐,[llvm download page](http://releases.llvm.org/download.html)下载编译好的

但是有个缺点就是没有lldb。

目前只能用来编译代码,还不能调试。

## 配置VSCode

在VSCode的启动batch文件中设置LLVM的bin环境
Expand All @@ -188,7 +120,7 @@ mingw的环境编译存在些许问题,相关的依赖库很难配齐,[llvm
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceFolder}",
"D:/App/MinGW/mingw64/include",
"D:/App/MinGW/mingw64/include",
"D:\\llvm\\7.0.1-win64\\LLVM\\include",
"H:\\tools\\VSCode-win32-x64-1.38.0\\.portable\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\8.1.0",
"H:\\tools\\VSCode-win32-x64-1.38.0\\.portable\\mingw64\\x86_64-w64-mingw32\\include"
Expand All @@ -201,7 +133,7 @@ mingw的环境编译存在些许问题,相关的依赖库很难配齐,[llvm
],
"browse": {
"path": [
"${workspaceFolder}"
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
Expand All @@ -214,6 +146,8 @@ mingw的环境编译存在些许问题,相关的依赖库很难配齐,[llvm
}
```

- Workbench › Editor: Enable Preview, 打开新的页面

### 快捷键

Ctr + ` 打开集成终端
Expand All @@ -223,7 +157,7 @@ Ctr + Shift + ` 打开新终端

安装Tex Live软件,使用清华的镜像,在VSCode中安装插件
- latex workshop
- latex preview
- latex preview

配置参数, 参考使用就是啦!
注意的是目录和参考文档的生成是需要中间文件的,而且是需要多次执行的
Expand All @@ -242,4 +176,4 @@ xxxx是tex的文件名,后缀.tex可省略,最后点击Latex的build控件

## reference

- [从 VSCode 看大型 IDE 技术架构](https://zhuanlan.zhihu.com/p/96041706)
- [从 VSCode 看大型 IDE 技术架构](https://zhuanlan.zhihu.com/p/96041706)
1 change: 1 addition & 0 deletions index/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- [powershell](../dev-note/powershell.md)
- [nodejs包管理](../web/pkg.md)
- [包管理C++](../dev-note/pkg.md)
- [maven](../java/maven.md)

### web
- [网页开发内容](../web/index.md)
Expand Down
1 change: 1 addition & 0 deletions index/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- PaaS, Platform as a service
- SaaS, Software as a service
- IQaaS, Intelligence as a service
- [设计模式目录](https://refactoringguru.cn/design-patterns/catalog)

### Actor

Expand Down
1 change: 1 addition & 0 deletions index/online.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- [Denis Bakhvalov, 关于性能优化的一个博客](https://easyperf.net/)
- [SaschaWillems,业余贡献实时3D以Khronos标准软件开发者](https://www.saschawillems.de/)
- [Agner Fog Research, 涉及很多编程知识,很好的文档几何,作者自己更新自己的理解与文档](https://www.agner.org/?e=0#0)
- [Bjarne StroustrupC++之父的网站](https://www.stroustrup.com/)

## 工具

Expand Down
Loading

0 comments on commit 73e15e0

Please sign in to comment.