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

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)
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

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
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,

Ivaylo Angelov

_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to