Hi Jeff,<br>I haven't yet upgraded to ITK 4.1; in the meantime I tried with 3.18. There are some differences because the BSpline transform at least has been renamed and refactored.<br><br>For that version of ITK, the DeformableRegistration12 example is equivalent to the one you are using. Note that it says that it is used for 2D images. You should check whether any of the parameters beyond need to be changed accordingly.<br>
<br>In any case, for the DeformableRegistration12 example I first got a crash related to a memory allocation issue when the MateMutualInformationMetric tries to set the size for the bspline transform:<br><br>m_BSplineTransformWeightsArray.SetSize( <br>
m_NumberOfSpatialSamples, m_NumBSplineWeights );<br><br>There was no information on the nature of the error; it simply crashed, but looking into it, found that it was due to the lack of enough memory.<br><br>So check the size of your input image. You may want to try with a smaller one and see what happens.<br>
<br>Also, if you want somebody else in the list to have a look at it, providing the CMakeLists (even if it is easy to build, as in this case) and the test dataset is of help.<br><br>Providing some more information on the error you get is also useful.<br>
<br>Kind regards,<br>JON HAITZ<br> <br><br><br><div class="gmail_quote">On 6 May 2012 21:43, uclao <span dir="ltr"><<a href="mailto:ucllao@gmail.com" target="_blank">ucllao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Jon Haitz,<br>
<br>
Thank you for the reply. I tried to reproduce the result of the example and<br>
even change the metric type. It works well if the inputs are 2D images.<br>
However when I switch to 2D image series (DICOM), the same problem happens<br>
and the program crushes when the registration process begins.<br>
<br>
The following is a link to my source code. I checked every step but still<br>
couldn't figure out the problem. Could you please kindly take a look and<br>
give me a hand.<br>
<br>
<a href="http://dl.dropbox.com/u/64842806/DeformableRegistration12.cxx" target="_blank">http://dl.dropbox.com/u/64842806/DeformableRegistration12.cxx</a><br>
<br>
Again, thank you for your help.<br>
<br>
Regards<br>
<br>
Jeff<br>
<br>
<br>
Jon Haitz Legarreta Gorroño wrote<br>
<div class="im">><br>
> Dear Jeff,<br>
> I would dare to say that the DICOM dictionary information provided is not<br>
> that important concerning your program not working. I think you shouldn't<br>
> be troubled by the information contained in the dictionary.<br>
><br>
> The fact that the datasets are in different locations is not an issue to<br>
> ITK neither. Once you load them into memory, ITK does not need any further<br>
> information on their location.<br>
><br>
> It looks like the reader successfully reads both series; the problem is<br>
> elsewhere.<br>
><br>
> Please try to go step by step and see where the problem lies in reality.<br>
><br>
> You may try to reproduce the result of the examples as it is to start<br>
> with.<br>
><br>
> JON HAITZ<br>
><br>
><br>
><br>
</div><div><div class="h5">> On 2 May 2012 12:40, uclao &lt;ucllao@&gt; wrote:<br>
><br>
>> Hi,<br>
>><br>
>> I'm trying to register two sets of DICOM CT images locates in two<br>
>> separated<br>
>> directories. What I did is taking the sample code ImageRegistration8.cxx<br>
>> and<br>
>> replacing the image readers with image series readers, copied from<br>
>> <a href="http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM" target="_blank">http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM</a>. Everything<br>
>> seems<br>
>> to be working until it gets to the registration part. Once it get to that<br>
>> line the program simply crushes with exit message "R6010 -abort() has<br>
>> been<br>
>> called". When I do fixedImageReader -> Print(std::cout) , I have the<br>
>> following printed:<br>
>><br>
>> ImageSeriesReader (0431BC50)<br>
>> RTTI typeinfo: class itk::ImageSeriesReader<class itk::Image<float,3><br>
>> ><br>
>> Reference Count: 1<br>
>> Modified Time: 116<br>
>> Debug: Off<br>
>> Observers:<br>
>> none<br>
>> No Inputs<br>
>> Outputs:<br>
>> Primary: (04125EA8)<br>
>> NumberOfIndexedInputs: 0<br>
>> NumberOfRequiredInputs: 0<br>
>> NumberOfIndexedOutputs: 1<br>
>> NumberOfRequiredOutputs: 1<br>
>> Number Of Threads: 4<br>
>> ReleaseDataFlag: Off<br>
>> ReleaseDataBeforeUpdateFlag: Off<br>
>> AbortGenerateData: Off<br>
>> Progress: 1<br>
>> Multithreader:<br>
>> RTTI typeinfo: class itk::MultiThreader<br>
>> Reference Count: 1<br>
>> Modified Time: 98<br>
>> Debug: Off<br>
>> Observers:<br>
>> none<br>
>> Thread Count: 4<br>
>> Global Maximum Number Of Threads: 128<br>
>> Global Default Number Of Threads: 4<br>
>> ReverseOrder: 0<br>
>> UseStreaming: 1<br>
>> ImageIO:<br>
>> GDCMImageIO (0411D5D8)<br>
>> RTTI typeinfo: class itk::GDCMImageIO<br>
>> Reference Count: 3<br>
>> Modified Time: 2977<br>
>> Debug: Off<br>
>> Observers:<br>
>> none<br>
>> AbortGenerateData: Off<br>
>> Progress: 0<br>
>> FileName: SS0001/S02A01_16/1.2.826.0.1.3680043.2.656.4.1.1.19.1.dcm<br>
>> FileType: Binary<br>
>> ByteOrder: LittleEndian<br>
>> IORegion:<br>
>> ImageIORegion (0411D650)<br>
>> Dimension: 3<br>
>> Index: 0 0 0<br>
>> Size: 512 512 1<br>
>> Number of Components/Pixel: 1<br>
>> Pixel Type: scalar<br>
>> Component Type: int<br>
>> Dimensions: ( 512 512 1 )<br>
>> Origin: ( -200.6 -160 -29.5 )<br>
>> UseCompression: Off<br>
>> UseStreamedReading: On<br>
>> UseStreamedWriting: Off<br>
>> Internal Component Type: unknown<br>
>> RescaleSlope: 1<br>
>> RescaleIntercept: -1024<br>
>> KeepOriginalUID:Off<br>
>> UIDPrefix: 1.2.826.0.1.3680043.2.1125.1<br>
>> StudyInstanceUID:<br>
>> SeriesInstanceUID:<br>
>> FrameOfReferenceInstanceUID:<br>
>> CompressionType:1<br>
>> Patient Name:BX0002<br>
>> Patient ID:A16<br>
>> ...<br>
>> Study Date:20000101<br>
>> Modality:CT<br>
>> Manufacturer:GE MEDICAL SYSTEMS<br>
>> Institution Name:<br>
>> Model:LightSpeed Ultra<br>
>> Scan Options:HELICAL MODE<br>
>> MetaDataDictionaryArrayMTime: 2989<br>
>> MetaDataDictionaryArrayUpdate: 1<br>
>><br>
>> Similar for the fixedImageReader print. The ITK version I am using is 4.1<br>
>> and compiled with MS Visual C++ 2010.<br>
>><br>
>> I went through the user guide Ch. 8 but couldn't find any example related<br>
>> to<br>
>> the problem directly. It would be nice if anyone can also give one or two<br>
>> sample code on DICOM registration.<br>
>><br>
>> Appreciate your help in this matter.<br>
>><br>
>> Regards,<br>
>> Jeff<br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686.html</a><br>
>> Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
>> _____________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>><br>
><br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
<br>
--<br>
</div></div>View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686p7533165.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686p7533165.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>