BUG: LSMImageIO write function was not checking image dimension
BUG: LSMImageIO write function was not checking image dimension

LSMImageIO write function was assuming that the given image
was at least of dimension 2 (it is reading m_Dimensions[0]
and m_Dimension[1]). If one provides an image that is of dimension
1, then it crashes.

Change-Id: I760ec295ef62620c55d32a76584bf9718ab1759a

richardbeare/ITK,LucasGandel/ITK,thewtex/ITK,blowekamp/ITK,richardbeare/ITK,Kitware/ITK,spinicist/ITK,fbudin69500/ITK,richardbeare/ITK,LucasGandel/ITK,BRAINSia/ITK,BRAINSia/ITK,BRAINSia/ITK,spinicist/ITK,InsightSoftwareConsortium/ITK,vfonov/ITK,PlutoniumHeart/ITK,PlutoniumHeart/ITK,vfonov/ITK,richardbeare/ITK,Kitware/ITK,blowekamp/ITK,PlutoniumHeart/ITK,spinicist/ITK,Kitware/ITK,spinicist/ITK,thewtex/ITK,blowekamp/ITK,PlutoniumHeart/ITK,vfonov/ITK,InsightSoftwareConsortium/ITK,BRAINSia/ITK,blowekamp/ITK,LucasGandel/ITK,LucasGandel/ITK,stnava/ITK,blowekamp/ITK,thewtex/ITK,richardbeare/ITK,fbudin69500/ITK,malaterre/ITK,thewtex/ITK,BRAINSia/ITK,thewtex/ITK,thewtex/ITK,stnava/ITK,malaterre/ITK,vfonov/ITK,stnava/ITK,spinicist/ITK,InsightSoftwareConsortium/ITK,Kitware/ITK,vfonov/ITK,hjmjohnson/ITK,hjmjohnson/ITK,vfonov/ITK,LucasGandel/ITK,fbudin69500/ITK,stnava/ITK,spinicist/ITK,LucasGandel/ITK,spinicist/ITK,spinicist/ITK,InsightSoftwareConsortium/ITK,vfonov/ITK,BRAINSia/ITK,PlutoniumHeart/ITK,hjmjohnson/ITK,malaterre/ITK,LucasGandel/ITK,malaterre/ITK,blowekamp/ITK,malaterre/ITK,stnava/ITK,hjmjohnson/ITK,InsightSoftwareConsortium/ITK,stnava/ITK,Kitware/ITK,hjmjohnson/ITK,malaterre/ITK,fbudin69500/ITK,malaterre/ITK,PlutoniumHeart/ITK,spinicist/ITK,Kitware/ITK,malaterre/ITK,hjmjohnson/ITK,fbudin69500/ITK,fbudin69500/ITK,blowekamp/ITK,malaterre/ITK,stnava/ITK,PlutoniumHeart/ITK,BRAINSia/ITK,InsightSoftwareConsortium/ITK,fbudin69500/ITK,hjmjohnson/ITK,InsightSoftwareConsortium/ITK,richardbeare/ITK,stnava/ITK,fbudin69500/ITK,stnava/ITK,blowekamp/ITK,Kitware/ITK,thewtex/ITK,vfonov/ITK,PlutoniumHeart/ITK,LucasGandel/ITK,vfonov/ITK,richardbeare/ITK