///Ctor
WxAnySimpleDlg::WxAnySimpleDlg(wxWindow *parent,
- wxString i_title,
- const std::string i_namedescp ,
- const std::string i_namedb)
+ wxString i_title,
+ const std::string i_namedescp ,
+ const std::string i_namedb)
: wxDialog(parent, -1,_T("DISPLAY IMAGES"), wxDefaultPosition, wxSize(230,150))
{
namedescp = i_namedescp;
- void WxAnySimpleDlg::setExts(std::vector<std::string> i_exts)
- {
- m_exts = i_exts;
- }
+void WxAnySimpleDlg::setExts(std::vector<std::string> i_exts)
+{
+ m_exts = i_exts;
+}
//////////////////////////////////////////////////////////////////////
// //
//////////////////////////////////////////////////////////////////////
template <typename TImage>
void WxAnySimpleDlg::split3Din3Dvtk(TImage* i_Img)
{
- typedef itk::ImageToVTKImageFilter< TImage > ConnectorType;
- ConnectorType::Pointer connector = ConnectorType::New();
- connector->SetInput(i_Img);
- connector->GetImporter()->SetDataScalarTypeToUnsignedChar();
- connector->Update();
+ typedef itk::ImageToVTKImageFilter< TImage > ConnectorType;
+ typename ConnectorType::Pointer connector = ConnectorType::New();
+ connector->SetInput(i_Img);
+ connector->GetImporter()->SetDataScalarTypeToUnsignedChar();
+ connector->Update();
vtkImageData *im = vtkImageData::New();
im->ShallowCopy(connector->GetOutput());
im->Update();
{
if(i_Img->GetImageDimension() == 4)
{
-
// size of fourth dimension
int dsize = i_Img->GetLargestPossibleRegion().GetSize(3);
// Output Type
typedef itk::ImageSeriesWriter<TImage, ImageOutputType > SeriesWriterType;
typedef itk::MetaImageIO MetaImageType;
MetaImageType::Pointer metaIO;
- SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New();
+ typename SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New();
// from JPR file to generate output files
typedef itk::NumericSeriesFileNames NamesGeneratorType;
seriesWriter->SetInput(i_Img);
seriesWriter->SetImageIO(metaIO);
try
- {
+ {
seriesWriter->Update();
vtkMetaImageReader *vReader = vtkMetaImageReader::New();
std::vector<std::string>::const_iterator it = names.begin();
m_Vresults.push_back(vReader->GetOutput());
}
- }
- catch( itk::ExceptionObject & excp )
- {
+ }
+ catch( itk::ExceptionObject & excp )
+ {
std::cerr << "Exception thrown while writing the series " << std::endl;
std::cerr << excp << std::endl;
//return EXIT_FAILURE;
- }
+ }
}
}
// get an Image on wanted type
template <typename TImage>
- typename TImage::Pointer getImage(boost::any i_AnyImage)
+ typename TImage::Pointer getImage(boost::any i_AnyImage)
{
- typedef itk::Image<TImage> ImageOut;
- ImageOut::Pointer img = ImageOut::New();
+ typedef itk::Image<TImage> ImageOut;
+ typename ImageOut::Pointer img = ImageOut::New();
img = boost::any_cast< ImageOut::Pointer>(i_AnyImage);
return img;
}