I have a set of similar DICOM files. I need to convert them to a 3D mesh and then register them. Then I need to transform the meshes so they are both on the same coordinate system. After this I need to calculate the area of each triangle in the mesh and do things with these values.
I’ve used VTK to create the 3D isoSurface similiar to marching cubes. Then I write to a .vtk ascii file the isoSurfaces.
I’d like to read these into the DeformableRegistration7 example but I keep getting an error:
VTKImageIO(0000025A4187AD90): Not structured points, can’t read
Here are the main changes I’ve made
FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); ImageIOType::Pointer vtkIO = ImageIOType::New(); vtkIO->SetFileTypeToASCII(); fixedImageReader->SetFileName(targetFilename); fixedImageReader->SetImageIO(vtkIO); movingImageReader->SetFileName(sourceFilename); movingImageReader->SetImageIO(vtkIO); FixedImageType::ConstPointer fixedImage = fixedImageReader->GetOutput(); registration->SetFixedImage(fixedImage); registration->SetMovingImage(movingImageReader->GetOutput());
What type of 3D Images are good for this example? Is there a better way to do this? I like using VTK but if there is a way to do this in ITK i’d go for it.
I’m working in C++.