<div dir="ltr">Why can't you create a separate class for the reader and use them anywhere you like?<br><br>Jothy<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 2:28 PM, Xiaopeng Yang <span dir="ltr"><<a href="mailto:yxp233@postech.ac.kr">yxp233@postech.ac.kr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would like to use rescaler1 in another two different cxx files.<br>
<br>
-----Original Message-----<br>
From: alex Dowson [mailto:<a href="mailto:alexdowson@hotmail.com">alexdowson@hotmail.com</a>]<br>
Sent: Wednesday, April 04, 2012 10:25 PM<br>
To: Xiaopeng Yang; 'John Drescher'<br>
Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
Subject: Re: [Insight-users] How to define global ITK variable for<br>
differentcxx files<br>
<br>
Hi<br>
<br>
What exactly you trying to do with that ?<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Xiaopeng Yang<br>
Sent: Wednesday, April 04, 2012 6:52 PM<br>
To: 'John Drescher'<br>
Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
Subject: Re: [Insight-users] How to define global ITK variable for<br>
differentcxx files<br>
<br>
I tried as follows. But I am not sure it is right or not.<br>
<br>
// globals.h<br>
<br>
#ifndef GLOBALS_H<br>
#define GLOBALS_H<br>
<br>
#ifndef EXTERN<br>
#define EXTERN extern<br>
#endif<br>
<br>
<br>
#include <itkImage.h><br>
<br>
#include "itkRescaleIntensityImageFilter.h"<br>
<br>
typedef float InputPixelType;<br>
<br>
typedef itk::Image< InputPixelType, 3 > InputImageType;<br>
<br>
typedef itk::RescaleIntensityImageFilter<<br>
InputImageType, InputImageType > RescaleFilterType;<br>
<br>
EXTERN RescaleFilterType::Pointer rescaler1 = RescaleFilterType::<br>
<br>
#endif<br>
<br>
Thanks.<br>
<br>
-----Original Message-----<br>
From: John Drescher [mailto:<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>]<br>
Sent: Wednesday, April 04, 2012 10:03 PM<br>
To: Xiaopeng Yang<br>
Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
Subject: Re: [Insight-users] How to define global ITK variable for different<br>
cxx files<br>
<br>
> Assume that I have two cxx files: a.cxx and b.cxx and two head files:<br>
> a.h and b.h.<br>
><br>
><br>
><br>
> I would like to define a global itk reader in a and then use that<br>
> reader in b.<br>
><br>
><br>
><br>
> How to achieve this?<br>
><br>
<br>
Add a third header file defining the global.<br>
<br>
John<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>