Location pixel and slice
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Hi everyone.
Please help me. Now i have 20 slice image PET(dicom format dimension 256x256). How to determine:
1) The extrat location of pixel value with range 10000-32000 every slice.
Example: [rows, column, PixelValue]=
Below is my code to read all the 20 slice:
first_to_read = 1; last_to_read = 20; num_to_read = last_to_read - first_to_read + 1; for file_idx = 1 : num_to_read img_number = file_idx + first_to_read - 1; filename = fullfile('D:\Images PET and CT\PET', sprintf('PET_I1001_PT%03d.dcm', img_number)); X(:, : , 1, file_idx) = dicomread(filename); end
Help me..
댓글 수: 1
mohd akmal masud
2017년 12월 13일
One more thing the slice no.
Example:
[[rows, column, PixelValue, Slice]=
채택된 답변
0 개 추천
If you had only a 2D question, you could use find, but for some odd reason, it doesn't support more than 3D, so I've made a FEX submission for a similar goal as yours: findND.
[r,c,slice]=findND(X>10000 & X<32000);
val=X(X(:)>10000 & X(:)<32000);
Alternatively:
X_temp=X;
X_temp(X>10000 & X<32000)=0;
[r,c,slice,val]=findND(X_temp);
댓글 수: 12
mohd akmal masud
2017년 12월 13일
ok thanks sir. but does mean val in command val=X(X(:)>10000 & X(:)<32000); ??
Rik
2017년 12월 13일
The colon transforms the matrix to a vector, so X(:)>10000 will result in a binary vector, which is 1 for positions where the value is larger than 10000, and 0 where X is smaller. Then you can use the logical for the aptly named logical indexing. The reason I did it like this is that I was too lazy to check what the result would be without the colons, and this will make sure you have val in the shape of a vector.
So in short, val is the PixelValue at (r,c,slice).
PS I added an alternative to my answer.
mohd akmal masud
2017년 12월 13일
Very good explanation. thank you so much.
mohd akmal masud
2017년 12월 14일
Dear Rik,
From your code, I have done got all the pixel and the location. Can you help me to build up the volume of that ?? Meaning i want to show them the combine voxel to one volume.
Rik
2017년 12월 14일
Additional question sent by mail:
This function work very well. Now if i want to know the location of Z, is it correct that is my code? [X,Y,Z,slice]=findND(X>10000 & X<32000); val=X(X(:)>10000 & X(:)<32000); Another question is, if i have get the location pixel X, Y, Z location, how to draw the image by location pixel that i get??
Rik
2017년 12월 14일
The slice is already the z-coordinate. Is that what you mean by building up a volume? Or do you mean something else?
How would you want your visualization to be? You could use isosurface, then you don't even need the previous part (unless you use it in further processing of course).
mohd akmal masud
2017년 12월 14일
yes, i mean building up a volume
Rik
2017년 12월 14일
You already have a volume: your data was loaded to 3D to begin with. It is not clear to me what you mean with building up a volume, so you will have to explain what it is you want to do, otherwise I can't help you.
I would also suggest looking into the isosurface function (you can plot the result with patch).
mohd akmal masud
2017년 12월 14일
ok, i will look isosurface function
mohd akmal masud
2017년 12월 14일
thanks rik
Sorry all, another question i have but i wrote at this space. please help me
Dear all,
this is my code to view CT image by slice
P = zeros(256, 256, 72);
for K = 1 : 72
petname = sprintf('I4%03d.dcm', K);
P(:,:,K) = dicomread(petname);
end
imshow3D(P)
then, this is my code for view SPECT image by slice,
Noted: all my 42 slice SPECT image stored in one file.
[spect map]=dicomread('128x128');
info = dicominfo('128x128');
gp=info.SliceThickness;
spect=(squeeze(spect));%smooth3
aa=size(spect);aa=aa(3);
imshow3D(spect);
Anybody can help me to fuse both SPECT and CT images for all slice?
Rik
2019년 3월 24일
Please post this as a separate question.
Note that image fusing is only possible if you have the full positional information for both scans. Only then is it possible to resample one scan to the coordinate grid of the other.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Segmentation에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
