本文整理汇总了C++中Tiff_Im::nb_chan方法的典型用法代码示例。如果您正苦于以下问题:C++ Tiff_Im::nb_chan方法的具体用法?C++ Tiff_Im::nb_chan怎么用?C++ Tiff_Im::nb_chan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tiff_Im
的用法示例。
在下文中一共展示了Tiff_Im::nb_chan方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool MultiChannel<tData>::read_tiff( Tiff_Im &i_tiff ) // Tiff_Im is not const because of ReadVecOfIm
{
if ( i_tiff.type_el()!=typeEl() ) return false;
vector<Im2DGen *> tiffChannels = i_tiff.ReadVecOfIm();
resize( i_tiff.sz().x, i_tiff.sz().y, i_tiff.nb_chan() );
for ( size_t i=0; i<mChannels.size(); i++ )
set( i, *(Im2D<tData,tBase>*)tiffChannels[i] );
return true;
}
示例2: ConvertIm_main
int ConvertIm_main(int argc,char ** argv)
{
MMD_InitArgcArgv(argc,argv);
Tiff_Im::SetDefTileFile(1000000);
std::string aNameIn ;
INT aReducX=0;
INT aReducY=0;
INT aReducXY=0;
INT aVisu=0;
GenIm::type_el aTypeOut ;
std::string aNameTypeOut ="";
Tiff_Im::PH_INTER_TYPE aPhInterpOut ;
std::string aNamePITOut ="";
std::string PITOut[] = {"RGB","BW"};
std::list<std::string> lOut(PITOut, PITOut + sizeof(PITOut) / sizeof(std::string) );
std::string aNameOut;
std::string anExt;
Pt2di aP0(0,0);
Pt2di aSzOut ;
Pt2di aSzTF(-1,-1);
REAL aDyn=1.0;
Pt2di aSzTileInterne(-1,-1);
int aKCh = -1;
std::vector<int> aVPermut;
int aNoTile = 0;
std::string aF2 ="";
ElInitArgMain
(
argc,argv,
LArgMain() << EAMC(aNameIn, "Image", eSAM_IsExistFile),
LArgMain() << EAM(aNameOut,"Out",true)
<< EAM(anExt,"Ext",true)
<< EAM(aSzOut,"SzOut",true, "Size out", eSAM_NoInit)
<< EAM(aP0,"P0",true)
<< EAM(aNameTypeOut,"Type",true, "TypeMNT", eSAM_None, ListOfVal(GenIm::bits1_msbf, ""))
<< EAM(aNamePITOut,"Col",true, "Col", eSAM_None,lOut)
<< EAM(aReducXY,"ReducXY",true)
<< EAM(aReducX,"ReducX",true)
<< EAM(aReducY,"ReducY",true)
<< EAM(aVisu,"Visu",true)
<< EAM(aSzTF,"SzTifTile",true)
<< EAM(aSzTileInterne,"SzTileInterne",true)
<< EAM(aDyn,"Dyn",true)
<< EAM(aKCh,"KCh",true)
<< EAM(aNoTile,"NoTile",true)
<< EAM(aVPermut,"Permut",true, "Permut", eSAM_NoInit)
<< EAM(aF2,"F2",true)
);
if (!MMVisualMode)
{
// Tiff_Im aTifIn = Tiff_Im::BasicConvStd(aNameIn);
Tiff_Im aTifIn = Tiff_Im::UnivConvStd(aNameIn);
INT aNbChIn = aTifIn.nb_chan();
if (! EAMIsInit(&aTypeOut)) aTypeOut =aTifIn.type_el();
if (! EAMIsInit(&aPhInterpOut)) aPhInterpOut = aTifIn.phot_interp();
if (! EAMIsInit(&aSzOut)) aSzOut = aTifIn.sz();
if (aReducXY)
{
aReducX = 1;
aReducY = 1;
}
if (aNameOut=="")
{
if (anExt=="")
{
if (aReducX && aReducY)
anExt = "_RXY";
else if (aReducX)
anExt = "_RX";
else if (aReducY)
anExt = "_RY";
else
anExt= "_Out";
}
if (IsPostfixed(aNameIn))
aNameOut = StdPrefix(aNameIn) + anExt +"." + StdPostfix(aNameIn);
else
aNameOut = aNameIn + anExt + "tif";
}
Pt2di aCoefReduc(aReducX != 0 ? 2 : 1, aReducY != 0 ? 2 : 1);
aSzOut = aSzOut.dcbyc(aCoefReduc);
if (aNameTypeOut != "")
//.........这里部分代码省略.........