How to read file in MedicalDemo1

I am a new guy in vtk.
I am trying to run vtk example in textbook MedicalDemo1.
I do not know hot to load the source file - FullHead - into the program.
I see the format of FullHead is plain text.
I noticed that in the argparse method, the format is mhd.

Would you tell me how to run MedicalDemo1?


You can find the data here:

If you have downoaded the vtk-examples it will be in src/Testing/Data


I have the same question.

I think what we need to know is how to run the program.
I already downloaded the data.

Thanks very much!

The argparse in code means you need to input filename in the command line. It means you need to run this code by input python filename in the command line. You can have a try.

Hi, Zhang Qiang:

Thanks for responding.

I tried hard coded the filename as below.


But none of them worked.

I have no idea now.

What is the correct file name for vtkMetaImageReader?


If you look at the info section here: MedicalDemo1 the file you need is FullHead.mhd it also expects FullHead.raw.gz to be in the same folder.

Thanks, I get it!