필터 지우기
필터 지우기

ReadFcn error from nhdr_nrrd_read

조회 수: 2 (최근 30일)
Sophia Sklar
Sophia Sklar 2020년 11월 6일
답변: Raunak Gupta 2020년 11월 13일
I am building a trainnetwork script and trying to build 2 databases: one uses mha_read_volume and the other uses nhdr_nrrd_read. The error message is coming from the nrrd reader stating: The output of the custom ReadFcn must be a categorical matrix
I think it has something to do with the 'data' field not being read in properly, but I'm not sure how to fix it.
I attached the trainnetwork script along with a screenshot of the error message. If anyone has any ideas how to fix this please send help!!

답변 (1개)

Raunak Gupta
Raunak Gupta 2020년 11월 13일
Hi,
As the error message suggest the custom ReadFcn must return a categorical array for pixel labels. If the file you are reading return a numeric array you can convert it to categorical array using categorical.
This example tells how the pixel label data may look like.

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by