<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div id="yiv1440123354"><div id="yui_3_16_0_1_1450322355316_2682"><div style="background-color: rgb(255, 255, 255);" id="yui_3_16_0_1_1450322355316_2681"><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;">Dear ITK Community,</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;"><br id="yiv1440123354yui_3_16_0_1_1450320492970_9908"></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;">I am high school senior extremely interested in programming and dedicated my graduating senior project to a SimpleITK program. I have basic understanding of computer science with skills in both python and Java. </div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;"><br id="yiv1440123354yui_3_16_0_1_1450320492970_9910"></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;">I am basically trying to rewrite an ITK example,<a rel="nofollow" class="yiv1440123354" target="_blank" href="http://itk.org/ITKExamples/src/Filtering/ImageGrid/Create3DVolume/Documentation.html#create-3d-volume" id="yiv1440123354yui_3_16_0_1_1450320492970_9868" style="background-color:rgb(255, 255, 255);">Create 3D Volume</a>, into a SimpleITK program. Create 3D volume uses the TileImageFilter and DisconnectPipeline methods in order to merge multiple two dimensional images into a three dimensional image. If I follow the example on the site and use InputImageType as a parameter of InputImageType then I receive the error "wrong number or type of argument for overloaded function new_Image". I looked up the function .Image and rewrote the program in a way that fits all parameters. The program is below:</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14px;"><br></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr"><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">from __future__ import print_function</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_2988" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">import SimpleITK as sitk</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">import sys</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">import os</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">import numpy</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">import matplotlib as plt</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_2996" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">if len(sys.argv) != 3:</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> print("Usage: " + sys.argv[0] + "<python.png> <prediction.png> <output.png>")</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> sys.exit(1)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3002" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">InputDimension = 2</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">OutputDimension = 3</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3007" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">pixelType = sitk.sitkFloat32</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">TInputImage = sitk.Image(32, 32, InputDimension)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">TOutputImage = sitk.Image(32, 32, OutputDimension)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3013" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">reader = sitk.ImageFileReader()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3017" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">tileFilter = sitk.TileImageFilter()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> </div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">layout = [2, 2, 0]</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">defaultvalue = 128</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3024" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">tileFilter.SetLayout(layout)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3028" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">for ii in range(1, len(sys.argv)-1):</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> reader.SetFileName(sys.argv[ii])</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> reader.Update()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3034" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> inputImage = sys.reader.GetOutput()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> inputImage.DisconnectPipeline()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3039" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""> tileFilter.SetInput(ii-1, inputImage)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3043" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">tileFilter.SetDefaultPixelValue(defaultvalue)</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">tileFilter.Update()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br id="yui_3_16_0_1_1450322355316_3048" class=""></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">writer = sitk.ImageFileWriter(TOutputImage).New()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">writer.SetFileName(sys.argv[-1])</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">writer.SetInput(TileFitler.GetOutput())</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">writer.Update()</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">This program is also based on the example but I doWhen i run this program through the command prompt along with images I am trying to import I receive the error "AttributeError; type object 'object' has no attribute '__getattr__'.</div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class=""><br></div><div id="yiv1440123354yui_3_16_0_1_1450320492970_4303" dir="ltr" class="">I would love to complete this program and begin to work on future personal ITK projects so I would appreciate help on this. Please let me know If I have made any formatting mistakes or reached out in the wrong way. Thank you all so much!</div></div></div></div></div></div></body></html>