is there a way that itk read sitk format ParameterFile to get DeformationField?

hi, i use elastix, which implemented by sitk, to do registration, and get the ParameterFile txt, like this:

(BSplineTransformSplineOrder 3)
(Direction 1 0 0 0 0.9999999315500054 -0.000369999979306246 0 0.00036999998049990314 0.999999931550005)
(FixedImageDimension 3)
(FixedInternalImagePixelType "float")
(GridDirection 1 0 0 0 0.9999999315500054 -0.000369999979306246 0 0.00036999998049990314 0.999999931550005)
(GridIndex 0 0 0)
(GridOrigin 67.71146660291066 79.80510398708019 588.6699620773851)
(GridSize 64 42 39)
(GridSpacing 1.7201266908261634 2.461699090466467 2.0218607210882595)
(HowToCombineTransforms "Compose")
(Index 0 0 0)
(InitialTransformParametersFileName "D:\prostate_run\result_REG_20230728_140035/out/TransformParameters.2.txt")
(MovingImageDimension 3)
(MovingInternalImagePixelType "float")
(NumberOfParameters 314496)
(Origin 101 102 599.7811279296875)
(Size 846 539 496)
(Spacing 0.10729999840259552 0.10729999840259552 0.10729612410068512)
(Transform "BSplineTransform")
(TransformParameters -1.0478706354403987e-7 2.0743957855544285e-7 0.0000011263306187233196 0.0000033441718987107818 0.000007343758194308732 0.000013624609067952464 0.00002268930617472435 0.00003505314554250688 0.000051223582361363215 0.00007168818894110696 0.00009699598804681613 0.00012780619121801297 0.0001645663913872672 0.0002073875675462811 0.0002570260595860087 0.00031596824551838017 0.00038233176901132876 0.00045117041854378517 0.0005143225679701076 0.0005590401324163488 0.0005747162470450339 0.0005520407429044353 0.0004801230181267029 0.0003445439044039672 0.00013935566755031678 -0.00013540125972062318 -0.00047380668192982577 -0.0008616247527368571 -0.0012878539229087976 -0.001742607634696908 -0.0022155905505458332 -0.0026967453377950944 -0.0031745925371309135 -0.0036366631014418125 -0.004069094044574853 -0.004456019307949003 -0.004782908068144388 -0.005036557941000603 -0.005201565254023738 -0.005256904172189414 -0.0051955708584464095 -0.005020454881118982 -0.00474446287055861 -0.00439470113871282 -0.003992318214896478 -0.0035557301848693768 -0.003105695156671282 -0.002667015830609041 -0.002255655799585726 -0.0018813690198707864 -0.001547975682407157 -0.0012508532185196708 -0.0009886750743310691 -0.0007612713539339326 -0.0005680026302888139 -0.0004083107879561926 -0.0002806096324713418 -0.00018255628703084333 -0.00011087431792791319 -0.000060990233440876917 -0.000028937611462878507 -0.00001091516239384719 -0.0000033168043940527238 9.577489647835274e-8 -2.683308513026266e-7 5.265642111874351e-7 0.0000028692019995201038 0.00000852365042117229 0.000018721336164313294 0.00003473660912465666 0.00005785075235855838 0.00008937492888094275 0.00013060668791303417 0.00018279711669192582 0.00024735960669803366 0.0003259968670331409 0.00041986575180651635 0.0005292579438820654 0.0006561225101779717 0.0008068505788876985 0.0009766166234922412 0.0011527291276328064 0.0013142396434716764 0.0014284214562386782 0.0014680505419973234 0.0014092403440551004 0.0012240307822375617 0.0008753597663448809 0.00034802286168723884 -0.0003577351834950734 -0.0012264917673507356 -0.002221356537851104 -0.003313804652630513 -0.004478219806574184 -0.005687870849482903 -0.0069164798502862794 -0.008134505745899277 -0.009310139633346492 -0.010408272617336147 -0.011389049804501894 -0.012215870106675226 -0.0128554521688022 -0.013268956641901178 -0.01340329936176682 -0.01324095482119679 -0.012789487023890203 -0.012081872111647345 -0.011187108410621809 -0.010159073982419772 -0.00904470295729577 -0.007896894952702193 -0.006778875135576483 -0.00573128090320227 -0.004778880696095862 -0.003931272223184912 -0.0031764686164888352 -0.0025109137719207058 -0.0019340170265641846 -0.0014439702490257026 -0.0010391276913401227 -0.0007153293780514197 -0.0004665623226230577 -0.0002845044592458425 -0.00015762117822339344 -0.00007591050108790759 -0.000029747831965491303 -0.000010154381830973616 -5.940392117367604e-7 -3.456125438468592e-7 6.928920245835853e-7 0.0000037436902226281043 0.000011108306650422609 0.00002438784621713849 0.00004523479214784934 0.00007532034376312738 0.00011638113878141363 0.00017006921742137844 0.0002379297762740818 0.00032166801486850817 0.00042329183839697165 0.0005441383919083867 0.0006844495944795002 0.0008465792729158551 0.001038552419850243 0.0012540669645322022 0.0014767747159547986 0.0016797737929575046 0.0018211060910942704 0.0018658617276640934 0.001783424001644409 0.001537915606122515 0.001081679550026885 0.0003953654343944404 -0.0005203714420874938 -0.0016452056902320716 -0.0029309876313831393 -0.004340436196601249 -0.005840090034866207 -0.007394943119021025 -0.008970307342494677 -0.010527946674266039 -0.01202716506515594 -0.013423485503481648 -0.01466698515056331 -0.015711643734159942 -0.01651557137936386 -0.017029865395181247 -0.017187561836263066 -0.016966840048776445 -0.016377733132536657 -0.015462552671969282 -0.01430936390075297 -0.01298701782806498 -0.011555528365449347 -0.010082520041856008 -0.008648822892752494 -0.00730634793538972 -0.006086687931014022 -0.0050020038893066375 -0.004036811364184646 -0.00318642618883119 -0.0024499654628488405 -0.0018249829514151946 -0.0013092281000233038 -0.0008972639719627387 -0.0005813015882877639 -0.00035063123955485746 -0.00019050319427682012 -0.00008801951773177821 -0.00003085700888445855 -0.000007028323825140619 0.0000020731969928461647 -4.7427999671154047e-7 0.000001019252231604167 0.0000053616686308569235 0.000015847826620035275 0.00003474503014730789 0.00006437386004419487 0.00010712431344972504 0.0001655967885095362 0.00024197568966752303 0.0003380886863186265 0.00045576349500924354 0.0005969301137350823 0.0007627432677709013 0.0009529414051768075 0.0011700568284259102 0.0014241734678805496 0.0017062670108490034 0.001993919117353217 0.002250605638493369 0.0024196716525728187 0.0024539449707993866 0.0023121060614407396 0.001945578086675375 0.0012894291097681838 0.0003181057308820908 -0.0009661209120604932 -0.002533559700098476 -0.004315722242689675 -0.006259377428756416 -0.008316814380696286 -0.010437785209667106 -0.01257144786501953 -0.014664640922145405 -0.016662621456081918 -0.01850728872320186 -0.020135670893457514 -0.021489020793311508 -0.022513686648318022 -0.023146960280227426 -0.023302465157359894 -0.022953198468554613 -0.0221140575916073 -0.02084245660653027 -0.019256069100543134 -0.017447227310026712 -0.015496558675207937 -0.013494841379851252 -0.01155058951885637 -0.00973335831260349 -0.008085325538354459 -0.0066224590818596985 -0.005323444657387493 -0.0041815382324135696 -0.003195128092033103 -0.0023604907607236935 -0.0016741510578888073 -0.001128387025427898 -0.0007123279280627564 -0.00041125861079277076 -0.0002052546018666077 -0.00007641512349184708 -0.000008056574039667069 0.000018346604018000337 0.00001602774183389424 -6.370209564605942e-7 0.0000015095510418159135 0.000007662162236625171 0.000022526529058550537 0.000049292087398402075 0.00009118482032429006 0.00015161305770767538 0.00023451353174297376 0.00034265305804987556 0.0004778911357529136 0.0006416398748807114 0.0008348105007180398 0.0010575691598325285 0.0013083568959390854 0.0015891538107343304 0.0019116098873851654 0.002262842772966877 0.002612783601520491 0.0029131910868790737 0.0030898752368711756 0.003080990886759594 0.0028324685704644646 0.002280424153676396 0.0013386470427755608 -0.000025164132575000015 -0.0018052307408933372 -0.003958127565680641 -0.006387143275996016 -0.009016715586597463 -0.01177923689088144 -0.01460286764736325 -0.017412934181074088 -0.020136676214305173 -0.022702748663841428 -0.025038903424002765 -0.027071473775503674 -0.028730254082123922 --0.004117721084245978 -0.003271742792629982 -0.002557274259229149 -0.0019638605251821243 -0.0014812111040501512 -0.0010974710829736213 -0.0007975727517974736 -0.0005722405543614597 -0.0004073130469809154 -0.00031498179960875284 -0.0001415175401995369)
(UseCyclicTransform "false")
(UseDirectionCosines "true")

// ResampleInterpolator specific
(FinalBSplineInterpolationOrder 3)
(ResampleInterpolator "FinalBSplineInterpolator")

// Resampler specific
(CompressResultImage "true")
(DefaultPixelValue 0)
(OpenCLResamplerUseOpenCL "true")
(Resampler "OpenCLResampler")
(ResultImageFormat "nii")
(ResultImagePixelType "float")

how can i read the txt file to get DeformationField image use itk? thank you!

If you are using itk-elastix, you could invoke ConvertToItkTransform, see:

Thank you, but I am not using python itk-elastix. And I found building c++ simpleITK lib maybe a solution. Thank you anyway!