InsightSoftwareConsortium / ITKThickness3D

An ITK module to compute 3D thickness
Apache License 2.0
39 stars 18 forks source link

Input 3D image format support #28

Closed meghalD closed 4 years ago

meghalD commented 4 years ago

I tried to read .obj file both as mesh and voxels. but the code image = itk.imread(input) is unable to read the file. It throws an error : reader = TemplateReaderType.New(*kwargs) File "/home/anaconda3/envs/Pose/lib/python3.6/site-packages/itkTemplate.py", line 471, in New return self._NewImageReader(itk.ImageFileReader, False, 'FileName', args, **kwargs) File "/home/anaconda3/envs/Pose/lib/python3.6/site-packages/itkTemplate.py", line 538, in _NewImageReader raise RuntimeError("Could not create IO object for reading file %s" % inputFileName + msg) RuntimeError: Could not create IO object for reading file 01.obj

what exactly should be the input and output so as to convert mesh or voxel 3D object to skeleton.

T4mmi commented 4 years ago

Hi @meghalD , thanks for using our tool !

it seems that the error is related to the ITK image reader and not to our plugin. Since i'm not used to .obj I might not be a great help here ...

meghalD commented 4 years ago

what is the format normally taken as input in 3D image ?Please specify so that I can find a work around to feed that as an input.

T4mmi commented 4 years ago

There is no "default" format for images.

ITKTickness3D will work with any ITK 3D image object as defined by ITK. If you wanna read an image file (i.e. load a file inside ITK), then you should look at the ITK ImageIO doc:

All I know is that natively is works with 3D TIFF (bigtiff supported) and with DICOM series (using dicom series reader)...

meghalD commented 4 years ago

This has to be done seperately in C++? Can I use this functions in python ?

T4mmi commented 4 years ago

Nope, no need for C++.
You can use almost all these functions through the Python wrappings