[問題] 讀取巨大影像問題(33GB的圖像)

看板Python作者 (橘阿)時間7年前 (2018/03/31 18:23), 編輯推噓4(408)
留言12則, 3人參與, 7年前最新討論串1/2 (看更多)
大家好 小弟最近在處理一個醫學的影像,是.mrxs的whole slide image。 就我現在所知,這類型影像的主要開啟軟體為Case Viewer, 但裡頭似乎並沒有切割影像的處理功能。 以致於小弟必須整張slide輸出轉檔成Tiff,礙於解析度不能掉, 整張圖片大小高達33GB... 詳細資訊如下 ------------------------------------------ BitsPerPixel 8 DimensionOrder XYCZT IsInterleaved false IsRGB false LittleEndian true PixelType uint8 SizeC 3 SizeT 1 SizeX 91904 SizeY 128512 SizeZ 1 BitsPerSample 8 Compression Uncompressed FillOrder Pixels with lower column values are stored in the higher order bits of a byte ImageLength 128512 ImageWidth 91904 MetaDataPhotometricInterpretation RGB MetaMorph no NewSubfileType 0 NumberOfChannels 3 Orientation 1st row - top; 1st column - left PhotometricInterpretation RGB PlanarConfiguration Chunky ResolutionUnit None SamplesPerPixel 3 TileByteCounts 196608 TileLength 256 TileWidth 256 ------------------------------------------- 想請問有沒有大大知道任何可以處理此類大型圖檔的方法 ((跪謝 不管是用別的軟體先做切割,或是python有辦法讀取部分圖檔也好, 不知道有沒有類似方法> < -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.175.145 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1522491821.A.077.html

03/31 20:37, 7年前 , 1F
03/31 20:37, 1F

03/31 20:38, 7年前 , 2F
.load()不會讀全部檔案 有點像(但不是)cursor吧
03/31 20:38, 2F

03/31 20:39, 7年前 , 3F
我後面reshape那邊在耍白痴... 反正就中間for在切
03/31 20:39, 3F

03/31 20:39, 7年前 , 4F
樓上這樣要把圖片全部load進memory...
03/31 20:39, 4F

03/31 20:40, 7年前 , 5F
我推薦LargeTIFFTools
03/31 20:40, 5F

03/31 20:41, 7年前 , 6F
喔喔不會是嗎!?
03/31 20:41, 6F

03/31 20:51, 7年前 , 7F
.load()是根據給的i,j去讀pixel 不會全抓
03/31 20:51, 7F

03/31 20:51, 7年前 , 8F
不過我只有試切一張幾百MB的tif而已@@
03/31 20:51, 8F

03/31 22:13, 7年前 , 9F
!! 感謝gold大大跟Thx大大 我這就來試~ 晚點稟報結果~
03/31 22:13, 9F

04/02 13:44, 7年前 , 10F
好奇所以後來行不行R?
04/02 13:44, 10F

04/04 17:34, 7年前 , 11F
抱歉~ 後來有其他模組上的問題所以拖了很久
04/04 17:34, 11F

04/04 17:34, 7年前 , 12F
他還是會整張讀取 所以沒辦法><
04/04 17:34, 12F
文章代碼(AID): #1Qls6j1t (Python)
文章代碼(AID): #1Qls6j1t (Python)