--- /dev/null
+/* =======================================================================
+ * @author: Leonardo Florez-Valencia
+ * @email: florez-l@javeriana.edu.co
+ * =======================================================================
+ */
+#ifndef __ivq__ITK__RegionOfInterestWithPaddingImageFilter__h__
+#define __ivq__ITK__RegionOfInterestWithPaddingImageFilter__h__
+
+#include <itkRegionOfInterestImageFilter.h>
+
+namespace ivq
+{
+ namespace ITK
+ {
+ /**
+ */
+ template< class _TInput, class _TOutput >
+ class RegionOfInterestWithPaddingImageFilter
+ : public itk::RegionOfInterestImageFilter< _TInput, _TOutput >
+ {
+ public:
+ // Basic types
+ typedef itk::RegionOfInterestImageFilter< _TInput, _TOutput > Superclass;
+ typedef RegionOfInterestWithPaddingImageFilter Self;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro(
+ ivq::ITK::RegionOfInterestWithPaddingImageFilter,
+ itk::RegionOfInterestImageFilter
+ );
+
+ itkGetConstMacro( Padding, unsigned int );
+ itkSetMacro( Padding, unsigned int );
+
+ protected:
+ RegionOfInterestWithPaddingImageFilter( );
+ virtual ~RegionOfInterestWithPaddingImageFilter( );
+
+ virtual void GenerateOutputInformation( ) override;
+
+ private:
+ // Purposely not implemented
+ RegionOfInterestWithPaddingImageFilter( const Self& );
+ void operator=( const Self& );
+
+ protected:
+ unsigned int m_Padding;
+ };
+
+ } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+# include <ivq/ITK/RegionOfInterestWithPaddingImageFilter.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+#endif // __ivq__ITK__RegionOfInterestWithPaddingImageFilter__h__
+
+// eof - $RCSfile$
--- /dev/null
+/* =======================================================================
+ * @author: Leonardo Florez-Valencia
+ * @email: florez-l@javeriana.edu.co
+ * =======================================================================
+ */
+#ifndef __ivq__ITK__RegionOfInterestWithPaddingImageFilter__hxx__
+#define __ivq__ITK__RegionOfInterestWithPaddingImageFilter__hxx__
+
+// -------------------------------------------------------------------------
+template< class _TInput, class _TOutput >
+ivq::ITK::RegionOfInterestWithPaddingImageFilter< _TInput, _TOutput >::
+RegionOfInterestWithPaddingImageFilter( )
+ : Superclass( ),
+ m_Padding( 0 )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput, class _TOutput >
+ivq::ITK::RegionOfInterestWithPaddingImageFilter< _TInput, _TOutput >::
+~RegionOfInterestWithPaddingImageFilter( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput, class _TOutput >
+void ivq::ITK::RegionOfInterestWithPaddingImageFilter< _TInput, _TOutput >::
+GenerateOutputInformation( )
+{
+ if( this->m_Padding > 0 )
+ {
+ // Apply padding
+ typename _TInput::RegionType region =
+ this->GetInput( )->GetLargestPossibleRegion( );
+ typename _TInput::RegionType roi = this->GetRegionOfInterest( );
+ typename _TInput::IndexType iMin = region.GetIndex( );
+ typename _TInput::IndexType iMax = iMin + region.GetSize( );
+ typename _TInput::IndexType i0 = roi.GetIndex( );
+ typename _TInput::IndexType i1 = i0 + roi.GetSize( );
+ typename _TInput::SizeType size;
+ for( unsigned int d = 0; d < _TInput::ImageDimension; ++d )
+ {
+ i0[ d ] -= this->m_Padding;
+ i1[ d ] += this->m_Padding;
+ i0[ d ] = ( i0[ d ] < iMin[ d ] )? iMin[ d ]: i0[ d ];
+ i1[ d ] = ( iMax[ d ] < i1[ d ] )? iMax[ d ]: i1[ d ];
+ size[ d ] = i1[ d ] - i0[ d ];
+
+ } // rof
+
+ roi.SetIndex( i0 );
+ roi.SetSize( size );
+ this->SetRegionOfInterest( roi );
+
+ } // fi
+ this->Superclass::GenerateOutputInformation( );
+}
+
+#endif // __ivq__ITK__RegionOfInterestWithPaddingImageFilter__hxx__
+
+// eof - $RCSfile$
delete this->m_UI;
}
+// -------------------------------------------------------------------------
+void ivq::Qt::DicomSeriesSelectorDialog::
+setStartDir( const std::string& dir )
+{
+ this->m_UI->Selector->setStartDir( dir.c_str( ), true );
+}
+
// -------------------------------------------------------------------------
std::vector< std::string >* ivq::Qt::DicomSeriesSelectorDialog::
selectedFilenames( )
explicit DicomSeriesSelectorDialog( QWidget* parent = 0 );
virtual ~DicomSeriesSelectorDialog( );
+ void setStartDir( const std::string& dir );
+
std::vector< std::string >* selectedFilenames( );
protected: