[Insight-users] DICOM Registration
uclao
ucllao at gmail.com
Tue May 8 19:02:26 EDT 2012
Hi Jon Haitz,
Thank you for your help and suggestions. I take your advice and start with
another example that works with 3D images (DeformableRegistration7). However
I am still ending up with the same error. Currently I switch to a 64 bit
machine in the lab, but both the old and new program crushes in the same
way. Here is what I for the output, which is pretty much the same as before.
There is 42 percent of memory in use.
There are 4176328 total KB of physical memory.
There are 2388336 free KB of physical memory.
There are 8350808 total KB of paging file.
There are 5798336 free KB of paging file.
There are 8589934464 total KB of virtual memory.
There are 8589845968 free KB of virtual memory.
There are 0 free KB of extended memory.
file names got
ref dir has 85 images and map dir has 98 images
file names set
images read
The ref series in directory SS0001/S02A01_16 has 85 files with spacing
[0.625, 0.625, 3.75]
The ref series in directory SS0001/S02A01_21 has 98 files with spacing
[0.679688, 0.679688, 3.75]
Initial Parameters =
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Starting Registration
-------- crush here --------
Apparently there is still free memory available when it crushes, so I guess
the problem is somewhere else. I checked all variables and they all seem to
be properly initialized. Right now I call registration->DebugOn() and it
does print some error message. However the window is not wide enough to view
the full message. It would be nice if there is some tool similar to a
debugger that I can use to locate the source of the problem.
The following are links to the program, cmakelists and the data set that I
use.
http://dl.dropbox.com/u/64842806/BSpline_LinearInter.cxx
http://dl.dropbox.com/u/64842806/CMakeLists.txt
http://dl.dropbox.com/u/64842806/SS0001.zip
Thank you for your generous help.
Regards,
Jeff
Jon Haitz Legarreta Gorroño wrote
>
> Hi Jeff,
> 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.
>
> 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.
>
> 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:
>
> m_BSplineTransformWeightsArray.SetSize(
> m_NumberOfSpatialSamples, m_NumBSplineWeights );
>
> 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.
>
> So check the size of your input image. You may want to try with a smaller
> one and see what happens.
>
> 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.
>
> Providing some more information on the error you get is also useful.
>
> Kind regards,
> JON HAITZ
>
>
>
> On 6 May 2012 21:43, uclao <ucllao@> wrote:
>
>> Dear Jon Haitz,
>>
>> Thank you for the reply. I tried to reproduce the result of the example
>> and
>> even change the metric type. It works well if the inputs are 2D images.
>> However when I switch to 2D image series (DICOM), the same problem
>> happens
>> and the program crushes when the registration process begins.
>>
>> The following is a link to my source code. I checked every step but still
>> couldn't figure out the problem. Could you please kindly take a look and
>> give me a hand.
>>
>> http://dl.dropbox.com/u/64842806/DeformableRegistration12.cxx
>>
>> Again, thank you for your help.
>>
>> Regards
>>
>> Jeff
>>
>>
>> Jon Haitz Legarreta Gorroño wrote
>> >
>> > Dear Jeff,
>> > I would dare to say that the DICOM dictionary information provided is
>> not
>> > that important concerning your program not working. I think you
>> shouldn't
>> > be troubled by the information contained in the dictionary.
>> >
>> > The fact that the datasets are in different locations is not an issue
>> to
>> > ITK neither. Once you load them into memory, ITK does not need any
>> further
>> > information on their location.
>> >
>> > It looks like the reader successfully reads both series; the problem is
>> > elsewhere.
>> >
>> > Please try to go step by step and see where the problem lies in
>> reality.
>> >
>> > You may try to reproduce the result of the examples as it is to start
>> > with.
>> >
>> > JON HAITZ
>> >
>> >
>> >
>> > On 2 May 2012 12:40, uclao <ucllao@> wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm trying to register two sets of DICOM CT images locates in two
>> >> separated
>> >> directories. What I did is taking the sample code
>> ImageRegistration8.cxx
>> >> and
>> >> replacing the image readers with image series readers, copied from
>> >> http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM. Everything
>> >> seems
>> >> to be working until it gets to the registration part. Once it get to
>> that
>> >> line the program simply crushes with exit message "R6010 -abort() has
>> >> been
>> >> called". When I do fixedImageReader -> Print(std::cout) , I have the
>> >> following printed:
>> >>
>> >> ImageSeriesReader (0431BC50)
>> >> RTTI typeinfo: class itk::ImageSeriesReader<class
>> itk::Image<float,3>
>> >> >
>> >> Reference Count: 1
>> >> Modified Time: 116
>> >> Debug: Off
>> >> Observers:
>> >> none
>> >> No Inputs
>> >> Outputs:
>> >> Primary: (04125EA8)
>> >> NumberOfIndexedInputs: 0
>> >> NumberOfRequiredInputs: 0
>> >> NumberOfIndexedOutputs: 1
>> >> NumberOfRequiredOutputs: 1
>> >> Number Of Threads: 4
>> >> ReleaseDataFlag: Off
>> >> ReleaseDataBeforeUpdateFlag: Off
>> >> AbortGenerateData: Off
>> >> Progress: 1
>> >> Multithreader:
>> >> RTTI typeinfo: class itk::MultiThreader
>> >> Reference Count: 1
>> >> Modified Time: 98
>> >> Debug: Off
>> >> Observers:
>> >> none
>> >> Thread Count: 4
>> >> Global Maximum Number Of Threads: 128
>> >> Global Default Number Of Threads: 4
>> >> ReverseOrder: 0
>> >> UseStreaming: 1
>> >> ImageIO:
>> >> GDCMImageIO (0411D5D8)
>> >> RTTI typeinfo: class itk::GDCMImageIO
>> >> Reference Count: 3
>> >> Modified Time: 2977
>> >> Debug: Off
>> >> Observers:
>> >> none
>> >> AbortGenerateData: Off
>> >> Progress: 0
>> >> FileName:
>> SS0001/S02A01_16/1.2.826.0.1.3680043.2.656.4.1.1.19.1.dcm
>> >> FileType: Binary
>> >> ByteOrder: LittleEndian
>> >> IORegion:
>> >> ImageIORegion (0411D650)
>> >> Dimension: 3
>> >> Index: 0 0 0
>> >> Size: 512 512 1
>> >> Number of Components/Pixel: 1
>> >> Pixel Type: scalar
>> >> Component Type: int
>> >> Dimensions: ( 512 512 1 )
>> >> Origin: ( -200.6 -160 -29.5 )
>> >> UseCompression: Off
>> >> UseStreamedReading: On
>> >> UseStreamedWriting: Off
>> >> Internal Component Type: unknown
>> >> RescaleSlope: 1
>> >> RescaleIntercept: -1024
>> >> KeepOriginalUID:Off
>> >> UIDPrefix: 1.2.826.0.1.3680043.2.1125.1
>> >> StudyInstanceUID:
>> >> SeriesInstanceUID:
>> >> FrameOfReferenceInstanceUID:
>> >> CompressionType:1
>> >> Patient Name:BX0002
>> >> Patient ID:A16
>> >> ...
>> >> Study Date:20000101
>> >> Modality:CT
>> >> Manufacturer:GE MEDICAL SYSTEMS
>> >> Institution Name:
>> >> Model:LightSpeed Ultra
>> >> Scan Options:HELICAL MODE
>> >> MetaDataDictionaryArrayMTime: 2989
>> >> MetaDataDictionaryArrayUpdate: 1
>> >>
>> >> Similar for the fixedImageReader print. The ITK version I am using is
>> 4.1
>> >> and compiled with MS Visual C++ 2010.
>> >>
>> >> I went through the user guide Ch. 8 but couldn't find any example
>> related
>> >> to
>> >> the problem directly. It would be nice if anyone can also give one or
>> two
>> >> sample code on DICOM registration.
>> >>
>> >> Appreciate your help in this matter.
>> >>
>> >> Regards,
>> >> Jeff
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686.html
>> >> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> >> _____________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Kitware offers ITK Training Courses, for more information visit:
>> >> http://www.kitware.com/products/protraining.php
>> >>
>> >> Please keep messages on-topic and check the ITK FAQ at:
>> >> http://www.itk.org/Wiki/ITK_FAQ
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.itk.org/mailman/listinfo/insight-users
>> >>
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.php
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>>
>> --
>> View this message in context:
>> http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686p7533165.html
>> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/DICOM-Registration-tp7519686p7540948.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list