Hello,
thank you very much for your answer!
Indeed, I am working with a directory containing lots of slices, I just had not realized that the reader parses it, looking for all files with suitable metadata..
I will take a closer look into that and hopefully find, how I can access the image data in that case.
I will take a closer look into that and hopefully find, how I can access the image data in that case.
Ultimately, however, my goal is to have an obj file.. I guess that means, that I could convert the dicom image data to an NRRD file
(correct me, if I am wrong, but I am pretty sure that, at least for single slices, this can be done quite easily within MITK... I'll try to figure it out for the volume tomorrow)
and then convert this to polygonal data..
I saw an approach for that here:
I will try to use this approach and see if I find something within MITK (rather than just VTK)...
So probably I will return with more questions.... I'll give it my best.
Thanks again!
Kind regards
Ivaylo Angelov
Gesendet: Samstag, 20. Juli 2019 um 15:00 Uhr
Von: "Dinkelacker, Stefan" <s.dinkelac...@dkfz-heidelberg.de>
An: "Ivaylo Angelov" <ivaylo_ange...@gmx.de>, "mitk-userslists.sourceforge.net" <mitk-users@lists.sourceforge.net>
Betreff: AW: [mitk-users] how to create wavefront obj file from (dicom) image slices
Von: "Dinkelacker, Stefan" <s.dinkelac...@dkfz-heidelberg.de>
An: "Ivaylo Angelov" <ivaylo_ange...@gmx.de>, "mitk-userslists.sourceforge.net" <mitk-users@lists.sourceforge.net>
Betreff: AW: [mitk-users] how to create wavefront obj file from (dicom) image slices
Hi, I think you mix up a few things here.
Are you sure that you really need to manually merge 2d images into a 3d image, especially as your source images seem to be DICOM images? 3d volumes in DICOM are usually stored in separate files (one file / slice) in a directory. In MITK, you just need to open a single one of these files and our reader will automaticallly parse the folder for more images slices that fit based on their meta data and assemble a 3d volume out of all these files.
Also, the Wavefront obj file format is a file format for storing polygonal data, not image data. Common file formats for medical image data besides DICOM are NRRD or NIFTI.
Best,
Stefan
Von: Ivaylo Angelov <ivaylo_ange...@gmx.de>
Gesendet: Freitag, 19. Juli 2019 20:00
An: mitk-userslists.sourceforge.net
Betreff: [mitk-users] how to create wavefront obj file from (dicom) image slices
Gesendet: Freitag, 19. Juli 2019 20:00
An: mitk-userslists.sourceforge.net
Betreff: [mitk-users] how to create wavefront obj file from (dicom) image slices
Dear all,
I am trying to figure out the best way to convert a number of image slices to one volumetric image and export it
to an .obj file.
On the one side, my question is general... having a list, containing a number of "mitk::Image::Pointer"s.. what is the proper way (or "a" proper way)
On the one side, my question is general... having a list, containing a number of "mitk::Image::Pointer"s.. what is the proper way (or "a" proper way)
of converting those to a volumetric image and consequently to a wavefront obj file?
For now, I am trying to do this with DICOM images ... for that, I just took your "Step 1" tutorial project and extended it by a header and a source file, which I have appended to this mail
in case you want to take a look at the code.
I also changed the main function a bit. A file containing just the new stuff is appended as well.
The problem is again: having extracted the images, how can I do the conversion to one 3D image?
I saw an example here:
>>>>>>>>>>>>>>> https://itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadImageWrite2_8cxx-example.html
>>>>>>>>>>>>>>> https://itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadImageWrite2_8cxx-example.html
in which they use the itk::ImageSeriesReader.
As you can see in my code, I am using the procedure of creating a DICOMFileReaderSelector and letting him "choose" the best reader
(I read a lot through the code and saw, that this is apparently the way of loading DICOM images).
Given the configuration files, an mitkDICOMITKSeriesGDCMReader is chosen (not surprisingly, of course), but its GetOutput() method apparently
can only return one of the images.
In the itk example above however, the image writer is given the whole output of the series reader (" writer->SetInput( reader->GetOutput() ); ").
Is this itk example only possible with the itk:ImageSeriesReader?
I tried to use mitk classes etc., also because it is quite convenient for dicom files and for example all the code in the itk example finding the dicom files in the directory
I tried to use mitk classes etc., also because it is quite convenient for dicom files and for example all the code in the itk example finding the dicom files in the directory
is not really necessary, which makes it a bit easier.
Or should I just take the example as is, without mitk classes/functions ...?
(Though I have to say that, reading through all the code I just can't imagine that there is not a possibility within mitk, I just suppose I haven't found it by now).
I have tried, read and played around a lot by now, without a lot of success, so I would really appreciate if I could get some help on this topic.
I thank you very much in advance and wish you a great weekend.
Kind regards,
I thank you very much in advance and wish you a great weekend.
Kind regards,
Ivaylo Angelov
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users