      Reference Count: 1
      Modified Time: 7173
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 000000000B9E0040
      Container manages memory: false
      Size: 6881280
      Capacity: 6881280
```
Using commands that don't try to access the numpy pixel data works fine (e.g. deform.GetNumberOfComponentsPerPixel(), deform.GetSize() etc). However, when I use deform.GetPixel((1,1,1)) or sitk.GetArrayFromImage(deform), or when I try to write the deformation field to a file using sitk.WriteImage(deform, 'deform.mhd') python crashes without raising an error. 

The exact version of SimpleElastix that I have installed is simpleitk-1.1.0.dev362+gb3783-py3.6-win-amd64 according to conda. Could it be that this is some bug in the C code?

When running the transformix command from command line itself everything goes fine and I get the resulting deformation field.
<issue_comment>username_1: It should now work on the develop branch. New tests pass on CI. Give it a spin and let me know how it goes.
<issue_comment>username_2: @username_1  I got exactly the same issue as @username_0 .. I can't write the deformation field I get through TransformixImageFilter.GetDeformationField() with sitk.WriteImage().The generated.raw is basically empty, although the generated.mhd seems to have the correct metadata.

Also, I can't access the pixel data within the deformation field as well..

I'd be happy if there are any updates regarding this issue :)

Thanks for the great effort :)
<issue_comment>username_0: @username_2 I made a seperate issue (https://github.com/SuperElastix/SimpleElastix/issues/261) for this problem. It is a while ago that I have encountered it, but I think it was solved on the dev branch as is mentioned in one of the comments there.
Building SuperElastix from dev should probably fix your problem. 

Another (crude) solution (which was a workaround I resorted to at first) would be to run the transformix command from command line and load the deformation field using SimpleITK.
<issue_comment>username_2: Thanks for ur feedback, @username_0 

A while ago, I resorted to using the command line versions of both elastix & transformix (calling them in python through `subprocess.run()` ) that I build separately without the Superbuild pipeline of sitk (as the version that sitk uses till now is still 4.9 which has performance issues). I use sitk only for pre & postprocessing (i.e. ITK functionality, but not elastix) as it's still super useful..

Cheers,,
M
<issue_comment>username_3: Hi all,

I've gone through quite a painful process to finally get a deformation file exported.

I initially performed a registration in Anaconda Jupyter:

```
# Initiate ElastixImageFilter:
ElastixImFilt = sitk.ElastixImageFilter()
ElastixImFilt.LogToConsoleOn() # <-- no output
ElastixImFilt.LogToFileOn() # <-- output's elastix.log ONLY ONCE per kernel

# Define the fixed and moving images:
ElastixImFilt.SetFixedImage(FixedIm)
ElastixImFilt.SetMovingImage(MovingIm)

# Get the default parameter map template:
ParamMap = sitk.GetDefaultParameterMap('affine')

# Set registration parameters:
ParamMap['AutomaticTransformInitialization'] = ['true']
ParamMap['AutomaticTransformInitializationMethod'] = ['GeometricalCenter']
ParamMap['WriteIterationInfo'] = ['true']
ParamMap['MaximumNumberOfIterations'] = ['512']
ParamMap['UseDirectionCosines'] = ['true']

# Set the parameter map:
ElastixImFilt.SetParameterMap(ParamMap)

# Register the 3D images:
ElastixImFilt.Execute()

# Get the registered image:
RegIm = ElastixImFilt.GetResultImage()
```

and the registration looked fine.  So I moved onto trying to get the deformation field:

```
# Get the current working directory:
CurrentWorkingDir = os.getcwd()

# Get the transform parameter map:
#TransformParameterMap = ElastixImFilt.GetParameterMap()

# Initiate TransformixImageFilter:
TransformixImFilt = sitk.TransformixImageFilter()
TransformixImFilt.LogToConsoleOn() # <-- no output
TransformixImFilt.LogToFileOn() 
TransformixImFilt.SetOutputDirectory(CurrentWorkingDir) # <-- makes no difference, still no output

# Set up for computing deformation field:
TransformixImFilt.ComputeDeformationFieldOn() # <-- no output

# Set up other computations to see if they produce output:
TransformixImFilt.ComputeSpatialJacobianOn() # <-- produces'spatialJacobian.nii'
TransformixImFilt.ComputeDeterminantOfSpatialJacobianOn() # <-- produces 'fullSpatialJacobian.nii'

# Set the transform parameter map:
TransformixImFilt.SetTransformParameterMap(ElastixImFilt.GetTransformParameterMap())

# Need to explicitely tell elastix that the image is 3D since by default it will
# only transform to 2D:
TransformixImFilt.SetMovingImage(MovingIm)

# Transform the contour points:
TransformixImFilt.Execute()

# Get the deformation field:
DeformationField = TransformixImFilt.GetDeformationField()
```

but the deformation field was not exported (the Jacobian and its determinant was exported to.nii files).

Issue #259 looked promising so I tried:

`DeformationFieldNda = sitk.GetArrayFromImage(DeformationField) `

but it killed the kernel without producing any errors.  So did:

`sitk.WriteImage(DeformationField, 'defField.nii')`

Then I copied the above code and saved it into a.py file and ran it in Anaconda Spyder.  Spyder produced output (warnings, parameters, metrics results, etc) in the console that Jupyter did not, but still not deformationField.nii file.

Then I repeated the above in PyCharm and it worked!  Or so I thought it did...

Running the script in PyCharm created the defField.nii file only once!  Although the Jacobian.nii files and other.log and.txt files were updated, the deformation field file did not.  I tried again after restarting PyCharm but there was no change.

I moved on.  I read in the defField.nii file I generated once only and converted to a numpy array:

DefField = sitk.ReadImage(DefFieldFpath)

# Convert to numpy data array:
DefFieldNda = sitk.GetArrayFromImage(DefField)"The Rated R Superstar" reflects...
In an interview with Jonathan Snowden of Bleacher Report, Edge reflected back on the impactful Tables, Ladders, and Chairs matches made famous by he, Christian, The Dudley Boyz, and The Hardy Boyz close to 20 years ago.
While he acknowledges that the matches are special, he does lament that the matches he took part in may have kicked off a negative trend, especially as matches of that ilk that followed his will take greater risks in order to thrill fans.
"There is that part of me that feels we pushed it too far," Edge said. "At that time, we were young and we were hungry, and we were just champing at the bit to get noticed and to make our mark. And how do you do that when you have Steve Austin firing on every cylinder? When you have The Rock firing on every cylinder? When you have The Undertaker and Mankind and Kane and Triple H—what do you do to stand out, to get noticed, to start creating some kind of a groundswell? Well, we were willing to take risks. And we'd like to think that they were calculated and that they made sense. But I still think we've pushed it so far.
"And when I look at young talent now and I see matches like, 'Oh, they're doing so much.' But then I have to temper it, remind myself, 'Well, dumbass, you're partly responsible for this because of the TLC matches.' I really would love for it