Can I apply imtranslate to a 4D image?
Show older comments
Can you please give me examples of imtranslate code lines that is being applied to a 4D DICOM image?
I get the errors that imtranslate is taking a 3D image as input.
6 Comments
Rik
on 3 Jul 2018
If it is a rigid translation (no rotation or shear), you can loop through the fourth dimension to translate the first 3 dimensions, and then follow it up with a second loop to translate the last dimension.
Stelios Fanourakis
on 3 Jul 2018
Edited: Stelios Fanourakis
on 3 Jul 2018
Rik
on 4 Jul 2019
In this context of 3D and 4D images, I would like to ask a very baisc doubt of mine . Light field or Plenoptic images are considered to be 4 D images. If I have them in png format, then how do I read and show it in Matlab. Does normal imread and imshow functions do the reading/displaying of 4 D images too?
Rik
on 4 Jul 2019
The png format doesn't actually support multidimensional images as far as I'm aware. So if you have png file, you have 2D RGB images.
A more fundamental question is how you would envision a 4D display function to work. There are some 3D tools you could use, and you could add color to encode a forth dimension.
Also, a quick Google search didn't explain why you would consider such an image itself to be 4D.
parvathy prathap
on 8 Jul 2019
Thanks for your answer. Plenoptic OR light field images are theoretically considered to be 4 D images. I have seen a couple of datasets of light field images where the images are in png format or tiff format. That is why i was wondering if light field images could be available in these formats too. Please let me know if you know anyone working in the field of light field/plenoptic image processing. I am new to this field.
Rik
on 8 Jul 2019
They may be 4D theoretically, but if they're saved as png, they are RGB 2D. Tiff has a some more options, although as I understand it is also limited to 3D. Just like a map of the world, that could be a lower dimensional representation of the higher dimensional actual object.
The fundamental question of how you would display a 4D object is also still unanswered.
And no, I don't know anyone working in such a field.
Accepted Answer
More Answers (1)
Another possibility below. This should work on arrays of any dimension.
F=griddedInterpolant(your4Darray);
g=F.GridVectors;
for i=1:numel(g)
g{i}=g{i}-translation_vector(i);
end
result=F(g);
20 Comments
Rik
on 4 Jul 2018
That's a good option for the question as it was posted, but apparently not what OP intented
Stelios Fanourakis
on 4 Jul 2018
Stelios Fanourakis
on 4 Jul 2018
Stelios Fanourakis
on 4 Jul 2018
Stelios Fanourakis
on 5 Jul 2018
Matt J
on 5 Jul 2018
I don't know how to interpret what the pic shows, but bear in mind that if your original image was an integer type, it won't be after the interpolation.
Stelios Fanourakis
on 5 Jul 2018
Stelios Fanourakis
on 5 Jul 2018
Stelios Fanourakis
on 5 Jul 2018
Stelios Fanourakis
on 6 Jul 2018
Matt J
on 6 Jul 2018
Not really. But it seems to be an issue in whatever you are doing to display the result, not in the computation of the translation. Try normalizing the maximum in your data to 1 or 255.
Stelios Fanourakis
on 6 Jul 2018
Stelios Fanourakis
on 6 Jul 2018
Stelios Fanourakis
on 6 Jul 2018
Stelios Fanourakis
on 6 Jul 2018
Stelios Fanourakis
on 15 Jul 2018
Stelios Fanourakis
on 15 Jul 2018
Categories
Find more on DICOM Format in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!