<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Dear H-B,<br>
the code looks to be OK. <br>
<br>
In order to set an input argument to your program, you either add
the argument when calling your program from the command line, or you
set the parameter under project properties (debugging, command
arguments option if you are using VisualStudio as your development
environment).<br>
<br>
But you have to bear in mind that it's not into ITK's scope to
display images, but rather apply them some processing.<br>
The filters' output is not rendered on any window; a filter
transforms in a certain way its input and yields an output.<br>
<br>
In order to see the output of your filtering process, you should
either render the output of the filter using some other library
whose purpose is visualization (you may want to try VTK) or write it
to disk and then visualize it with another visualization program of
your choice.<br>
<br>
If you haven't already done it, you may want to have a look at the
ITK Software Guide in order to better understand how ITK works:<br>
<a class="moz-txt-link-freetext" href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
<br>
Best regards,<br>
JON HAITZ<br>
<br>
<br>
<br>
<br>
El 28/10/2010 11:32, H-B escribió:
<blockquote cite="mid:325754.7915.qm@web38303.mail.mud.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div>hi all, i am new ti itk </div>
<div> </div>
<div>the hello world run with out any problem</div>
<div> </div>
<div>but when run data-representation example no any image
displayed,just the black screen appear quickly and
disappear</div>
<div> </div>
<div>i dont know what is the problm ,, i set the file name
to</div>
<font size="2">
</font>
<div><font size="2">reader->SetFileName( </font><font
color="#a31515" size="2"><font color="#a31515"
size="2">"C:\Users\Rahaf\Pictures\1.jpg"</font></font><font
size="2">);</font></div>
<div> </div>
<div><font size="2">because i dont know how to set
parameters for argv[1] .......</font></div>
<div> </div>
<div><font size="2">i spent alot of time in reading and
searching , at the end i try to send this message
which i hope i will find answer to my questions.</font></div>
<div> </div>
<div><font size="2">her is the code:</font></div>
<div> </div>
<font size="2"><font color="#0000ff" size="2"><font
color="#0000ff" size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#if</font></font><font
size="2"> </font><font color="#0000ff" size="2"><font
color="#0000ff" size="2">defined</font></font><font
size="2">(_MSC_VER)</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#pragma</font></font><font
size="2"> </font><font color="#0000ff" size="2"><font
color="#0000ff" size="2">warning</font></font><font
size="2"> ( </font><font color="#0000ff" size="2"><font
color="#0000ff" size="2">disable</font></font><font
size="2"> : 4786 )</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#endif</font></font></div>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#include</font></font><font
size="2"> </font><font color="#a31515" size="2"><font
color="#a31515" size="2">"itkImage.h"</font></font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#include</font></font><font
size="2"> </font><font color="#a31515" size="2"><font
color="#a31515" size="2">"itkImageFileReader.h"</font></font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">#include</font></font><font
size="2"> </font><font color="#a31515" size="2"><font
color="#a31515" size="2">"itkGradientMagnitudeImageFilter.h"</font></font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">int</font></font><font
size="2"> main( </font><font color="#0000ff"
size="2"><font color="#0000ff" size="2">int</font></font><font
size="2"> argc, </font><font color="#0000ff"
size="2"><font color="#0000ff" size="2">char</font></font><font
size="2"> **argv ) {</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">typedef</font></font><font
size="2"> itk::Image<</font><font color="#0000ff"
size="2"><font color="#0000ff" size="2">unsigned</font></font><font
size="2"> </font><font color="#0000ff" size="2"><font
color="#0000ff" size="2">short</font></font><font
size="2">,2> ImageType;</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">typedef</font></font><font
size="2"> itk::ImageFileReader<ImageType>
ReaderType;</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">typedef</font></font><font
size="2"> itk::GradientMagnitudeImageFilter< </font></div>
<div><font size="2">ImageType,ImageType> FilterType;</font></div>
<div><font size="2">ReaderType::Pointer reader =
ReaderType::New();</font></div>
<div><font size="2">FilterType::Pointer filter =
FilterType::New();</font></div>
<div><font size="2">reader->SetFileName( </font><font
color="#a31515" size="2"><font color="#a31515"
size="2">"C:\Users\Rahaf\Pictures\1.jpg"</font></font><font
size="2"> );</font></div>
<div><font size="2">filter->SetInput(
reader->GetOutput() );</font></div>
<div><font size="2">filter->Update();</font></div>
<font color="#0000ff" size="2"><font color="#0000ff"
size="2">
</font></font>
<div><font color="#0000ff" size="2"><font
color="#0000ff" size="2">return</font></font><font
size="2"> 0;</font></div>
<div><font size="2">}</font></div>
<div><font size="2"> </font></div>
<div><font size="2">theCmakelists</font></div>
<div><font size="2"><br>
PROJECT(ImageExamples)<br>
INCLUDE_REGULAR_EXPRESSION("^.*$")</font></div>
<div><font size="2">FIND_PACKAGE ( ITK)<br>
IF ( ITK_FOUND)<br>
INCLUDE( ${USE_ITK_FILE} )<br>
ENDIF( ITK_FOUND)</font></div>
<div><font size="2"> </font></div>
<div><font size="2">ADD_EXECUTABLE(Image2 Image2.cxx )<br>
TARGET_LINK_LIBRARIES(Image2 ITKBasicFilters
ITKCommon ITKIO)</font></div>
<div><font size="2"> </font></div>
<div><font size="2"> </font></div>
</font></td>
</tr>
</tbody>
</table>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_____________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Kitware offers ITK Training Courses, for more information visit:
<a class="moz-txt-link-freetext" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a>
Please keep messages on-topic and check the ITK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">
<table align="center" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><span class="Estilo3"></span> </td>
</tr>
</tbody>
</table>
</div>
</body>
</html>