Hi, Paolo Inviato da Yahoo! Mail su Android |
I tried to run plastimatch to register two images but it immediately crashed (see the attached output). It appears that something wrong with the mha creation or my ITK (v2.30.1) What I did is the following: 1. use matlab code to create a raw file. The code is:
fid=fopen('img0.raw','wb'); 2. use the raw_to_mha to convert the raw file to a mha file: raw_to_mha img0.raw img0.mha 3 "0.95 0.95 2.5" 3. Follow to run registration using the command plastimatch register command_file.txt with the example command_file.txt: # command_file.txt [STAGE] Would greatly appreciate it if anybody can help. Jim =========================================== Loading fixed image: img1.mha ElementType required and not defined. MetaObject: Read: MET_Read Failed MetaImage: M_Read: Error parsing file MetaImage: Read: Cannot parse file ITK exception. itk::ExceptionObject (01C3F394) Location: "void __thiscall itk::MetaImageIO::ReadImageInformation(void)" File: ..\..\..\InsightToolkit-3.20.1\Code\IO\itkMetaImageIO.cxx Line: 97 Description: itk::ERROR: MetaImageIO(00540348): File cannot be read: img1.mha for reading. Reason: Invalid argument Error: unhandled file type for loading image (0) phase5.mha Press any key to continue . . . You received this message because you are subscribed to the Google Groups "Plastimatch" group. To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. |
Sorry for the mistakes but the smartphone changes what I type. |
|
Inviato da Yahoo! Mail su Android |
ObjectType = Image
NDims = 3
BinaryData = True
BinaryDataByteOrderMSB = False
TransformMatrix = 1 0 0 0 1 0 0 0 1
Offset = 0 0 0
ElementSpacing = 0.97656 0.97656 2.5
DimSize = 3
AnatomicalOrientation = RPI
ElementType = MET_UCHAR
ElementDataFile = LOCAL
Hi Jim!
Another thing you can use to convert from dcm to mha, given you are already using matlab, is the function writemha.m (you can find it in plastimatch_directory/extra/ matlab). You can directly pass the matrix of data, element spacing, data type, offset to the function and it will write the corresponding mha.
--
****************************** ****************************** *******
Marta Peroni, PhDcontacts:
mobile: +393488202136 (IT)
****************************** ****************************** ********
--
****************************** ****************************** *******
Marta Peroni, PhDcontacts:
mobile: +393488202136 (IT)
****************************** ****************************** ********
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@ googlegroups.com.
For more options, visit https://groups.google.com/ groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@ googlegroups.com.
For more options, visit https://groups.google.com/ groups/opt_out.