[Insight-users] Re: can't find ImageReadWrite.exe: = It is in InsightBinary/bin/debug or InsightBinary/bin/release

Luis Ibanez luis.ibanez@kitware.com
Mon, 24 Mar 2003 21:51:52 -0500


Hi Zhuo,

----
zhuo Chen wrote:
> Hi,luis
> I understand what you mean.I should execute
> ImageReadWrite under MS-DOS enviroment instead of VC
> enviroment, shall I? 


Yes, please execute ImageReadWrite in an MS-DOS console.


> I must input "ImageReadWrite
> DicomtoVtk.mhd DicomtoVtk.vtk",shall I?(DicomtoVtk.mhd
> is my output file of MetaImageImporter),



Yes, you give to ImageReadWrite as first argument the
filename of the metaimage header generated by
MetaImageImporter. The second argument is the filename
of the VTK image file, of course with extension .vtk.


> but after I
> correct the code from "dimension = 2" to "dimension =
> 3" and compile the program, no .exe file is produced.


The executable should be located in the ITK binary
directory, in the subdirectory "bin". The ITK binary
directory is the one you gave to CMake when you configured
ITK. Note that inside "bin" you will find directories
"release" and "debug". Inside one of them you will find
all the executables of the examples.

If you run in trouble finding the program, simply use
the "search file" option in windows.



> So although I input the command "ImageReadWrite
> DicomtoVtk.mhd DicomtoVtk.vtk" in DOS enviroment,the
> system can't find ImageReadWrite.exe to execute.


MS-DOS will not find the executable, simply because
it is not in your PATH. You can add the InsightBin/bin
directory to your path, or better, just move to the
bin directory by using "cd".



> By the way,you always write .mha,but the program
> produced .mhd.Who is right?


Both  ".mha"   and  ".mhd"  are valid extensions
for MetaImages. You can use any one of them.



> I also want ask you how many .vtk files which
> ImageReadWrite produces.The total number of my Dicom
> files is 18.I want to know the number of final .vtk
> files is 18 or 1.
> 

The final number of VTK files will be = 1.
This single file will contain the data taken
from the 18 slices in your DICOM files.




Regards,



   Luis